<?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 maintain area of polygon sketchviewmodel fixed? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-maintain-area-of-polygon-sketchviewmodel/m-p/1171707#M77245</link>
    <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You can use &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicArea" target="_self"&gt;geometryEngine.geodesicArea&lt;/A&gt; method to calculate the polygon area while user is reshaping the polygon.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I updated the sample you linked to showcase how to check if the polygon area is less than 1000 acres. Then let user make a change otherwise, force user to reshape the polygon. Having it equal to one number will probably be a challenge for users unless you help to set the area. My changes are in &lt;STRONG&gt;onGraphicUpdate&lt;/STRONG&gt; function.&amp;nbsp;&lt;A href="https://codepen.io/U_B_U/pen/qBxbWOy?editors=1000" target="_blank"&gt;https://codepen.io/U_B_U/pen/qBxbWOy?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;-Undral&lt;/P&gt;</description>
    <pubDate>Fri, 06 May 2022 21:58:25 GMT</pubDate>
    <dc:creator>UndralBatsukh</dc:creator>
    <dc:date>2022-05-06T21:58:25Z</dc:date>
    <item>
      <title>How to maintain area of polygon sketchviewmodel fixed?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-maintain-area-of-polygon-sketchviewmodel/m-p/1171411#M77243</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;I am trying to implement this functionality:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=sketch-update-validation" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=sketch-update-validation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Here, I am successfully getting the polygon which is editable but I want its area to be constant when shape is changed. Can anyone help me with this?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Yogesh Swami&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 11:14:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-maintain-area-of-polygon-sketchviewmodel/m-p/1171411#M77243</guid>
      <dc:creator>YogeshSwami</dc:creator>
      <dc:date>2022-05-06T11:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to maintain area of polygon sketchviewmodel fixed?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-maintain-area-of-polygon-sketchviewmodel/m-p/1171707#M77245</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You can use &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicArea" target="_self"&gt;geometryEngine.geodesicArea&lt;/A&gt; method to calculate the polygon area while user is reshaping the polygon.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I updated the sample you linked to showcase how to check if the polygon area is less than 1000 acres. Then let user make a change otherwise, force user to reshape the polygon. Having it equal to one number will probably be a challenge for users unless you help to set the area. My changes are in &lt;STRONG&gt;onGraphicUpdate&lt;/STRONG&gt; function.&amp;nbsp;&lt;A href="https://codepen.io/U_B_U/pen/qBxbWOy?editors=1000" target="_blank"&gt;https://codepen.io/U_B_U/pen/qBxbWOy?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;-Undral&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 21:58:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-maintain-area-of-polygon-sketchviewmodel/m-p/1171707#M77245</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2022-05-06T21:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to maintain area of polygon sketchviewmodel fixed?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-maintain-area-of-polygon-sketchviewmodel/m-p/1180555#M77618</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/53756"&gt;@UndralBatsukh&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for you reply.&lt;/P&gt;&lt;P&gt;Your approach is great but I want the area to be constant. For eg, if we are giving user only the functionality to resize&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;STRONG&gt;not reshape)&lt;/STRONG&gt; the polygon(specifically rectangle). Now the area needs to be constant while resizing.&amp;nbsp; If user decreases the height, the width should automatically get increased and vice versa so that area remains constant. Can you please help me with this as I have already spent many hours looking for the solution to this. Thanks in advanced.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 10:12:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-maintain-area-of-polygon-sketchviewmodel/m-p/1180555#M77618</guid>
      <dc:creator>YogeshSwami</dc:creator>
      <dc:date>2022-06-07T10:12:12Z</dc:date>
    </item>
  </channel>
</rss>

