Skip to content

Instantly share code, notes, and snippets.

@EfremovMS
Last active June 27, 2019 10:19
Show Gist options
  • Save EfremovMS/569a9caa3365d51f84daabc75ede1bca to your computer and use it in GitHub Desktop.
Save EfremovMS/569a9caa3365d51f84daabc75ede1bca to your computer and use it in GitHub Desktop.
JS google map
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