Multiple Markers Google Map
<!--
Available heights
h-100
h-150
h-200
h-250
h-300
h-350
h-400
h-450
h-500
h-550
h-600
-->
<div id="map3" class="h-300 grayscale"></div>
<!--
GMAP.JS
http://hpneo.github.io/gmaps/
-->
<script type="text/javascript" src="//maps.google.com/maps/api/js?key=AIzaSyCqCn84CgZN6o1Xc3P4dM657HIxkX3jzPY"></script>
<script type="text/javascript" src="assets/plugins/gmaps.js"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
/**
@MULTIPLE MARKERS GOOGLE MAP
**/
map3 = new GMaps({
div: '#map3',
lat: -12.043333,
lng: -77.028333
});
// Marker 1
map3.addMarker({
lat: -12.043333,
lng: -77.03,
title: 'Lima',
details: {
database_id: 42,
author: 'HPNeo'
},
click: function(e){
if(console.log) {
console.log(e);
}
alert('You clicked in this marker');
}
});
// Marker 2
map3.addMarker({
lat: -12.042,
lng: -77.028333,
title: 'Marker with InfoWindow',
infoWindow: {
content: '<p>HTML Content</p>'
}
});
});
</script>