S
S
Sergey Alpeev2014-08-23 09:36:29
JavaScript
Sergey Alpeev, 2014-08-23 09:36:29

How to set a custom label style as a picture on a Yandex map?

Good afternoon, I know for sure that this can be done, but I just can’t find it for Yandex API 2.xx ^ thanks in advance

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Petrov, 2014-08-23
@QTnub

How to asynchronously change the picture of a marker on Yandex maps?

A
Alexey Skahin, 2014-08-23
@pihel

I copied from the working draft, I hope it's clear.
Tag icon:

var properties_dot = {
          balloonContentHeader: '', balloonContentBody: '',
          hintContent: "",
          iconContent: ""
      },
      options_dot = { balloonCloseButton: true,
                  iconImageHref: '/upload/uf/c27/green_social.png',
                  iconImageSize: [30, 31],
                  iconImageOffset: [-3, -31]      };
      placemark[0] = new ymaps.Placemark([59.194265, 39.912287], properties_dot, options_dot);

Label cluster icon:
var clusterIcons = [{
                href: '/upload/cluster.png',
                size: [33, 33],
                offset: [-16, -16]
            },
            {
                href: '/upload/cluster_big.png',
                size: [47, 47],
                offset: [-23, -23]
            }
        ];  
  var clusterNumbers = [100];
  var cluster = new ymaps.Clusterer({clusterIcons: clusterIcons, clusterNumbers: clusterNumbers });

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question