<?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: Client side area and length measurement in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/client-side-area-and-length-measurement/m-p/203282#M18877</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the response.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Mar 2011 10:44:53 GMT</pubDate>
    <dc:creator>PauPérez_Puigcerver</dc:creator>
    <dc:date>2011-03-28T10:44:53Z</dc:date>
    <item>
      <title>Client side area and length measurement</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/client-side-area-and-length-measurement/m-p/203280#M18875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Anybody knows how works the new API Enhancement for measure area and length at client side? There aren't any example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pau Pérez&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Conselleria de Medio Ambiente, Agua, Urbanismo y Vivienda&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://cartoweb.cma.gva.es"&gt;http://cartoweb.cma.gva.es&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2011 07:11:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/client-side-area-and-length-measurement/m-p/203280#M18875</guid>
      <dc:creator>PauPérez_Puigcerver</dc:creator>
      <dc:date>2011-03-25T07:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Client side area and length measurement</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/client-side-area-and-length-measurement/m-p/203281#M18876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We are working on adding a sample that shows how to use these, in the meantime the following code snippets might help:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;GeodesicLengths:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;map.graphics.add(new esri.Graphic(geometry, graphicSymbol));
//Since the map projection is web mercator, convert to lat/lon
var geographicGeometry = geometry;

//calculate geodesic length on client
var lengths = esri.geometry.geodesicLengths([geographicGeometry], esri.Units.KILOMETERS);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Geodesic Areas:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;map.graphics.add(new esri.Graphic(geometry, graphicSymbol));
var geographicGeometries = [];
//if self intersecting, simplify using geometry service
if (esri.geometry.polygonSelfIntersecting(geometry)) {
&amp;nbsp; //if self intersecting, simplify using geometry service
&amp;nbsp; geometryService.simplify([geometry], function(simplifiedGeometries) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.forEach(simplifiedGeometries, function(simplifiedGeometry, idx) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geographicGeometries.push(esri.geometry.webMercatorToGeographic(simplifiedGeometry));
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp; var areas = esri.geometry.geodesicAreas(geographicGeometries, esri.Units.ACRES);
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.byId("result").innerHTML = "The area of the polygon is: " + areas[0] + " Acres";
&amp;nbsp; });
}
else {
&amp;nbsp; geographicGeometries.push(esri.geometry.webMercatorToGeographic(geometry));
&amp;nbsp; var areas = esri.geometry.geodesicAreas(geographicGeometries, esri.Units.ACRES);
&amp;nbsp; dojo.byId("result").innerHTML = "The area of the polygon is: " + areas[0] + " Acres";
}
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:05:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/client-side-area-and-length-measurement/m-p/203281#M18876</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2021-12-11T10:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Client side area and length measurement</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/client-side-area-and-length-measurement/m-p/203282#M18877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the response.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 10:44:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/client-side-area-and-length-measurement/m-p/203282#M18877</guid>
      <dc:creator>PauPérez_Puigcerver</dc:creator>
      <dc:date>2011-03-28T10:44:53Z</dc:date>
    </item>
  </channel>
</rss>

