<?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: 2d direct line measurement for 4.7? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2d-direct-line-measurement-for-4-7/m-p/300116#M27536</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. I want to text on top of drawing like in these example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/draw-measure/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/draw-measure/index.html"&gt;Measure while drawing | ArcGIS API for JavaScript 4.7&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did the source code like this but I couldn't show distance as text on the line vertice.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;view.when(function (evt) {&lt;BR /&gt; var draw = new Draw({&lt;BR /&gt; view: view&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// ********************&lt;BR /&gt; // draw polyline button&lt;BR /&gt; // ********************&lt;BR /&gt; var drawLineButton = document.getElementById("meabut");&lt;BR /&gt; drawLineButton.onclick = function () {&lt;BR /&gt; view.graphics.removeAll();&lt;BR /&gt; enableCreateLine(draw, view);&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;function enableCreateLine(draw, view) {&lt;BR /&gt; // creates and returns an instance of PolyLineDrawAction&lt;BR /&gt; // can only draw a line by clicking on the map&lt;BR /&gt; var action = draw.create("polyline", {&lt;BR /&gt; mode: "click"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// focus the view to activate keyboard shortcuts for sketching&lt;BR /&gt; view.focus();&lt;/P&gt;&lt;P&gt;// listen to vertex-add event on the polyline draw action&lt;BR /&gt; action.on("vertex-add", updateVertices);&lt;/P&gt;&lt;P&gt;// listen to vertex-remove event on the polyline draw action&lt;BR /&gt; action.on("vertex-remove", updateVertices);&lt;/P&gt;&lt;P&gt;// listen to cursor-update event on the polyline draw action&lt;BR /&gt; action.on("cursor-update", createGraphic);&lt;/P&gt;&lt;P&gt;// listen to draw-complete event on the polyline draw action&lt;BR /&gt; action.on("draw-complete", updateVertices);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;// This function is called from the "vertex-add" and "vertex-remove" events. &lt;BR /&gt; &lt;BR /&gt; // Checks if the last vertex is making the line intersect itself.&lt;/P&gt;&lt;P&gt;function updateVertices(evt) {&lt;BR /&gt; // create a polyline from returned vertices&lt;BR /&gt; var result = createGraphic(evt);&lt;/P&gt;&lt;P&gt;// if the last vertex is making the line intersects itself,&lt;BR /&gt; // prevent "vertex-add" or "vertex-remove" from firing&lt;BR /&gt; if (result.selfIntersects) {&lt;BR /&gt; evt.preventDefault();&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;// create a new graphic presenting the polyline that is being drawn on the view&lt;BR /&gt; function createGraphic(evt) {&lt;BR /&gt; var vertices = evt.vertices;&lt;BR /&gt; view.graphics.removeAll();&lt;/P&gt;&lt;P&gt;// a graphic representing the polyline that is being drawn&lt;BR /&gt; var graphicc = new Graphic({&lt;BR /&gt; geometry: new Polyline({&lt;BR /&gt; paths: vertices,&lt;BR /&gt; spatialReference: view.spatialReference&lt;BR /&gt; }),&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-line", // autocasts as new SimpleFillSymbol&lt;BR /&gt; color: [4, 90, 141],&lt;BR /&gt; width: 4,&lt;BR /&gt; cap: "round",&lt;BR /&gt; join: "round"&lt;BR /&gt; }&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// check the polyline intersects itself.&lt;BR /&gt; var intersectingFeature = getIntersectingFeature(graphicc.geometry);&lt;BR /&gt; var lengthh = geometryEngine.planarLength(graphicc.geometry, "kilometers");&lt;BR /&gt; labelAreas(graphicc, length);&lt;BR /&gt; console.log(lengthh, "km");&lt;BR /&gt; &lt;BR /&gt; // Add a new graphic for the intersecting segment.&lt;BR /&gt; if (intersectingFeature) {&lt;BR /&gt; view.graphics.addMany([graphicc, intersectingFeature]);&lt;BR /&gt; }&lt;BR /&gt; // Just add the graphic representing the polyline if no intersection&lt;BR /&gt; else {&lt;BR /&gt; view.graphics.add(graphicc);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;// return the graphic and intersectingSegment&lt;BR /&gt; return {&lt;BR /&gt; graphic: graphicc,&lt;BR /&gt; selfIntersects: intersectingFeature&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;function labelAreas(geom, area) {&lt;BR /&gt; var graph = new Graphic({&lt;BR /&gt; geometry: geom.geometry,&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "text",&lt;BR /&gt; color: "black",&lt;BR /&gt; haloColor: "black",&lt;BR /&gt; haloSize: "1px",&lt;BR /&gt; text: area.toFixed(2) + " km",&lt;BR /&gt; xoffset: 3,&lt;BR /&gt; yoffset: 3,&lt;BR /&gt; font: { // autocast as Font&lt;BR /&gt; size: 14,&lt;BR /&gt; family: "sans-serif"&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; view.graphics.add(graphicc);&lt;BR /&gt; // console.log(area);&lt;BR /&gt; console.log(geom);&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 May 2018 13:15:46 GMT</pubDate>
    <dc:creator>KutayDeril</dc:creator>
    <dc:date>2018-05-03T13:15:46Z</dc:date>
    <item>
      <title>2d direct line measurement for 4.7?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2d-direct-line-measurement-for-4-7/m-p/300114#M27534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see there is no 2d direct line measurement for 4.7. I use 2d mapview also I want a 2d direct line measurement. In api reference, it says dlm can be made by using geometryengine and draw classes. I used non-intersecting draw line. Now I want to integrate with geometryengine&amp;nbsp;to measure distance&amp;nbsp;but I don't know how.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also,&amp;nbsp;draw non-intersecting line not work correctly right now even in the sample. I have to double click to draw but it was working correctly before.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using codes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; view.when(function (evt) {&lt;BR /&gt; var draw = new Draw({&lt;BR /&gt; view: view&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// ********************&lt;BR /&gt; // draw polyline button&lt;BR /&gt; // ********************&lt;BR /&gt; var drawLineButton = document.getElementById("meabut");&lt;BR /&gt; drawLineButton.onclick = function () {&lt;BR /&gt; view.graphics.removeAll();&lt;BR /&gt; enableCreateLine(draw, view);&lt;BR /&gt; }&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;function enableCreateLine(draw, view) {&lt;BR /&gt; // creates and returns an instance of PolyLineDrawAction&lt;BR /&gt; // can only draw a line by clicking on the map&lt;BR /&gt; var action = draw.create("polyline", {&lt;BR /&gt; mode: "click"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// focus the view to activate keyboard shortcuts for sketching&lt;BR /&gt; view.focus();&lt;/P&gt;&lt;P&gt;// listen to vertex-add event on the polyline draw action&lt;BR /&gt; action.on("vertex-add", updateVertices);&lt;/P&gt;&lt;P&gt;// listen to vertex-remove event on the polyline draw action&lt;BR /&gt; action.on("vertex-remove", updateVertices);&lt;/P&gt;&lt;P&gt;// listen to cursor-update event on the polyline draw action&lt;BR /&gt; action.on("cursor-update", createGraphic);&lt;/P&gt;&lt;P&gt;// listen to draw-complete event on the polyline draw action&lt;BR /&gt; action.on("draw-complete", updateVertices);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;// This function is called from the "vertex-add" and "vertex-remove" events. &lt;BR /&gt; &lt;BR /&gt; // Checks if the last vertex is making the line intersect itself.&lt;/P&gt;&lt;P&gt;function updateVertices(evt) {&lt;BR /&gt; // create a polyline from returned vertices&lt;BR /&gt; var result = createGraphic(evt);&lt;/P&gt;&lt;P&gt;// if the last vertex is making the line intersects itself,&lt;BR /&gt; // prevent "vertex-add" or "vertex-remove" from firing&lt;BR /&gt; if (result.selfIntersects) {&lt;BR /&gt; evt.preventDefault();&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;// create a new graphic presenting the polyline that is being drawn on the view&lt;BR /&gt; function createGraphic(evt) {&lt;BR /&gt; var vertices = evt.vertices;&lt;BR /&gt; view.graphics.removeAll();&lt;/P&gt;&lt;P&gt;// a graphic representing the polyline that is being drawn&lt;BR /&gt; var graphicc = new Graphic({&lt;BR /&gt; geometry: new Polyline({&lt;BR /&gt; paths: vertices,&lt;BR /&gt; spatialReference: view.spatialReference&lt;BR /&gt; }),&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-line", // autocasts as new SimpleFillSymbol&lt;BR /&gt; color: [4, 90, 141],&lt;BR /&gt; width: 4,&lt;BR /&gt; cap: "round",&lt;BR /&gt; join: "round"&lt;BR /&gt; }&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// check the polyline intersects itself.&lt;BR /&gt; var intersectingFeature = getIntersectingFeature(graphicc.geometry);&lt;/P&gt;&lt;P&gt;// Add a new graphic for the intersecting segment.&lt;BR /&gt; if (intersectingFeature) {&lt;BR /&gt; view.graphics.addMany([graphic, intersectingFeature]);&lt;BR /&gt; }&lt;BR /&gt; // Just add the graphic representing the polyline if no intersection&lt;BR /&gt; else {&lt;BR /&gt; view.graphics.add(graphicc);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;// return the graphic and intersectingSegment&lt;BR /&gt; return {&lt;BR /&gt; graphic: graphicc,&lt;BR /&gt; selfIntersects: intersectingFeature&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;// function that checks if the line intersects itself&lt;BR /&gt; function isSelfIntersecting(polyline) {&lt;BR /&gt; if (polyline.paths[0].length &amp;lt; 3) {&lt;BR /&gt; return false&lt;BR /&gt; }&lt;BR /&gt; var line = polyline.clone();&lt;/P&gt;&lt;P&gt;//get the last segment from the polyline that is being drawn&lt;BR /&gt; var lastSegment = getLastSegment(polyline);&lt;BR /&gt; line.removePoint(0, line.paths[0].length - 1);&lt;/P&gt;&lt;P&gt;// returns true if the line intersects itself, false otherwise&lt;BR /&gt; return geometryEngine.crosses(lastSegment, line);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;// Checks if the line intersects itself. If yes, changes the last &lt;BR /&gt; // segment's symbol giving a visual feedback to the user.&lt;BR /&gt; function getIntersectingFeature(polyline) {&lt;BR /&gt; if (isSelfIntersecting(polyline)) {&lt;BR /&gt; return new Graphic({&lt;BR /&gt; geometry: getLastSegment(polyline),&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-line", // autocasts as new SimpleLineSymbol&lt;BR /&gt; style: "short-dot",&lt;BR /&gt; width: 3.5,&lt;BR /&gt; color: "yellow"&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; }&lt;BR /&gt; return null;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;// Get the last segment of the polyline that is being drawn&lt;BR /&gt; function getLastSegment(polyline) {&lt;BR /&gt; var line = polyline.clone();&lt;BR /&gt; var lastXYPoint = line.removePoint(0, line.paths[0].length - 1);&lt;BR /&gt; var existingLineFinalPoint = line.getPoint(0, line.paths[0].length -&lt;BR /&gt; 1);&lt;/P&gt;&lt;P&gt;return new Polyline({&lt;BR /&gt; spatialReference: view.spatialReference,&lt;BR /&gt; hasZ: false,&lt;BR /&gt; paths: [&lt;BR /&gt; [&lt;BR /&gt; [existingLineFinalPoint.x, existingLineFinalPoint.y],&lt;BR /&gt; [lastXYPoint.x, lastXYPoint.y]&lt;BR /&gt; ]&lt;BR /&gt; ]&lt;BR /&gt; });&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2018 12:37:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2d-direct-line-measurement-for-4-7/m-p/300114#M27534</guid>
      <dc:creator>KutayDeril</dc:creator>
      <dc:date>2018-04-27T12:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: 2d direct line measurement for 4.7?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2d-direct-line-measurement-for-4-7/m-p/300115#M27535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kutay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You just use the geodesicLength or planarLength methods in the geometryEngibe class.&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicLength" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicLength"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicLength&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#planarLength" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#planarLength"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#planarLength&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2018 12:50:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2d-direct-line-measurement-for-4-7/m-p/300115#M27535</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-04-27T12:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: 2d direct line measurement for 4.7?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2d-direct-line-measurement-for-4-7/m-p/300116#M27536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. I want to text on top of drawing like in these example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/draw-measure/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/draw-measure/index.html"&gt;Measure while drawing | ArcGIS API for JavaScript 4.7&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did the source code like this but I couldn't show distance as text on the line vertice.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;view.when(function (evt) {&lt;BR /&gt; var draw = new Draw({&lt;BR /&gt; view: view&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// ********************&lt;BR /&gt; // draw polyline button&lt;BR /&gt; // ********************&lt;BR /&gt; var drawLineButton = document.getElementById("meabut");&lt;BR /&gt; drawLineButton.onclick = function () {&lt;BR /&gt; view.graphics.removeAll();&lt;BR /&gt; enableCreateLine(draw, view);&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;function enableCreateLine(draw, view) {&lt;BR /&gt; // creates and returns an instance of PolyLineDrawAction&lt;BR /&gt; // can only draw a line by clicking on the map&lt;BR /&gt; var action = draw.create("polyline", {&lt;BR /&gt; mode: "click"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// focus the view to activate keyboard shortcuts for sketching&lt;BR /&gt; view.focus();&lt;/P&gt;&lt;P&gt;// listen to vertex-add event on the polyline draw action&lt;BR /&gt; action.on("vertex-add", updateVertices);&lt;/P&gt;&lt;P&gt;// listen to vertex-remove event on the polyline draw action&lt;BR /&gt; action.on("vertex-remove", updateVertices);&lt;/P&gt;&lt;P&gt;// listen to cursor-update event on the polyline draw action&lt;BR /&gt; action.on("cursor-update", createGraphic);&lt;/P&gt;&lt;P&gt;// listen to draw-complete event on the polyline draw action&lt;BR /&gt; action.on("draw-complete", updateVertices);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;// This function is called from the "vertex-add" and "vertex-remove" events. &lt;BR /&gt; &lt;BR /&gt; // Checks if the last vertex is making the line intersect itself.&lt;/P&gt;&lt;P&gt;function updateVertices(evt) {&lt;BR /&gt; // create a polyline from returned vertices&lt;BR /&gt; var result = createGraphic(evt);&lt;/P&gt;&lt;P&gt;// if the last vertex is making the line intersects itself,&lt;BR /&gt; // prevent "vertex-add" or "vertex-remove" from firing&lt;BR /&gt; if (result.selfIntersects) {&lt;BR /&gt; evt.preventDefault();&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;// create a new graphic presenting the polyline that is being drawn on the view&lt;BR /&gt; function createGraphic(evt) {&lt;BR /&gt; var vertices = evt.vertices;&lt;BR /&gt; view.graphics.removeAll();&lt;/P&gt;&lt;P&gt;// a graphic representing the polyline that is being drawn&lt;BR /&gt; var graphicc = new Graphic({&lt;BR /&gt; geometry: new Polyline({&lt;BR /&gt; paths: vertices,&lt;BR /&gt; spatialReference: view.spatialReference&lt;BR /&gt; }),&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-line", // autocasts as new SimpleFillSymbol&lt;BR /&gt; color: [4, 90, 141],&lt;BR /&gt; width: 4,&lt;BR /&gt; cap: "round",&lt;BR /&gt; join: "round"&lt;BR /&gt; }&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// check the polyline intersects itself.&lt;BR /&gt; var intersectingFeature = getIntersectingFeature(graphicc.geometry);&lt;BR /&gt; var lengthh = geometryEngine.planarLength(graphicc.geometry, "kilometers");&lt;BR /&gt; labelAreas(graphicc, length);&lt;BR /&gt; console.log(lengthh, "km");&lt;BR /&gt; &lt;BR /&gt; // Add a new graphic for the intersecting segment.&lt;BR /&gt; if (intersectingFeature) {&lt;BR /&gt; view.graphics.addMany([graphicc, intersectingFeature]);&lt;BR /&gt; }&lt;BR /&gt; // Just add the graphic representing the polyline if no intersection&lt;BR /&gt; else {&lt;BR /&gt; view.graphics.add(graphicc);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;// return the graphic and intersectingSegment&lt;BR /&gt; return {&lt;BR /&gt; graphic: graphicc,&lt;BR /&gt; selfIntersects: intersectingFeature&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;function labelAreas(geom, area) {&lt;BR /&gt; var graph = new Graphic({&lt;BR /&gt; geometry: geom.geometry,&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "text",&lt;BR /&gt; color: "black",&lt;BR /&gt; haloColor: "black",&lt;BR /&gt; haloSize: "1px",&lt;BR /&gt; text: area.toFixed(2) + " km",&lt;BR /&gt; xoffset: 3,&lt;BR /&gt; yoffset: 3,&lt;BR /&gt; font: { // autocast as Font&lt;BR /&gt; size: 14,&lt;BR /&gt; family: "sans-serif"&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; view.graphics.add(graphicc);&lt;BR /&gt; // console.log(area);&lt;BR /&gt; console.log(geom);&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2018 13:15:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2d-direct-line-measurement-for-4-7/m-p/300116#M27536</guid>
      <dc:creator>KutayDeril</dc:creator>
      <dc:date>2018-05-03T13:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: 2d direct line measurement for 4.7?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2d-direct-line-measurement-for-4-7/m-p/300117#M27537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kutay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Please provide a full sample for testing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2018 13:21:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2d-direct-line-measurement-for-4-7/m-p/300117#M27537</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-05-03T13:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: 2d direct line measurement for 4.7?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2d-direct-line-measurement-for-4-7/m-p/300118#M27538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://paste.ofcode.org/VbqfkC7xNcRp4B6Etb37jS" title="https://paste.ofcode.org/VbqfkC7xNcRp4B6Etb37jS"&gt;Paste ofCode&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my full code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2018 13:28:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2d-direct-line-measurement-for-4-7/m-p/300118#M27538</guid>
      <dc:creator>KutayDeril</dc:creator>
      <dc:date>2018-05-03T13:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: 2d direct line measurement for 4.7?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2d-direct-line-measurement-for-4-7/m-p/300119#M27539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kutay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Here are the changes to make your code work:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;line 5 below your length needs to be &lt;STRONG&gt;lengthh&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;line 10 your geometry needs to be&amp;nbsp;geometry: &lt;STRONG&gt;geom.geometry.extent.center&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;line 25&amp;nbsp;view.graphics.add(&lt;STRONG&gt;graph&lt;/STRONG&gt;);&lt;/LI&gt;&lt;/OL&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// check the polyline intersects itself.&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; intersectingFeature &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;getIntersectingFeature&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;graphicc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; lengthh &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; geometryEngine&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;planarLength&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;graphicc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"kilometers"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="token function"&gt;labelAreas&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;graphicc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lengthh&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lengthh&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"km"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;labelAreas&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;geom&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; area&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; graph &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Graphic&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geometry&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; geom&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;center&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; symbol&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"text"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; color&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"black"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; haloColor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"black"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; haloSize&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"1px"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; area&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;toFixed&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" km"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xoffset&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yoffset&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; font&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// autocast as Font&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;14&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; family&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"sans-serif"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphics&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;graph&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// console.log(area);&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;geom&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:23:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2d-direct-line-measurement-for-4-7/m-p/300119#M27539</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T14:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: 2d direct line measurement for 4.7?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2d-direct-line-measurement-for-4-7/m-p/300120#M27540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 14:25:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/2d-direct-line-measurement-for-4-7/m-p/300120#M27540</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-05-07T14:25:21Z</dc:date>
    </item>
  </channel>
</rss>

