WPF - Polygons

Topics: WPF
Sep 6, 2011 at 5:49 PM

Hello maps Master!

I'm trying to insert an polygon on my main map in an WPF version of the GMaps, but unsuccessfull.

When I try to use the polygon list availiable on the GPMarker its tell me that is an read only property.

Any ideas?

 

Tanks in advance.

 

 

 

 

Coordinator
Sep 6, 2011 at 7:55 PM

add points to that list and call RegenerateShape

Sep 6, 2011 at 10:05 PM

I'm trying to do it for 4 days, download 3 versions... sorry if I'm a little noob on this..

Any chance that you cut and paste some exemple?

 

 

Tks.

Coordinator
Sep 7, 2011 at 6:49 AM

GMapMarker m = new GMapMarker(new PointLatLng());
m.Polygon.Add(new PointLatLng(54, 25));
m.Polygon.Add(new PointLatLng(54, 50));
m.Polygon.Add(new PointLatLng(30, 60));
m.Polygon.Add(new PointLatLng(-30, 40));
m.RegeneratePolygonShape(MainMap);
MainMap.Markers.Add(m);