protected EnhancedMapPolygon createPolygon(IGeometry polygon, MapLayerBase layer) { var poly = new EnhancedMapPolygon { Locations = CoordinateConvertor.CoordinatesToLocationCollection(polygon.Coordinates), GeometryStyle = StyleSpecification, Visibility = Visibility }; layer.AddChild(poly, CoordinateConvertor.ConvertBack(polygon.Centroid.Coordinate)); mapObjects.Add(poly); return(poly); }
protected EnhancedMapPolygon createPolygon(IGeometry polygon, MapLayerBase layer) { var poly = new EnhancedMapPolygon { Locations = CoordinateConvertor.CoordinatesToLocationCollection(polygon.Coordinates), GeometryStyle = StyleSpecification, Visibility = Visibility }; layer.AddChild(poly, CoordinateConvertor.ConvertBack(polygon.Centroid.Coordinate)); mapObjects.Add(poly); return poly; }