Created
November 28, 2020 16:17
-
-
Save igun997/ae755bb073095104cc13b384fca9c93b to your computer and use it in GitHub Desktop.
maps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<div id="map" style="width:auto;height:500px"> | |
<p>test</p> | |
</div> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script type="text/javascript" src="https://maps.google.com/maps/api/js?key=AIzaSyD1cM44pjtWnEej7CgCeCVtYx5D70ImTdQ"></script> | |
<script src="./gmaps.js"></script> | |
<script> | |
map = new GMaps({ | |
div: '#map', | |
lat: -12.043333, | |
lng: -77.028333 | |
}); | |
map.addMarker({ | |
lat: -12.043333, | |
lng: -77.03, | |
title: 'Kegiatan B', | |
click: function(e){ | |
if(console.log) | |
console.log(e); | |
location.href="https://google.com" | |
} | |
}); | |
map.addMarker({ | |
lat: -12.042, | |
lng: -77.028333, | |
title: 'Kegiatan B', | |
infoWindow: { | |
content: '<p>Duaar</p>' | |
} | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment