javascript - How to give the number in google map marker -
how give number in google map marker ? there marker available implement marker it's number. used following code this
locations = (<?php echo json_encode($location); ?>); var map = new google.maps.map(document.getelementbyid('map'), { zoom: 6, center: new google.maps.latlng(locations[0][1], locations[0][2]), maptypeid: google.maps.maptypeid.roadmap }); var infowindow = new google.maps.infowindow(); var marker, i; marker = new google.maps.marker({ position: new google.maps.latlng(locations[0][1], locations[0][2]), map: map, icon: 'blue-dot.png' }); google.maps.event.addlistener(marker, 'click', (function(marker) { return function() { infowindow.setcontent(locations[0][0]); infowindow.open(map, marker); } })(marker, i));
Comments
Post a Comment