Overlapping polygons/rectangles/circles *without* alpha combining

765 views
Skip to first unread message

Rich Christiansen

unread,
May 4, 2011, 9:02:02 PM5/4/11
to google-map...@googlegroups.com
Hello, all!

I'm working on an app that uses circles emanating from points of interest to show "coverage" for the areas.  When two coverage circles overlap, their opacities combine to occlude the underlying map even more.  For example, let's say I'm using an opacity of 0.25 to draw red circles.  If they overlap a fair amount (such as in a Venn Diagram), then eventually there's an area at which these circles all intersect that ends up with an opacity of what seems to be approaching 1.0 (I'm left with opaque red at this intersection).  This is sub-optimal for me, since I need the map to remain visible beneath the circles.

Is there any way to draw polygons, rectangles, and circles without this alpha-combining functionality?  What I'm attempting to do is to draw all shapes without borders so that when they are drawn, the resulting shape has an opacity of 0.25 *throughout* instead of varying opacity.

Interestingly enough, it seems that this is what v2 seemed to do by default - I've taken a screenshot of a an example of what I'm trying to do.  Note, this is in v2, but my target is v3 - http://img23.imageshack.us/i/screenshot20110504at655.png/ .  Notice how the intersection of the two red circles is not darker than the non-intersected portions.

How can this be done in v3?  My best guess is to draw the shapes with an opacity of 1.0 and then change the opacity of the entire overlay to be 0.25, thereby yielding the result I'm looking for.  However, I don't know how to do this...  Also, could there be a better way?

Thanks so much, everyone! :)
-Rich

Rich Christiansen

unread,
May 6, 2011, 5:29:14 PM5/6/11
to google-map...@googlegroups.com

Chris Broadfoot

unread,
May 6, 2011, 7:13:35 PM5/6/11
to google-map...@googlegroups.com
You could draw many tori:
--
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-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.



--
http://twitter.com/broady

Rich Christiansen

unread,
May 7, 2011, 3:06:54 AM5/7/11
to google-map...@googlegroups.com
First off, apologies for the multi-post.  For some reason, my subscription to this group is quite unpredictable.

Chris, I'm not sure how drawing tori would help in this situation.  Can you explain a bit more?

Thanks! :)
-Rich


J.B. Hansen

unread,
Jul 22, 2011, 1:00:20 PM7/22/11
to google-map...@googlegroups.com
Did you ever find a solution to this problem? I'm try to make a heat map of sorts and it would be great if my users could SEE what was underneath the circles.
Reply all
Reply to author
Forward
0 new messages