Select to view content in your preferred language

Add WKT data on map in Xamarin Forms

442
1
04-20-2022 06:28 AM
PrajaktaShinde67
New Contributor

Hi All, 

We are using Esri.ArcGISRuntime.Xamarin.Forms package in the Xamarin forms application targeting iOS and Android. We want to overlay WKT data on the map which are basically polygons. 
Below is the data :

"polygon": "POLYGON ((-100.192123413086 36.2904739379883, -100.48034420703753 33.364119107746376, -101.3339304254167 30.550222452511957, -102.72007922854782 27.95692044269427, -104.58552169528778 25.68387222019009, -106.85856991779195 23.818429753450125, -109.45187192760964 22.432280950319, -112.26576858284407 21.578694731939848, -115.192123413086 21.290473937988303, -118.11847824332791 21.578694731939848, -120.93237489856234 22.432280950319, -123.52567690838002 23.818429753450122, -125.79872513088421 25.68387222019009, -127.66416759762417 27.95692044269427, -129.0503164007553 30.550222452511953, -129.90390261913444 33.364119107746376, -130.192123413086 36.2904739379883, -129.90390261913444 39.21682876823023, -129.0503164007553 42.030725423464645, -127.66416759762417 44.624027433282336, -125.79872513088421 46.897075655786516, -123.52567690838004 48.76251812252648, -120.93237489856234 50.1486669256576, -118.11847824332793 51.00225314403676, -115.192123413086 51.2904739379883, -112.26576858284407 51.00225314403676, -109.45187192760964 50.1486669256576, -106.85856991779197 48.76251812252649, -104.58552169528778 46.897075655786516, -102.72007922854782 44.624027433282336, -101.3339304254167 42.03072542346466, -100.48034420703755 39.216828768230236, -100.192123413086 36.2904739379883))",


Any help would be appreciated.
0 Kudos
1 Reply
dotMorten_esri
Esri Notable Contributor

There is no built-in support for WKT. However I did write a library a while back that can do that. It should likely still work, but might need a bit of a version upgrade: https://github.com/dotMorten/GeometryConversions

0 Kudos