V
V
Vladislav2016-12-15 15:05:36
API
Vladislav, 2016-12-15 15:05:36

How to set up balloon output in Yandex Maps API?

How to set up the display of a balloon in a block, like here https://tech.yandex.ru/maps/jsbox/2.1/balloon_and_hint ?
Those. it is necessary that it does not float at the mark, but that it can be pressed to the edge (bottom or right).
Now objects are added using ObjectManager https://tech.yandex.ru/maps/jsbox/2.1/object_manager

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nicholas, 2016-12-15
@healqq

This is such a mobile optimization on a small scale.
You can do this with a custom balloon:
https://tech.yandex.ru/maps/jsbox/2.1/balloon_autopan
By analogy with this example.
Ps I would do it the other way:
make the block fixed/absolute positioned and change its content on the objectManager.objects.click event. Then you don't have to do layout.

V
Vladislav, 2016-12-27
@MacLaud

The second option is probably easier.
You need:
1. Load everything on the card - you're done.
2. Click on the balloon and prevent it from showing - not sure how.
3. Get the content of the balloon (as I understand it, there is something similar here - https://tech.yandex.ru/maps/jsbox/2.1/object_manag... )
4. Transfer the received content to your container (it's clear here)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question