Last active
January 11, 2019 13:33
-
-
Save EfremovMS/459ba72057c80dff3e0568a8bc1aac80 to your computer and use it in GitHub Desktop.
JS Yandex 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
ymaps.ready(function () { | |
var loc = [55.830963, 37.130694], | |
z = 16; | |
var myMap = new ymaps.Map('map', { | |
center: loc, | |
zoom: z | |
}, { | |
searchControlProvider: 'yandex#search' | |
}), | |
myPlacemark = new ymaps.Placemark(loc, { | |
hintContent: '', | |
balloonContent: '' | |
}, { | |
iconLayout: 'default#image', | |
iconImageHref: 'img/map_ballon.png', | |
iconImageSize: [27, 38], | |
// Смещение левого верхнего угла иконки относительно | |
// её "ножки" (точки привязки). | |
iconImageOffset: [-14, -38] | |
}); | |
myMap.behaviors.disable('scrollZoom'); | |
myMap.geoObjects.add(myPlacemark); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment