On Mar 23, 6:23 pm, Andrew <[email protected]> wrote: > I want to add a search function to this Google Map, it reads the > markers from a Database via an XML file. Just wondering what the > easiest way to do this would be. I want to be able to search for a > street name and show the closest markers to that street.
On option would be add a form to let the user enter an address. Send that address to the geocoder. Save your markers in an array when they are created from the xml, process through the array of your markers, minimizing the value of GLatLng.distanceFrom(GLatLng): where one GLatLng is the value returned by the geocoder, the other is that of each of your markers. Alternatively, you could do the same calculation server side and just return the markers that meet some criteria. Not sure what the "easiest" way is, depends on your skill set. -- Larry > > http://andrewmccrum.com/maps/database/ -- 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.
