This one is a bindTo Solution.

http://gmaps-utility-gis.googlecode.com/svn/trunk/v3test/mvc/poly_bind.html

I was a little surprised that it worked because the 'draw' method on
Polyline is obfuscated and I thought I have to find a way to trigger
the 'get' method on the MVCArray, so some event can trigger the poly
redraw (MVCArray length change would be an example).

However to my surprise the direction of bindTo is somewhat flexible
and it actually worked when I bind the marker to MVCArray, instead of
the other way back. Do sure if it is by design or just happen to
worked on this version.

The idea is using instance method to overwrite prototype method.



On Jul 21, 10:27 am, Joseph Elfelt <josephelf...@gmail.com> wrote:
> Here is my 
> solution:http://www.mappingsupport.com/forum_post/drag_marker_and_line.html
>
> Click a few times to draw a line.
> Drag a marker and the line follows the marker.
>
> The polyline is an MVCArray.
> I wish it was possible to use the bindTo feature to link the positions
> of my markers to the positions of the polyline nodes.

-- 
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 google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to