<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get elevation at points/paths in a polyline Sketch in arcGIS JavascriptSDK? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1491425#M84857</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/805390"&gt;@Sparkles&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you experiencing this while drawing a new line?&lt;/P&gt;&lt;P&gt;In this case the "problem" is that the elevation constraint gets applied. This makes all vertices be drawn at the elevation of the first one. You can disable the elevation constraint by enabling the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#tooltipOptions" target="_blank" rel="noopener"&gt;tooltips&lt;/A&gt;, using &lt;STRONG&gt;Tab&lt;/STRONG&gt;&amp;nbsp; to enter the tooltips' input mode, and clicking on the lock icon next to the elevation/z field. Note that this needs to be done per feature.&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html" target="_blank" rel="noopener"&gt;SketchViewModel&lt;/A&gt; documentation:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;When sketching polygons or polylines, the elevation constraint is applied by default. This means that all vertices use the z-value of the first vertex. To unlock the elevation constraint while sketching, make sure the&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#tooltipOptions" target="_blank" rel="noopener"&gt;tooltips&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;and their&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-sketch-SketchTooltipOptions.html#inputEnabled" target="_blank" rel="noopener"&gt;inputs&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;are enabled, and activate the input mode with the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Tab&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;key.&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This behavior got introduced with version 4.29 in order to unify the drawing experience of polylines and polygons. But when drawing both, it is now possible to opt-out from this planar drawing mode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps you further. Let me know in case you have any other questions.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jun 2024 09:37:54 GMT</pubDate>
    <dc:creator>GreteSoosalu</dc:creator>
    <dc:date>2024-06-13T09:37:54Z</dc:date>
    <item>
      <title>How to get elevation at points/paths in a polyline Sketch in arcGIS JavascriptSDK?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1490734#M84846</link>
      <description>&lt;P&gt;I want the natural elevation at each point in a polyline (using SketchWidget in arcGIS SDK for Javascript). For example if the polyline runs over a mountain , I'd want the z values of each point in the polyline to be different, to reflect the natural elevation&lt;/P&gt;&lt;P&gt;I tried changing the elevationInfo mode of the GraphicsLayer for the SketchWidget to all of the possible settings.&lt;/P&gt;&lt;P&gt;With "absolute-height" - the elevation of the first point in the polyline is set as the z value of all the points (even though the elevation changes as my polyline runs over mountains)...&lt;/P&gt;&lt;P&gt;With "relative-to-ground", "relative-to-scene", and "on-the-ground", the z value of each point is 0. (Which makes sense, as it is giving the altitude RELATIVE to the terrain...)&lt;/P&gt;&lt;P&gt;No option seems to give the natural terrain elevation at each point.&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 16:33:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1490734#M84846</guid>
      <dc:creator>Sparkles</dc:creator>
      <dc:date>2024-06-12T16:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to get elevation at points/paths in a polyline Sketch in arcGIS JavascriptSDK?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1490747#M84847</link>
      <description>&lt;P&gt;Also, is there a callback that gets triggered at each point in the polyline? Sketch.on("create") only gets triggered at the first point. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 16:35:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1490747#M84847</guid>
      <dc:creator>Sparkles</dc:creator>
      <dc:date>2024-06-12T16:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get elevation at points/paths in a polyline Sketch in arcGIS JavascriptSDK?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1491198#M84853</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/805390"&gt;@Sparkles&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Someone else had a similar question around getting elevation for a point / polyline which I answered in this link:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-know-the-altitude-of-a-point/m-p/1475359#M84660" target="_blank"&gt;https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-know-the-altitude-of-a-point/m-p/1475359#M84660&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;As for your question about callback there is also Sketch.on("update") which will trigger per update to the sketch.&lt;BR /&gt;You can then grab the latest sketch from that from the event graphic array.&lt;BR /&gt;&lt;BR /&gt;The last set of co-ordinates in your path would be the last drawn point in a polyline.&lt;BR /&gt;&lt;BR /&gt;e.g:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;...
sketchViewModel.on(["update"], onGraphicUpdate);

