Answer the question
In order to leave comments, you need to log in
How to change the properties of a label applied to a Yandex Map via the API?
Using the API, I add a lot of Placemarks to the map:
myMap.geoObjects.add(myPlacemark);
I need to change the property of one of these marks. Tell me how to access the label, knowing its coordinates?
Answer the question
In order to leave comments, you need to log in
I decided. In short:
1. Added all the tags to the collection, when adding, writing to a separate array which element corresponds to which ID (start from 0, increase by 1)
2. Add it to the map
3. When editing tags in the collection (referring to the collection variable, and not to the map variable), the changes are immediately reflected in the map.
For example:
where map_orgs is the name of the collection.
Here we take the collection element with id=5 and change the preset option.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question