<?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: Shift a graphic by a set number of pixels in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shift-a-graphic-by-a-set-number-of-pixels/m-p/1073221#M73651</link>
    <description>&lt;P&gt;You might be able to use the MapView.toScreen() method to convert the lat/lon to a ScreenPoint. Add the 50 pixels to the x,y screen coordinates and then use&amp;nbsp;MapView.toMap() method to convert the adjusted screen point back to a map point and update the graphics geometry.&lt;/P&gt;&lt;P&gt;There's also a padding property on the MapView - &amp;nbsp;.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Jun 2021 15:21:45 GMT</pubDate>
    <dc:creator>bmanghi</dc:creator>
    <dc:date>2021-06-28T15:21:45Z</dc:date>
    <item>
      <title>Shift a graphic by a set number of pixels</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shift-a-graphic-by-a-set-number-of-pixels/m-p/1073176#M73649</link>
      <description>&lt;P&gt;I have a div that overlays on my map and I populate dynamic graphics.&lt;/P&gt;&lt;P&gt;If a graphic is under my div, I need to shift it to be just outside of it.&lt;/P&gt;&lt;P&gt;Is there anyway to take a graphic at (XLat, YLon) and shift it to the left by 50 pixels?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 14:00:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shift-a-graphic-by-a-set-number-of-pixels/m-p/1073176#M73649</guid>
      <dc:creator>JohnWyant</dc:creator>
      <dc:date>2021-06-28T14:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Shift a graphic by a set number of pixels</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shift-a-graphic-by-a-set-number-of-pixels/m-p/1073221#M73651</link>
      <description>&lt;P&gt;You might be able to use the MapView.toScreen() method to convert the lat/lon to a ScreenPoint. Add the 50 pixels to the x,y screen coordinates and then use&amp;nbsp;MapView.toMap() method to convert the adjusted screen point back to a map point and update the graphics geometry.&lt;/P&gt;&lt;P&gt;There's also a padding property on the MapView - &amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 15:21:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shift-a-graphic-by-a-set-number-of-pixels/m-p/1073221#M73651</guid>
      <dc:creator>bmanghi</dc:creator>
      <dc:date>2021-06-28T15:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Shift a graphic by a set number of pixels</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shift-a-graphic-by-a-set-number-of-pixels/m-p/1073224#M73653</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/59041"&gt;@JohnWyant&lt;/a&gt;&amp;nbsp;sure you just use the geometryEngines offset method.&lt;/P&gt;&lt;P&gt;Assuming 3.x&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Get the graphics extent center&lt;/LI&gt;&lt;LI&gt;Use the map toScreen method to get the screen point and then add your 50 pixels to the screen point X and/or Y values&lt;/LI&gt;&lt;LI&gt;Then use the maps toMap to reconvert the screen point that is now shifted by 50 px to get the map point.&lt;/LI&gt;&lt;LI&gt;Next us the geometryEngine distance on the original point (the graphics extent center) and the new shifted point to get the distance value to use in the next step&lt;/LI&gt;&lt;LI&gt;Use the geometryEngine offset method to get the offset geometry.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Same can be done in 4.x it is just the MapView that has the toMap and toScreen methods.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 15:21:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shift-a-graphic-by-a-set-number-of-pixels/m-p/1073224#M73653</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-06-28T15:21:36Z</dc:date>
    </item>
  </channel>
</rss>

