Created
June 8, 2017 16:25
-
-
Save Cheslab/e0bc0c52979ed8ba5495a079adab49cd to your computer and use it in GitHub Desktop.
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
<script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU" type="text/javascript"></script> | |
<div id="map" style="width: 100%; height: 600px"></div> | |
<script type="text/javascript"> | |
var elementExists = document.getElementById("map"); | |
if (elementExists != null) { | |
ymaps.ready(init); | |
var myMap, | |
myPlacemark; | |
function init() { | |
myMap = new ymaps.Map("map", { | |
center: [53.672254,32.755961], | |
zoom: 16 | |
}); | |
myPlacemark1 = new ymaps.Placemark([53.672254,32.755961], { | |
hintContent: 'YOUR TEXT ON HOVER', | |
balloonContent: 'YOUR TEXT IN THE BALLOON' | |
}, { | |
iconLayout: 'default#image', | |
iconImageHref: '/wp-content/uploads/2017/05/placemark.png', | |
iconImageSize: [40, 40], | |
iconImageOffset: [-20, -40] | |
}); | |
myMap.behaviors.disable('scrollZoom'); | |
myMap.geoObjects.add(myPlacemark1); | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment