Google Map Script

Check Latitude & Longitude with zoom on live

<div id="map-aux" style="height: 440px; width: 100%;"></div>

<script src="//maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script>
function initMap() {
 var map2 = new google.maps.Map(document.getElementById('map-aux'), {
   zoom: 6,
   center: {lat: 40.528106, lng:-3.65319}
 });
 var marker2 = new google.maps.Marker({
         position: {lat: 40.528106, lng:-3.65319},
         map: map2
       });
 var geocoder2 = new google.maps.Geocoder;
<!--if u dont need to display address on map | remove this | iff needed then change address and link-->

var infowindow2 = new google.maps.InfoWindow({
 });

<!-- Till here-->

 infowindow2.open(map2,marker2);

 google.maps.event.addListener(marker2, 'click', function() {
       infowindow2.open(map2,marker2);
 });
}

initMap();
</script>

Comments

Popular posts from this blog

Pagination of multiple recent post blog

Service Filter

When You Want to open popup(first time load)