private static VectorItem CreateVector(GeoGeometryRecord record) { VectorItem vector; switch (record.Geometry.Type) { case GeoGeometryType.Point: case GeoGeometryType.MultiPoint: vector = new C1.Win.Map.VectorPlacemark(); break; case GeoGeometryType.Polygon: case GeoGeometryType.MultiPolygon: vector = new VectorPolygon(); break; case GeoGeometryType.LineString: case GeoGeometryType.MultiLineString: vector = new VectorPolyline(); break; default: return(null); } vector.GeometryData = WkCoder.ToBase64String(record.Geometry, WkCoder.WkbByteOrder.LittleEndian); return(vector); }
private void AddMark(double lon, double lat) { var mark = new C1.Win.Map.VectorPlacemark(); _layer.Items.Add(mark); mark.Geometry = new GeoPoint(lon, lat); mark.Marker.Size = new SizeF(20, 27.32f); mark.Marker.Shape = MarkerShape.Custom; mark.Marker.CustomShape = new MarkShape(_index++); mark.Style.Stroke.Color = Color.DarkGray; mark.Style.Stroke.Width = 1; mark.Style.BackColor = GetRandomColor(128, 192); }