[[+content_image]]
K
K
Kirill Michenus2018-02-08 16:16:07
Yandex
Kirill Michenus, 2018-02-08 16:16:07

How to set shape dimensions in presetStorage, etc. for Placemark?

More specific question:
There is a Placemark , it is given preset: 'custom#mypreset'
in the code

MyCircles = ymaps.templateLayoutFactory.createClass '<div class="myicon">$[[options.contentBodyLayout]]</div>'
ymaps.option.presetStorage.add 'custom#mypreset',
      hintLayout: null
      iconLayout: MyCircles

how in ymaps.option.presetStorage.add to set the dimensions of the html block height, length, offset, etc.?
Is it possible to set label width to auto?

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
K
Kirill Michenus, 2018-02-09
@michenusweb

Decision:

ymaps.option.presetStorage.add 'custom#mypreset',
      hintLayout: null
      iconSize: [66, 26]
      iconOffset: [-16, -23]
      iconShape: {
        type: 'Rectangle',
        coordinates: [[-16, -26], [50, 0]]
      }
      pane: 'overlaps'
      iconLayout: MyCircles

Those. added pane: 'overlaps' Other settings as described in the documentation.
This is what I need, as I create my own interactivity.
https://tech.yandex.ru/maps/doc/jsapi/2.1/ref/refe...
'overlaps': pane.MovablePane (zIndex: 600) - pane for objects that do not require the use of hotspots to implement their interactivity ;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question