I'm loading them by a JSON file. So I doesn't have a server side script to generate just a piece of markers.
Ok, I understand, If the JSON file it's sorted by a distance to a point, maybe I can process faster my markers. (stopping when a cell is outside the bounds). So I have to sort the markers in the JSON file first, and each moveend event start by an index and stop in another. I can not post the link yet, sorry. thanks again marcelo. that's very helpful for me. On 16 oct, 13:49, marcelo <[EMAIL PROTECTED]> wrote: > In this example:http://maps.forum.nu/gm_array_sort.html > > they are sorted by proximity to a "base", but the main question is how > are you loading them? > You haven't posted a link so there's not much else I can speculate > about. (See the group's posting guidelines) > > -- > Marcelo -http://maps.forum.nu > -- > > On Oct 16, 1:15 pm, Lluís <[EMAIL PROTECTED]> wrote: > > > > > Ok, I will try ... but I'm think that a sorted array solution maybe > > can help me to process the markers faster. > > Do you know any way to do so? A sort by latitude or longitude? By > > tiles? > > > On 16 oct, 13:09, marcelo <[EMAIL PROTECTED]> wrote: > > > > On Oct 16, 1:04 pm, Lluís <[EMAIL PROTECTED]> wrote: > > > > > Hi Marcelo, > > > > > Thank you, but I think that this way is slow as well. I would like to > > > > reduce the amount of markers to process. > > > > So, to do your approach I have to loop all the markers, and I have > > > > thousands... > > > > Your question was; > > > "Is there any function that > > > gives me the current markers inside the viewport? This functions loops > > > for all the markers or it makes any optimization? " > > > > If you load all markers in an array, looping through them is nowhere > > > near as slow as displaying them. > > > If you don't want to load them all, then you need to send the bounds > > > of the map to the server, and have the server return only the relevant > > > markers. > > > > -- > > > Marcelo -http://maps.forum.nu > > > --- Ocultar texto de la cita - > > - Mostrar texto de la cita - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
