Select to view content in your preferred language

How To Create Drawings From the Geometry API??

374
1
04-11-2023 02:16 AM
IzzanFuad
New Contributor

Hi, I'm trying out the Geometry API for ArcGIS and noticed that it will not result in any drawing only points. Is there an example on how to draw basic like Rectangle, Triangle, etc on the Map's mesh??

 

I'm asking this because on InfinityCode OnlineMaps there's a drawing feature straight into the map's mesh

0 Kudos
1 Reply
Jade
by Esri Contributor
Esri Contributor

hi! The geometry API provides the methods to do analysis (the backend calculation stuff). The actual drawing and rendering will be done with Unity's API since that's what game engines are specialized in.

If you just want to draw rectangles and triangles you may not need the geometry API, as long as you know the lat long or the world transform of the vertices, you can draw them with Unity's API. For example, drawing triangle: https://docs.unity3d.com/ScriptReference/GL.TRIANGLES.html

If you do need to utilize the analysis function of the geometry API, please checkout our measurement sample https://developers.arcgis.com/unity/sample-code/Measure/ to see how you can show results of the geometry API (in this case, calculate distance between points and render a line between them).

To see the geometry API and its capability, you can check the geometry  API reference https://developers.arcgis.com/unity/api-reference/ (left side, under the geometry category.)

0 Kudos