B
B
BMaks_N12019-03-02 04:09:39
API
BMaks_N1, 2019-03-02 04:09:39

Are there any examples of how to draw data on google maps?

There is data, you need to throw about three hundred markers on the map, each marker has about 5 fields with data, you need to hang an event on each marker in which something happens (let's just display all the data about the marker in the console),
now I'm in in the loop I throw all the markers on the map, okay, everyone has data, but when I hang up an event, something obviously goes wrong) and after one triggers, the map somehow lags) are there any examples?) or some ideas how everything is better to announce it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Bay, 2019-03-02
@kawabanga

1) https://habr.com/ru/post/334644/ marker clustering.
2) draw only those markers that are on the map at one time.
PS - 300 markers are trifles. look in the examples to google docs, there are examples with events.
Here are two tracks, one has more than 10K markers with events simultaneously on one map. yes lies. but all events are rendered without problems. This is for testing a mobile application, not for work.
BXgNo2_4O9I.jpgkr4SLAn2tYo.jpg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question