function onGraphicUpdate(event) {
const graphic = event.graphics[0];
console.log('graphic', graphic)

}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 02:52:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1491198#M84853</guid>
      <dc:creator>JamesIng</dc:creator>
      <dc:date>2024-06-13T02:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to get elevation at points/paths in a polyline Sketch in arcGIS JavascriptSDK?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1491425#M84857</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/805390"&gt;@Sparkles&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you experiencing this while drawing a new line?&lt;/P&gt;&lt;P&gt;In this case the "problem" is that the elevation constraint gets applied. This makes all vertices be drawn at the elevation of the first one. You can disable the elevation constraint by enabling the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#tooltipOptions" target="_blank" rel="noopener"&gt;tooltips&lt;/A&gt;, using &lt;STRONG&gt;Tab&lt;/STRONG&gt;&amp;nbsp; to enter the tooltips' input mode, and clicking on the lock icon next to the elevation/z field. Note that this needs to be done per feature.&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html" target="_blank" rel="noopener"&gt;SketchViewModel&lt;/A&gt; documentation:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;When sketching polygons or polylines, the elevation constraint is applied by default. This means that all vertices use the z-value of the first vertex. To unlock the elevation constraint while sketching, make sure the&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#tooltipOptions" target="_blank" rel="noopener"&gt;tooltips&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;and their&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-sketch-SketchTooltipOptions.html#inputEnabled" target="_blank" rel="noopener"&gt;inputs&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;are enabled, and activate the input mode with the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Tab&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;key.&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This behavior got introduced with version 4.29 in order to unify the drawing experience of polylines and polygons. But when drawing both, it is now possible to opt-out from this planar drawing mode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps you further. Let me know in case you have any other questions.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 09:37:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1491425#M84857</guid>
      <dc:creator>GreteSoosalu</dc:creator>
      <dc:date>2024-06-13T09:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get elevation at points/paths in a polyline Sketch in arcGIS JavascriptSDK?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1615413#M87164</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/503459"&gt;@GreteSoosalu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Is there any way to&amp;nbsp;&lt;SPAN&gt;opt-out this planar drawing mode using the js sdk ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 12:51:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1615413#M87164</guid>
      <dc:creator>ChristopheSuter</dc:creator>
      <dc:date>2025-05-16T12:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to get elevation at points/paths in a polyline Sketch in arcGIS JavascriptSDK?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1615438#M87165</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/39681"&gt;@ChristopheSuter&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Currently, one needs to disable this planar behavior every time when starting to draw a new feature.&lt;/P&gt;&lt;P&gt;Are you looking for a way to make it a default behavior for the whole app? If so, could you explain a bit the context: is it needed for both lines and polygons; should the person who's drawing be able to change this setting?&lt;BR /&gt;Knowing more details will help us to prioritize and implement this enhancement in the future.&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 13:42:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1615438#M87165</guid>
      <dc:creator>GreteSoosalu</dc:creator>
      <dc:date>2025-05-16T13:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get elevation at points/paths in a polyline Sketch in arcGIS JavascriptSDK?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1615447#M87167</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/503459"&gt;@GreteSoosalu&lt;/a&gt;, thanks for your reply. I am using sketchViewModel in my development. When using snappingOptions, since this is default behavior (planar sketching), results in a drawing that is difficult to understand for the users since the drawn shape does not snap to the features vertices/segments but above (or below) them at a fixed z.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 13:53:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1615447#M87167</guid>
      <dc:creator>ChristopheSuter</dc:creator>
      <dc:date>2025-05-16T13:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to get elevation at points/paths in a polyline Sketch in arcGIS JavascriptSDK?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1615947#M87169</link>
      <description>&lt;P&gt;Thanks for the explanation. Could you also give an example of what these features/segments depict?&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current default behavior was designed for drawing features that are often planar (building footprints, schematic utilities, etc). In these cases, one can use snapping to sort-of fetch the X-Y values from vertices further away, while the Z still remains "locked" and the resulting geometry remains planar.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can look into making it easier for apps to override this default.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 12:57:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1615947#M87169</guid>
      <dc:creator>GreteSoosalu</dc:creator>
      <dc:date>2025-05-19T12:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get elevation at points/paths in a polyline Sketch in arcGIS JavascriptSDK?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1615966#M87170</link>
      <description>&lt;P&gt;It is for an custom measurement tool .. would be great if you could add any property to the sketchViewmodel to override that default ..&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 13:24:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-elevation-at-points-paths-in-a-polyline/m-p/1615966#M87170</guid>
      <dc:creator>ChristopheSuter</dc:creator>
      <dc:date>2025-05-19T13:24:19Z</dc:date>
    </item>
  </channel>
</rss>

