Created
May 21, 2016 13:37
-
-
Save Papapashu/200e49c603737e90fc7a6e2dda2378c4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{block name=jquery append} | |
<script src="//api-maps.yandex.ru/2.1/?lang=ru_RU" type="text/javascript"></script> | |
<script type="text/javascript"> | |
ymaps.ready(function() { | |
var $fcoord = [55.800777277024594,37.7140785], | |
$zoom = 16, | |
$text = '{config name=site_name}', | |
$baloon = $('#YMap_baloon').html(); | |
var myMap = new ymaps.Map('YMap', { | |
center: $fcoord, | |
zoom: $zoom | |
}, { | |
searchControlProvider: 'yandex#search' | |
}); | |
var myPlacemark = new ymaps.Placemark($fcoord, { | |
hintContent: $text, | |
balloonContent: $baloon | |
}, { | |
// Необходимо указать данный тип макета. | |
iconLayout: 'default#image', | |
// Своё изображение иконки метки. | |
//iconImageHref: $icon, | |
// Размеры метки. | |
//iconImageSize: [278, 95], | |
// Смещение левого верхнего угла иконки относительно её "ножки" (точки привязки). | |
//iconImageOffset: [-15, -95] | |
}); | |
myMap.geoObjects.add(myPlacemark); | |
myMap.behaviors.disable('scrollZoom'); | |
myMap.balloon.open($fcoord,$baloon); | |
}); | |
</script> | |
{/block} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment