On Aug 22, 7:22 am, Joseph Elfelt <[email protected]> wrote:
> On Aug 21, 5:02 pm, Dronnikkl <[email protected]> wrote:
>
> > * how to determine where to insert it in array?
>
> I have both a markers array and an MVC array.
> The MVC array has the polyline going from marker to marker.
>
> I assigned each element in the marker array a property which contains
> the index value in the MVC array for the corresponding node.
> Something like:
> marker[i].mvc_index = j;
>
> To insert a node into the MVC array after marker[i]:
> path_var.insertAt(marker[i].mvc_index, position);
>
> In other words, your code has to keep track of the relationship
> between (1) markers and (2) nodes in the MVC array.
>
> Larry is right.  It does take a bit of work.

Bill Chadwick's extension to the v2 API has a Bill Chadwick has a
Distance Point to Polyline function:
http://www.bdcc.co.uk/Gmaps/BdccGmapBits.htm
that actually calculates all the information you need.

http://www.geocodezip.com/v3_example_polylines_addpoint.html
(modified from one of Pil's examples on http://wolfpil.de since you
haven't provided an example of your map)

  -- Larry

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to