The simplest way I have found to do this is to get the Marker a unique identifier that I have specified in the Title of the marker.
Then on the event you simply call the .getTitle() for the marker and then you can update your position in your array accordingly. For example, you can have zones that identify each marker. When I create the marker I set the marker's title to the zone id for that marker and store it in my array that keeps track of the zones in the position of the zone id. For example: MarkerArray[ZoneID] = myMarker; Now I keep tabs of the position of my markers in a similar manner: MarkerLatLng[ZoneID] = positionOfMarker If you keep your coordinates in an array in a similar method such as this you can call the marker's title and use that to update the position in your array without having to cycle through long arrays to find the one you are trying to update. That help any? On Tue, Jun 15, 2010 at 11:40 AM, runtime <[email protected]> wrote: > Hi Rossko, I do not understand what you mean, let me give you an > example: > > First time, user selects some filter criteria from database and this > makes a query that gives the following: > > RT0001, x, y > TC-015, x, y > JF-85B, x, y > > RT0001, TC-015 & JF-85B are the Ids of salesman people and x,y are > actual coordinates, the coordinates are then updated in the dabase > randomly. I would like to update the map coordinates as they enter > into the server. > > Of course, queries can be as long as 50 or 60 Ids...So, I dont want to > requery and remake the whole array of markers, every time that one or > two coordinates change, I would like just to update the coordinate of > the Id that moved without walking the array to check its Id... > > Please advice > Best Regards > > > > > On 14 jun, 17:59, Rossko <[email protected]> wrote: > > > RT0001, TC-015 and JF-85B are the Ids on the database and x,y are the > > > new coordinates.. > > > > Is there some reason you can't produce an array keyed by your database > > IDs? (Perhaps they're not unique) > > -- > 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]<google-maps-api%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-api?hl=en. > > -- 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.
