S
S
Sergey2016-09-15 13:53:06
JavaScript
Sergey, 2016-09-15 13:53:06

How to implement the display of selected objects on the Yandex map?

There are a number of selects

<select class="kino" name="kino1" >
<option disabled="" selected="" value="0"> Выберите </option>
<option data-marker="53, 27"  value="1">Название 1</option>
<optiondata-marker="55,55" value="2">Название 2</option>
</select>

<select class="kino" name="kino2" >
<option disabled="" selected="" value="0"> Выберите </option>
<option data-marker="56,56"  value="3">Название 3</option>
<option data-marker="65,65" value="4">Название 4</option>
</select>
// data-marker - координаты.

Task:
Display on the map only objects selected from the list (if you select another object in the list, the previous mark should be removed), set the center of the map so that all marks are visible.
In theory, I see it this way - when selecting an item - add it to the collection, display the collection and center it.
In practice, I have no idea how it will be)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question