Circle class

84 views
Skip to first unread message

Gregory Herman

unread,
Feb 13, 2011, 8:23:36 PM2/13/11
to google-map...@googlegroups.com
I'm trying to figure out how the Circle class works because I would like to express the fillOpacity of a Circle as a function of theta (the arc angle relative to due north) and another variable (var b), so that the opacity will be 1 from theta = 0 to theta = pi/2 (90 degrees) and 0 otherwise if b is a certain value, the opacity be 1 from theta=0 to pi and 0 otherwise if b is a different value, have the opacity be 1 from theta=0 to 3*pi/2 and 0 otherwise if b is a different value, have it be 1 always if b is a fourth value, and have the opacity be 0 always otherwise.  Is this possible or will I have to attempt to figure out an alternative?  The other option I can think of is just drawing quarter-circles, half-circles, etc., but I don't see an easy way to do this without making a many-sided polygon which approximates a circle (unless there is an easy way to draw an arc some other way).  Any insights would be helpful.  Thank you in advance.

Rossko

unread,
Feb 14, 2011, 5:07:53 AM2/14/11
to Google Maps JavaScript API v3
> I don't
> see an easy way to do this without making a many-sided polygon which
> approximates a circle

I think that is what you'll have to do. A Circle object has a single
fillOpacity,
and you seem to be describing some graduation scheme?
Drawing circles is straightforward
Example constructed in v2 API
http://esa.ilmari.googlepages.com/circle.htm
Reply all
Reply to author
Forward
0 new messages