in arcgis javascript api how to check whether given xy coordinated lies inside a imported web map (imported from arcgis online)? i know that there is a method in polygons to check point lies inside a polygon. but how to convert a web map to a polygon????

842
1
03-31-2018 09:09 PM
gaveenkith
New Contributor

in arcgis javascript api how to check whether given xy coordinated lies inside a imported web map (imported from arcgis online)? i know that there is a method in polygons to check point lies inside a polygon. but how to convert a web map to a polygon????

Tags (1)
0 Kudos
1 Reply
XanderBakker
Esri Esteemed Contributor

Your webmap | ArcGIS for Developers will have a property called extent | ArcGIS for Developers that will provide the default extent:

You can use the coordinates to create a polygon: Geometry objects—Common Data Types | ArcGIS for Developers and do your validation. 

https://developers.arcgis.com/web-map-specification/objects/webmap/