[Google Maps API v2] Re: toggling arrowheads along with polylines
> I think I have the div issue sorted - I would be interested to hear if
> you are still getting no sidebar.
Now have a sidebar in FF2. It's a bit narrow on my screen, but
useable.
> As for the other, larger question, I appear to have had a very minor
> amount of success... now toggling a line off removes one arrowhead
> from the map (different arrowheads depending on the line that you're
> toggling, but unfortunately both from the same line)...
Your code passes an argument with the value of 'poly_num' to
midLineArrows(), which in turn passes it to createArrow().
createArrow() ignores that and does nothing with it.
It is creating arrowhead markers with a custom property 'mycategory',
and stores them in an array pts[]
Maybe you meant to store the poly number as another custom property on
each arrowhead.
In your togglePoly() function, you have a line
pts[poly_num].show();
This will only ever hide one arrowhead.
If you need to hide/show more than one arrowhead, you must iterate
through the pts[] array in a loop looking for the ones you want to
deal with, like in your old code that worked.
--
You received this message because you are subscribed to the Google Groups "Google Maps API V2" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home