D
D
DeniSidorenko2018-12-19 11:14:49
Yandex maps
DeniSidorenko, 2018-12-19 11:14:49

How to put a new Yandex map marker?

Good afternoon, there is now a new marker in the Yandex map.
V6I8mr-AW0GAMaz7I_GgQMHocct_mCEfakKuXznF
But when I insert the map into my site (Through the API, the old marker goes)
cdhoiiHK05e8PLRcuvre4GjnNjItWG38V7ta6Tum
Here is the map code itself

var myMap;
  var myPlacemark;
  var init = function init() {
    myMap = new ymaps.Map("map", {
        center: [57.652607, 39.830922],
        zoom: 17,
        controls: []

    });
    myMap.behaviors.disable('scrollZoom');
    myPlacemark = new ymaps.Placemark([57.652607, 39.830922], {
        hintContent: ''
    }, {
        iconLayout: 'default#image',
        // Custom image for the placemark icon.

    });

    myMap.geoObjects.add(myPlacemark);
  
  };

    ymaps.ready(init);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2018-12-19
@DeniSidorenko

There is no documentation in the documentation https://tech.yandex.ru/maps/doc/jsapi/2.1/ref/refe...
Who prevents you from setting your own icon?

var myPlacemark = new ymaps.Placemark([55.76, 37.56], {}, {
    iconLayout: 'default#image',
    iconImageHref: '/maps/doc/jsapi/2.1/examples/images/myIcon.gif',
    iconImageSize: [30, 42],
    iconImageOffset: [-3, -42]
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question