views:

74

answers:

2

Hello, my problem is with XXk (aka XX000) markers, atm I have 7k markers and will be more, and more, problem is in marker database, because atm this is 4MB (link to my DB http://tinyurl.com/ybau9ce) and problem is, how load that fast? for example DOWNLOAD only this what are show now, DOWNLOAD because load I have with ClusterMarker and problem is not with java but with download that database I think...

A: 

Why would you want to download all that data at once? You cannot visualize 7K markers at once on a map imo. I don't know what the goal of your question is, but I would have only the data uploaded that is in focus, e.g. on display and visible.

Hennie
http://www.youtube.com/watch?v=sE3MKshpjJk -- that is how it look, I just don't know how load markers dynamic, only that what are show atm
Adam
+1  A: 

http://code.google.com/apis/maps/documentation/overlays.html

find the part about the marker manager

quote from that "The manager monitors the map's current viewport and zoom level, dynamically adding or removing markers from the map as they become active."

dynamicly doing this would require a database with all the markers.

Theres a good explanation on how to do that on the link under here.

code.google.com/apis/maps/articles/phpsqlajax.html (im not allowed to send more links :-( )

you are able then to dynamicly generate those markers that are in the boundaries of the current zoom. There will be some events after zooming or moving the map and you can then trigger on that and find out the boundaries of the current view.

Would that be helping solving it?

Hennie
http://pastebin.com/raw.php?i=rXrANiv0 // characters limit @ stackoverflow
Adam
but that dont load dynamic too, because that is same as I have now... $query = "SELECT * FROM markers WHERE 1"; ----- and ------ for (var i = 0; i < markers.length; i++) --- that will return all markers, I have it now, problem is with download them all, so that need made dynamic query for only that what I see
Adam
ye thats the example there. the example takes all its just an example. what you have to do is change that query in what comes back after zoom and only get in a subset of the sql database depending of how the map is zoomed and wher it its boundaries are
Hennie