WPF Polygons with holes

Topics: WPF
Jan 24, 2012 at 4:46 AM

Does anyone out there have code they could share for creating custom polygons with holes in them for use with the WPF version of GMap?

What I'm trying to do basically is highlight a US state by darkening the surrounding states.  I've done this in Google Maps Javascript API by creating a polygon with two paths (one that creates a large square to darken the overall region, and a second going the reverse direction that outlines the state needing highlighting).  Has anyone attempted something like this with Great Maps?

Feb 26, 2012 at 12:42 PM

need same feature!

Feb 26, 2012 at 12:48 PM

i need house with big windows too ;} ..and a nice view would be great

Feb 27, 2012 at 12:54 PM
radioman wrote:

i need house with big windows too ;} ..and a nice view would be great


Feb 29, 2012 at 8:48 AM

So you're saying that it is not possible to do this with Great Maps?  Can you elaborate?

Feb 29, 2012 at 8:51 AM

it has nothing to to with control itself, if you can generate shape with holes in wpf, thats the only question

Mar 1, 2012 at 11:32 AM

I think this is probably possible, but you would to do a bit of coding to make it work... I think what you would need to do would be to treat the hole as a separate polygon. Then you would need to have something within the tag of both the outer polygon and inner polygon to tell each that they are related so that when either is clicked on they behave properly. Then if you are storing these in a database, you would need an attribute such as Parent ID so you could chain them together. If you take this to it's logical conclusion, if you are putting a hole in the polygon then in theory, you then might want to create an island within the hole which is part of the outer polygon and so on. Storing the Parent ID's within the Tags would probably be the way to go with this...

Mar 1, 2012 at 11:42 AM
Edited Mar 2, 2012 at 7:13 AM

probably ;}

p.s. -> http://www.google.com/search?client=opera&rls=en&q=wpf+hole+in+polygon&sourceid=opera&ie=utf-8&oe=utf-8&channel=suggest