<?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: Use Graphic and Layer Transform to Calculate New Points in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-graphic-and-layer-transform-to-calculate-new/m-p/13392#M1275</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Abdul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I am not sure about your code but the way I do this is get the polygons centroid on the graphics-move-start and store this and then use graphics-move-end and get the new centroid and calculate the delta (difference between the two and that is what I would move the other points by.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 May 2016 01:35:37 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2016-05-31T01:35:37Z</dc:date>
    <item>
      <title>Use Graphic and Layer Transform to Calculate New Points</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-graphic-and-layer-transform-to-calculate-new/m-p/13391#M1274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 4 graphics on map with 3 map points and a polyline. As I am scaling / rotating polyline with editor I want 3 map points to calculate its new position relatively to scale or rotation of polyline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/206233_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; editToolbar.on('graphic-move-stop',function(evt){
 var graphicTransform = graphicDojoShape.getTransform();
 var layerTransform = evt.graphic.getLayer()._div.getTransform();

var wrapOffset = 0;
 var f = map.toScreen({x: roomGeometry.x, y: roomGeometry.y, spatialReference: spatialReference}, !0);
 f.x += wrapOffset;
 f = matrix.multiplyPoint([layerTransform, graphicTransform, matrix.invert(layerTransform)], f);
 f.x -= wrapOffset;
 f = map.toMap(f);
});&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code is not working.&lt;/P&gt;&lt;P&gt;Any clue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:33:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-graphic-and-layer-transform-to-calculate-new/m-p/13391#M1274</guid>
      <dc:creator>omega_cancer</dc:creator>
      <dc:date>2021-12-10T20:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: Use Graphic and Layer Transform to Calculate New Points</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-graphic-and-layer-transform-to-calculate-new/m-p/13392#M1275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Abdul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I am not sure about your code but the way I do this is get the polygons centroid on the graphics-move-start and store this and then use graphics-move-end and get the new centroid and calculate the delta (difference between the two and that is what I would move the other points by.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2016 01:35:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-graphic-and-layer-transform-to-calculate-new/m-p/13392#M1275</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-05-31T01:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Use Graphic and Layer Transform to Calculate New Points</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-graphic-and-layer-transform-to-calculate-new/m-p/13393#M1276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Makes sense.&lt;/P&gt;&lt;P&gt;Delta between two &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;centroids? But &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Room points might not be at &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;centroid!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Can you please share the snippet?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2016 09:36:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-graphic-and-layer-transform-to-calculate-new/m-p/13393#M1276</guid>
      <dc:creator>omega_cancer</dc:creator>
      <dc:date>2016-05-31T09:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Use Graphic and Layer Transform to Calculate New Points</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-graphic-and-layer-transform-to-calculate-new/m-p/13394#M1277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Abdul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Delta, meaning the centroids original coords were -89.256, 32.569 and the new moved centroid is -89.156, 32.469 the the simple math is to find the difference from the two which would be a delta of .100 and .100. SO if the polygons centroid moved .100 and .100 then the labels in your image would need to move the same amount so just move all three of them individually .100 and .100.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 03:19:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-graphic-and-layer-transform-to-calculate-new/m-p/13394#M1277</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-06-01T03:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Use Graphic and Layer Transform to Calculate New Points</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-graphic-and-layer-transform-to-calculate-new/m-p/13395#M1278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using something similar in my code but I thought it would be easy and every point specific (not just &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;centroid - as I have rooms in my example&lt;/SPAN&gt;) when we use graphic and layer transform properties.&lt;/P&gt;&lt;P&gt;I have seen use of&amp;nbsp; graphic and layer transform properties for the said purpose somewhere.&lt;/P&gt;&lt;P&gt;Thanks for your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 05:07:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/use-graphic-and-layer-transform-to-calculate-new/m-p/13395#M1278</guid>
      <dc:creator>omega_cancer</dc:creator>
      <dc:date>2016-06-01T05:07:20Z</dc:date>
    </item>
  </channel>
</rss>

