4 lines
773 B
JavaScript
4 lines
773 B
JavaScript
|
//
|
||
|
// Google maps
|
||
|
//
|
||
|
var map,lat,lng,$map=$("#map-default"),color="#5e72e4";function initMap(){map=document.getElementById("map-default"),lat=map.getAttribute("data-lat"),lng=map.getAttribute("data-lng");var a=new google.maps.LatLng(lat,lng),e={zoom:12,scrollwheel:!1,center:a,mapTypeId:google.maps.MapTypeId.ROADMAP};map=new google.maps.Map(map,e);var o=new google.maps.Marker({position:a,map:map,animation:google.maps.Animation.DROP,title:"Hello World!"}),t=new google.maps.InfoWindow({content:'<div class="info-window-content"><h2>Argon Dashboard</h2><p>A beautiful Dashboard for Bootstrap 4. It is Free and Open Source.</p></div>'});google.maps.event.addListener(o,"click",function(){t.open(map,o)})}$map.length&&google.maps.event.addDomListener(window,"load",initMap);
|