Skip to content

Commit

Permalink
Update castom-map.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kkurut authored May 20, 2024
1 parent 7a4d00a commit 6d71b5d
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions source/scripts/castom-map.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
/* eslint-disable */
ymaps.ready(function () {
var myMap = new ymaps.Map("map", {
center: [59.938631, 30.323037],
zoom: 16,
controls: [],
searchControlProvider: "yandex#search"
});
/* global ymaps */

var MyIconContentLayout = ymaps.templateLayoutFactory.createClass(
'<div style="color: #FFFFFF; font-weight: bold;">$[properties.iconContent]</div>'
);
ymaps.ready(() => {
const myMap = new ymaps.Map('map', {
center: [59.938631, 30.323037],
zoom: 16,
controls: [],
searchControlProvider: 'yandex#search'
});

var myPlacemark = new ymaps.Placemark(myMap.getCenter(), {
hintContent: "Собственный значок метки",
balloonContent: "Это красивая метка"
}, {
iconLayout: "default#image",
iconImageHref: "../images/map-cat.png",
iconImageSize: [113, 106],
iconImageOffset: [-56.5, -106]
});
const myPlacemark = new ymaps.Placemark(myMap.getCenter(), {
hintContent: 'Собственный значок метки',
balloonContent: 'Это красивая метка'
}, {
iconLayout: 'default#image',
iconImageHref: '../images/map-cat.png',
iconImageSize: [113, 106],
iconImageOffset: [-56.5, -106]
});

myMap.geoObjects.add(myPlacemark);
myMap.geoObjects.add(myPlacemark);
});

0 comments on commit 6d71b5d

Please sign in to comment.