Answer the question
In order to leave comments, you need to log in
Server-side clustering of map geotags?
There is a map of Moscow, there are more than 5,000 marks on it. Of course, they do not need to be displayed in one continuous massif, but at a certain scale, adjacent labels must be combined into one with a number. How to do it through the client side - I know there are libraries, and in Google Maps this is even included in the standard part.
How to do it on the server side? There is a database with 5,000 labels, each of which has a longitude and latitude. How to merge neighboring points on the server so as not to throw out 5,000 labels to the client and merge them already there?
I looked at Google, on the request "server-based clustering of geotags", results of a completely different topic fall out
Answer the question
In order to leave comments, you need to log in
The scale grid has two drawbacks:
1) the map can look like a panel high-rise building - each cell has an aggregating marker;
2) with the accumulation of markers at the junction of cells, two aggregating markers can be obtained in close proximity to each other instead of one that would be expected there;
Therefore, for my task, I used one of the types of hierarchical clustering.
Here is how it looks
Here is a short description of the method
Take all the points and divide by the length of the grid cell. The received points are entered into the hash table and cached. For each scale, store its own table. When updating data, make changes to each table. At requests to get the data from the table depending on scale. As storage I would use MongoDB ( Geospatial Indexing )
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question