Google Map Script
Check Latitude & Longitude with zoom on live
<div id="map-aux" style="height: 440px; width: 100%;"></div>
<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({
content: '<span style="color:#111;">Auxilium Mortgage Corporation, 307 Goldstream Ave, Victoria, BC </span><a href="https://www.google.ca/ maps/dir//Auxilium+Mortgage+ Corporation,+307+Goldstream+ Ave,+Victoria,+BC+V9B+2W4/@48. 442294,-123.470411,17z/data=! 4m13!1m4!3m3! 1s0x548f0cd9ba2cc5af: 0x98f9d7d36df0a4da!2sAuxilium+ Mortgage+Corporation!3b1!4m7! 1m0!1m5!1m1! 1s0x548f0cd9ba2cc5af: 0x98f9d7d36df0a4da!2m2!1d-123. 470411!2d48.442294" style="color:#f00;text- decoration:underline;" target="new">(need directions?)</a>'
});
<!-- Till here-->
infowindow2.open(map2, marker2);
google.maps.event. addListener(marker2, 'click', function() {
infowindow2.open(map2, marker2);
});
}
initMap();
</script>
Comments
Post a Comment