In the following example the markers are loaded from a JSON.
If there are 20,000 markers the JSON is going to be quite big.
Is there any way to send different JSON files according to zoom level instead of sending one huge array?
http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/release/examples/weather_map.html
2048 characters in URL is just under 100 GeoCode values. So, again no more than 100 markers.
Follow the below steps and add/show multiple markers on google maps using javascript with infowindows: Step 1 – Create HTML File For Display Multiple Markers. Step 2 – Add Google Maps API V3 in HTML. Step 3 – Implement JavaScript Function To Create Markers/Pins And Show on Google Map.
There's the notion of a "bounding rectangle" for a map view. The map api supplies this to you as two lat/long coordinate pairs - one for the SW corner, and one for the NE corner.
So if you have a custom data service that returns JSON points, you'll need to accept these coordinates as input, and adjust the returned dataset accordingly (most likely as a WHERE clause in your SELECT statement).
I don't have the details of getting this bounding rectangle memorized, but that's what API docs are for.
There is a new library called MarketClustered that will help you
(source: googlecode.com)
Even if the data is too big, I think that will be better to feed the map will all the data, and let it do it's thing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With