Last active
June 27, 2019 10:19
-
-
Save EfremovMS/569a9caa3365d51f84daabc75ede1bca to your computer and use it in GitHub Desktop.
JS google map
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
function initialize () { | |
var myLatlng = new google.maps.LatLng(55.7531262, 37.6203079); | |
var mapOptions = { | |
center: myLatlng, | |
zoom: 16, | |
mapTypeId: google.maps.MapTypeId.ROADMAP, | |
scrollwheel: false, | |
}; | |
var map = new google.maps.Map(document.getElementById('map'), mapOptions); | |
var marker = new google.maps.Marker({ | |
position: myLatlng, | |
map: map, | |
icon: 'img/ico/map-balloon.png' | |
}); | |
} | |
if(document.getElementById('map') != null) { | |
google.maps.event.addDomListener(window, 'load', initialize); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment