The JSON-serializable polyline type.
Inheritance: JsonGeometry, IJsonGeometry
Example #1
0
 private static XElement ToKmlPolyline(this JsonPolyline shape, double z, params XElement[] extraElements)
 {
     return(new XElement(kml + "MultiGeometry",
                         shape.paths.Select(p =>
                                            new XElement(kml + "LineString", extraElements,
                                                         new XElement(kml + "coordinates", p.ToCoordinates(z))))));
 }
        private static IPolyline ToEsriPolyline(this JsonPolyline shape)
        {
            var polyline = (IGeometryCollection) new Polyline();

            foreach (var path in shape.paths)
            {
                polyline.AddGeometry(new Path().Load(path));
            }

            return((IPolyline)polyline);
        }