<?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 do i rotate a Polygon programmaticly? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-rotate-a-polygon-programmaticly/m-p/368065#M34116</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: mmoles&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That code snippet is what we are using in the API to rotate the shape. Once it's done, you need to call graphic.setGeometry() to make it permanent.&lt;BR /&gt;There are a lot math going on, but still gfx library can do a lot heavy lifting part.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it better to do it this way, or to modify the object and having it redraw?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was using the mercator system and i was trying var tx = dojox.gfx.matrix.rotategAt(45, -10372784, 3316853)&amp;nbsp; which sadly doesnt work.&amp;nbsp;&amp;nbsp; So, how can i convert a geo point to a browser coordinate?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Aaaand, last question... setGeometry(geometry)&amp;nbsp;&amp;nbsp; .... whats geometry do i pass in?&amp;nbsp; The tempGraphicsLayer.graphics[2].getDojoShape() object that i did the transformation says it has no getExtent method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Apr 2014 20:42:01 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2014-04-09T20:42:01Z</dc:date>
    <item>
      <title>How do i rotate a Polygon programmaticly?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-rotate-a-polygon-programmaticly/m-p/368061#M34112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: mmoles&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know the toolbar has a rotate option, but how can i rotate polygons programmaticly. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There must be some rotate function&amp;nbsp; like rotate(myPolygon, deg, centerPoint) somewhere in there.&amp;nbsp; If not, i guess i will need to write one myself =(&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2014 21:18:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-rotate-a-polygon-programmaticly/m-p/368061#M34112</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-04-08T21:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do i rotate a Polygon programmaticly?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-rotate-a-polygon-programmaticly/m-p/368062#M34113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Unfortunately, we didn't make it as an API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to check dojox/gfx/matrix library. Here is the short but essential code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var tx = matrix.rotategAt(angle, anchor);
graphic.getDojoShape().setTransform(tx);
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:04:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-rotate-a-polygon-programmaticly/m-p/368062#M34113</guid>
      <dc:creator>JianHuang</dc:creator>
      <dc:date>2021-12-11T17:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do i rotate a Polygon programmaticly?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-rotate-a-polygon-programmaticly/m-p/368063#M34114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: mmoles&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Unfortunately, we didn't make it as an API.&lt;BR /&gt;You need to check dojox/gfx/matrix library. Here is the short but essential code:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var tx = matrix.rotategAt(angle, anchor);
graphic.getDojoShape().setTransform(tx);
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sadly this wont work for me.&amp;nbsp;&amp;nbsp; The command just modifies the svg and not the polygon ring.&amp;nbsp; I also wanted to use the geographic mercator system to define the location, which is probably still possible to do by creating a point in that coordinate or some other command.&amp;nbsp;&amp;nbsp; The next issue that I run into is that, when i would zoom out, it then refreshes the layer which removes my changes because its just a graphical change and not the object itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess i will need to start doing some math =(&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:04:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-rotate-a-polygon-programmaticly/m-p/368063#M34114</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T17:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do i rotate a Polygon programmaticly?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-rotate-a-polygon-programmaticly/m-p/368064#M34115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That code snippet is what we are using in the API to rotate the shape. Once it's done, you need to call graphic.setGeometry() to make it permanent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There are a lot math going on, but still gfx library can do a lot heavy lifting part.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 19:16:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-rotate-a-polygon-programmaticly/m-p/368064#M34115</guid>
      <dc:creator>JianHuang</dc:creator>
      <dc:date>2014-04-09T19:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do i rotate a Polygon programmaticly?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-rotate-a-polygon-programmaticly/m-p/368065#M34116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: mmoles&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That code snippet is what we are using in the API to rotate the shape. Once it's done, you need to call graphic.setGeometry() to make it permanent.&lt;BR /&gt;There are a lot math going on, but still gfx library can do a lot heavy lifting part.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it better to do it this way, or to modify the object and having it redraw?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was using the mercator system and i was trying var tx = dojox.gfx.matrix.rotategAt(45, -10372784, 3316853)&amp;nbsp; which sadly doesnt work.&amp;nbsp;&amp;nbsp; So, how can i convert a geo point to a browser coordinate?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Aaaand, last question... setGeometry(geometry)&amp;nbsp;&amp;nbsp; .... whats geometry do i pass in?&amp;nbsp; The tempGraphicsLayer.graphics[2].getDojoShape() object that i did the transformation says it has no getExtent method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 20:42:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-rotate-a-polygon-programmaticly/m-p/368065#M34116</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-04-09T20:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do i rotate a Polygon programmaticly?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-rotate-a-polygon-programmaticly/m-p/368066#M34117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please take a look:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/map-amd.html#toscreen"&gt;https://developers.arcgis.com/javascript/jsapi/map-amd.html#toscreen&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 20:58:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-rotate-a-polygon-programmaticly/m-p/368066#M34117</guid>
      <dc:creator>JianHuang</dc:creator>
      <dc:date>2014-04-09T20:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do i rotate a Polygon programmaticly?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-rotate-a-polygon-programmaticly/m-p/368067#M34118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: mmoles&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;awesome, i knew that was in there somewhere.&amp;nbsp; I also edited my post after your reply asking 1 last question.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;setGeometry(geometry) .... whats geometry do i pass in? The tempGraphicsLayer.graphics[2].getDojoShape() object that i did the transformation says it has no getExtent method.&amp;nbsp; Same goes with trying to pass in&amp;nbsp; tempGraphicsLayer.graphics[2].geometry funny enough.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 21:19:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-rotate-a-polygon-programmaticly/m-p/368067#M34118</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-04-09T21:19:33Z</dc:date>
    </item>
  </channel>
</rss>

