Wally, thanks a lot for the explanation. I've understood the algorithm and can reproduce it myself, no demo needed, thanks a lot!
On 28 апр, 22:41, Wally <[email protected]> wrote: > On Apr 28, 5:49 pm, Arech <[email protected]> wrote: > > > On 28 апр, 21:15, Wally <[email protected]> wrote: > > > > If you can live with your arrowheads sharing their color, weight & > > > opacity with the poly itself, you can incorporate the arrowheads into > > > the same poly. > > > That is ok and sounds very interesting. > > > > At each arrowhead, define two branches. One will go > > > out & back to the left. Another will go out & back to the right. > > > Then the poly will continue to the next arrowhead. > > > Mmm.... You mean to draw polyline arrows with the same polyline? Hah, > > that is nice idea, thanks a lot! > > Yes. I have figured out a way to have different colors with two > overlapping polys, one with the arrowheads, another without the > arrowheads. > > Opacity is additive. Because each branch of each arrowhead is drawn > twice in opposite directions, the arrowheads will appear to be > darker. An overlapping poly drawn in a different color can be used to > change the appearance of the main poly. Suppose the poly with > arrowheads is red. Suppose the poly without arrowheads is blue. The > combined poly will appear to be purple with red arrowheads. > > The math may be a little tricky. Convert from Lat/Lon coordinates to > pixel coordinates. Use the Math.atan2() function to determine the > angle of the poly at each arrowhead position. Add/subtract the number > of degrees required for the left branch of the arrowhead & for the > right branch of the arrowhead. Use Math.sin() & Math.cos() to convert > back to pixels. Convert from pixel coordinates to Lat/Lon coordinates > expected by GPoly. I suppose I could build a little demo if it seems > too confusing. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
