On Oct 15, 6:36 am, Francesco <[EMAIL PROTECTED]> wrote:
> Thanks Larry.
>
> I would shortest driving distance, but if it is hard to find, closest
> point is fine too.

You may want to find the 4 or 5 closest points, then refine using
driving distances (if the extra time is worth it)

> There is a procedure to place the marker in an array, if they are
> already placed into the map?

To do it in the API you would probably need to export your markers
from MyMaps as KML then use one of the third party parsers (EGeoXml or
GeoXml) which exposes the array of markers.

> Also, distanceFrom works only with GLatLng class?

Yes.  As it says in the documentation.

  -- Larry

>
> On 15 Ott, 15:19, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Oct 15, 5:34 am, Francesco <[EMAIL PROTECTED]> wrote:
>
> > > Hi!
> > > Sorry for my bad english, I'm an Italian student.
> > > I would know if there is a way (API) to find the nearest marker
> > > (placemark set in MyMap) from the departure address (so if departure
> > > address is set into the map, the method returns the nearest
> > > placemark).
>
> > Yes.
> > Do you want shortest driving distance or closest point?
> > How many markers do you have?  If you have a lot and a database, you
> > may want do do some of the work on the server.
>
> > General concept, assuming an array of markers, iterate through the
> > array, find the point with the smallest value of .distanceFrom the
> > departure address.
>
> >   -- Larry- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to