Draw polygons using VEPolygon

Jan 19, 2009 at 12:43 PM
How would I go about writing a class that accesses the VEPolygon class. I would imagine it would have to route through the VEToken services, am just not sure how I would start. Any bit of advice would be helpful. Thanks in advance
Jan 20, 2009 at 8:01 AM
Edited Jan 20, 2009 at 8:03 AM
No, we have a much more powerful DeepEarth.Geometry.Polygon class for you to use.

Do something like this:

var shapeLayer = new GeometryLayer(MapInstance) { ID = "POLYGONLAYER" };
shapeLayer.UpdateMode = GeometryLayer.UpdateModes.TransformUpdate;
shapeLayer.Opacity = 0.4;
MapInstance.Layers.Insert(1, shapeLayer);

var points = new ObservableCollection<Point> { new Point(0, 0), new Point(20, 0), new Point(20, 20), new Point(0, 20) };
var polygon = new Polygon() { Points = points };
polygon.FillColor = Colors.Green;

Jan 21, 2009 at 2:05 PM
Ok, point taken. How would I go about setting display properties on the polygon according to the zoom level? would I have to monitor the doubleclick and mousewheel events and return the level and create and destroy accordingly? Or is there an easier way?