Save polyline in Archive

375
0
11-18-2016 11:39 AM
joelbarcenas
New Contributor

Hi, I'm Trying to save a polyline in any type of archive (Json,txt.. etc.) in order that when I need it, just serialize the archive as an object type Polyline, any ideas?

Thanks for reading

Here's my actual code.

Dim myPart As List(Of Esri.ArcGISRuntime.Geometry.MapPoint) = New List(Of Esri.ArcGISRuntime.Geometry.MapPoint)
myPart.Add(New Esri.ArcGISRuntime.Geometry.MapPoint(25.693752, -100.295526))
myPart.Add(New Esri.ArcGISRuntime.Geometry.MapPoint(25.694342, -100.295251))
myPart.Add(New Esri.ArcGISRuntime.Geometry.MapPoint(25.692744, -100.295641))

'I want to save my object myPolyline'
Dim myPolyline As Esri.ArcGISRuntime.Geometry.Polyline = New Esri.ArcGISRuntime.Geometry.Polyline(myPart)


Dim distance As Double = Esri.ArcGISRuntime.Geometry.GeometryEngine.Distance(myPolyline, New

Esri.ArcGISRuntime.Geometry.MapPoint(25.684215, -100.296886))
distance= distance* 100000
Console.WriteLine("The distances is: ")
Console.Write(distance)

I create a polyline with given points, and I obtain the distance between two geometries, in this case, the polyline and a point. in Km. 

0 Kudos
0 Replies