Answer the question
In order to leave comments, you need to log in
What is the best way to organize the construction of maps with more than 1000 points?
I am making a site that will use maps, on which the number of points (markers) will reach a thousand or more. Each time to make a selection from the database and build a map - probably it will be possible to hang yourself. I'm thinking of generating an XML file from the crown and building a map from it. But maybe there are more elegant ways to reduce the load on the site and beautifully cope with this task? Please advise.
Answer the question
In order to leave comments, you need to log in
There will be no difference between "take from file" and "take and bases" in terms of speed. From base it can even be faster.
But what you really need is Radish .
Radishes and some prepared xml are superfluous, here are some tips:
1. Make something like a small api that will return a json array of points for the map (of course, not all at once, but with some kind of pagination) in response to ajax -request, and correctly cache it.
2. When using a map, you need to take into account a large number of points (at least you can use clustering).
3. Yandex.maps has a special object manager that supports a large number of points (in one of the projects I displayed 7000-10000 points without noticeable slowdowns on the client), Google maps most likely also has similar mechanisms.
4. If there are a lot of points, then you can additionally display only those that fall into the visibility area.
As for xml, this is a 100% losing solution, since xml needs to be parsed every time. Xml is good for transferring data between systems, especially when the format is complex.
An important point, how often does the data change? It will depend on how exactly to store it.
On the account of how to give data, the correct option has already been said, json in portions.
and how does the request for taking 1000 points differ from any other request?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question