Last active
May 28, 2019 19:55
-
-
Save reaferon/9bc05c7143f8fe30b6028bab681c2ee9 to your computer and use it in GitHub Desktop.
Revisions
-
reaferon revised this gist
May 28, 2019 . No changes.There are no files selected for viewing
-
reaferon renamed this gist
May 28, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
reaferon created this gist
May 28, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,62 @@ ymaps.ready(init); function init() { var myMap = new ymaps.Map("map", { center: [55.76, 37.64], zoom: 10 }), // Создаем геообъект с типом геометрии "Точка". myGeoObject = new ymaps.GeoObject({ // Описание геометрии. geometry: { type: "Point", coordinates: [55.8, 37.8] }, // Свойства. properties: { // Контент метки. iconContent: 'Метка', balloonContent: 'Меня можно перемещать' } }, { // Опции. // Иконка метки будет растягиваться под размер ее содержимого. preset: 'twirl#redStretchyIcon', // Метку можно перемещать. draggable: true }), // Создаем метку с помощью вспомогательного класса. myPlacemark1 = new ymaps.Placemark([55.8, 37.6], { // Свойства. // Содержимое иконки, балуна и хинта. iconContent: '1', balloonContent: 'Балун', hintContent: 'Стандартный значок метки' }, { // Опции. // Стандартная фиолетовая иконка. preset: 'twirl#violetIcon' }), myPlacemark2 = new ymaps.Placemark([55.76, 37.56], { // Свойства. hintContent: 'Собственный значок метки' }, { // Опции. // Своё изображение иконки метки. iconImageHref: '/maps/doc/jsapi/2.x/examples/images/myIcon.gif', // Размеры метки. iconImageSize: [30, 42], // Смещение левого верхнего угла иконки относительно // её "ножки" (точки привязки). iconImageOffset: [-3, -42] }); //myMap.controls.add('smallZoomControl'); // Добавляем все метки на карту. myMap.geoObjects.add(myPlacemark1) .add(myPlacemark2) .add(myGeoObject); }