The growth of the audience of Internet users and Internet projects takes geo-services to a new level.
If earlier most of the projects with the use of "maps" were operated with tens and hundreds of points, now we are talking about hundreds of thousands of points.
The article will discuss several user cases for geoservices and how to implement them for google API 3 and the new yandex API 2.

Show up to 100 points.
The most common use case is to map the addresses of the company's offices. Usually - up to a couple dozen.
Implementation - the most simple, "boxed". We will not dwell on it. Both
yandex and google do an excellent job with this task, without overloading either the developer or the user.
From a few hundred to one or two thousand points.
The method of implementation depends on the density of points.
')
Yuzkeys 1: reference books on narrow topics (for example, “all banks of Moscow”), etc.
For example, if we take “all banks of Moscow” with 2000 points (conditionally), then the density will be quite large. In one average zoom viewport, almost all 2000 points will be displayed. In this case clustering of points will help. For Google, there are several free libraries for clustering (for example, MarkerClusterer), and in the new API from Yandex, clustering is integrated into the API and can be easily connected with several lines of code. And although in the Yandex API the default cluster view can be an ambiguous issue, almost everything can be customized.
The main disadvantage (as well as plus) of this method of implementation is that all data must be loaded simultaneously. From here, the user who waits for loading of the card suffers, but the admin is happy, looking at the load on the server.
Point filtering is also easy on the client.
Yuzkeys 2: points distributed over a large area
If the points are distributed over a large area (for example, "Shops Sportmaster in Russia"), then it would be logical to make a menu with a choice of a city, or a separate map (non-interactive) with marked cities. By clicking on the city show an interactive map with tags. Clustering with this approach may not be necessary, it is enough to hang a listener on the zoom change event, which brings up the city selection menu on reaching a certain minimum zoom.
With so many points, both APIs cope normally, without large brakes. The advantages of Google include a less contrast map, on which your markers will be better visible. Advantages of Yandex are a more accurate (according to rumors) map and a larger number of rendered cities in Russia.
Both Google API 3 and Yandex Api 2 use canvas, that is, drawing labels directly on the client (although for Yandex this should be specifically included).
Now about a toothache in the heart - ie. A huge number of dom-elements (and for each point there are 3-4 objects). When the number of objects reaches 2000-3000 - this kills the browser.
The only possible crutch could be FlashCanvas. When using it on ie, very good results were obtained, but still it wasn’t without “jambs”.
Many, many points
There are several ways to implement it.
Method 1.
Use the clustering service, for example:
v2.maptimize.comExpensive, ugly, and in general - not our method.
Method 2
Make your own server drawing tiles.
Use a bunch of PostGIS + Tirex + Mapnik2 + Mod_tile + Nginx
Everything is very fast, but there are only a few significant limitations:
1. Update. When adding / removing points you will have to re-draw a lot of pictures. Usually, this is done by removing outdated images from the cache, and the happy user, who was the first to decide to see this part of the map, is waiting for the missing tiles to be drawn. I was able to draw up to 100 tiles per second with 200 dots on each on the Xeon Quad-Core. Therefore, with infrequent updates, all is well.
2. The impossibility of filtering.
Yes, you can draw several sets of tiles. But in any case, with the number N of categories, you:
a) must do N sets of tiles
b) you will not be able to show several categories at once (theoretically, it is possible to make several layers, but it turns out badly due to the imposition of shadows on each other and an increased load time).
Conclusion: this method is suitable for sets of the same type of data without the possibility of filtering. For example - "all branches of the Russian Post."
Method 3.
Draw tiles on the fly.
The meaning of the method is to keep frequently used sets of tiles (without filtering, with filtering by main categories) - in the cache. And to draw complex filters (for example, “Sberbank” ATMs + “VTB” ATMs) on the fly. In this case, the size of the label can be made at least 5x5 and scatter them all over the map. Clustering becomes unnecessary here.
The method requires little programming and a lot of hardware. That is, there are few bugs and good stability at high costs for iron. One "graphic" server will be able to serve 100-200 simultaneous connections.
Method 4.
There is another way - combined - allowing you to display a lot (up to 10,000) per region / city. I will tell about it in the following article.