Skip to content

Instantly share code, notes, and snippets.

@avtehnik
Created December 13, 2014 14:37
Show Gist options
  • Save avtehnik/9161c029abb913eb1e6f to your computer and use it in GitHub Desktop.
Save avtehnik/9161c029abb913eb1e6f to your computer and use it in GitHub Desktop.
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
<div id="map-canvas"></div>
function initialize() {
var myLatlng = new google.maps.LatLng( 49.4272769152388, 32.05879211425781);
var mapOptions = {
zoom: parseInt(gup('z', 13)),
center: myLatlng,
mapTypeId: google.maps.MapTypeId.SATELLITE
}
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
google.maps.event.addListener(map, 'click', function(e) {
console.log({lat: e.latLng.lat(), lng: e.latLng.lng()});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment