Geoshape using coordinates

320
1
01-30-2023 03:24 PM
CherylWheeler11
New Contributor III

Hi,

Is it possible to allow a user to input coordinates to define the vertices of a geoshape question, rather than draw it on the map using the vertex or sketch methods? Are there any sample Javascripts out there at all?

Thanks very much for any pointers.

 

1 Reply
BarbaraWebster1
Esri Regular Contributor

Hi @CherylWheeler11,

You can construct a geoshape from a geopoint question in a repeat using the sum() function. You could populate each geopoint either by placing it on the map or calculating it based on coordinate questions. The coordinates need to be space-separated latitude and longitude values in decimal degrees. See attached for an example.

The Lines and Polygons sample available under Esri Samples in Conenct also has some examples of calculating a geoshape with a series of coordinates. 

-Barbara







0 Kudos