<?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 how to activate SceneView.toScreen() upon Polygon points (2D or 3D) in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-activate-sceneview-toscreen-upon-polygon/m-p/1038555#M14454</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I'm developing custom widgets for WAB&amp;nbsp;(Develper Edtion) 2.17, Launchpad Theme, on&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;3D&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Scenes (ArcGIS API for javascript&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;4.17&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;), on our compamy portal (version 10.7.1).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I am still a newbie...&lt;/P&gt;&lt;P&gt;I need do screenshot around polygon extent - not by dragging mouse, but automatically, i.e. to get automatically the extent ( + 10%) and do screenshot over it.&lt;/P&gt;&lt;P&gt;I can get the extent, but screensot works with x,y screen pixels, whilst I have x,y coordinates on map.&lt;/P&gt;&lt;P&gt;my feature layer spatial reference is NOT geographic, but grid - it is wkid:2039 (Israel TM Grid).&lt;/P&gt;&lt;P&gt;if I try to do&amp;nbsp;&lt;/P&gt;&lt;P&gt;let p = new Point({&lt;BR /&gt;&amp;nbsp; &amp;nbsp;x: poly.extent.center.x,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;y: poly.extent.center.y,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;z: 0,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;spatialReference: poly.spatialReference&lt;BR /&gt;});&lt;BR /&gt;let screenP = that.sceneView.toScreen(p);&lt;/P&gt;&lt;P&gt;Then I still get exagerated values for x,y&lt;/P&gt;&lt;P&gt;So, how to translate the polygon extent coordinates to screen coordinates?&lt;/P&gt;&lt;P&gt;Help will be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to covert x,y map coordinates, to x,y screen coordinates?&lt;/P&gt;&lt;P&gt;Help wiil be greatly appreciated&lt;/P&gt;</description>
    <pubDate>Fri, 19 Mar 2021 12:11:59 GMT</pubDate>
    <dc:creator>MichaelLev</dc:creator>
    <dc:date>2021-03-19T12:11:59Z</dc:date>
    <item>
      <title>how to activate SceneView.toScreen() upon Polygon points (2D or 3D)</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-activate-sceneview-toscreen-upon-polygon/m-p/1038555#M14454</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I'm developing custom widgets for WAB&amp;nbsp;(Develper Edtion) 2.17, Launchpad Theme, on&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;3D&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Scenes (ArcGIS API for javascript&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;4.17&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;), on our compamy portal (version 10.7.1).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I am still a newbie...&lt;/P&gt;&lt;P&gt;I need do screenshot around polygon extent - not by dragging mouse, but automatically, i.e. to get automatically the extent ( + 10%) and do screenshot over it.&lt;/P&gt;&lt;P&gt;I can get the extent, but screensot works with x,y screen pixels, whilst I have x,y coordinates on map.&lt;/P&gt;&lt;P&gt;my feature layer spatial reference is NOT geographic, but grid - it is wkid:2039 (Israel TM Grid).&lt;/P&gt;&lt;P&gt;if I try to do&amp;nbsp;&lt;/P&gt;&lt;P&gt;let p = new Point({&lt;BR /&gt;&amp;nbsp; &amp;nbsp;x: poly.extent.center.x,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;y: poly.extent.center.y,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;z: 0,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;spatialReference: poly.spatialReference&lt;BR /&gt;});&lt;BR /&gt;let screenP = that.sceneView.toScreen(p);&lt;/P&gt;&lt;P&gt;Then I still get exagerated values for x,y&lt;/P&gt;&lt;P&gt;So, how to translate the polygon extent coordinates to screen coordinates?&lt;/P&gt;&lt;P&gt;Help will be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to covert x,y map coordinates, to x,y screen coordinates?&lt;/P&gt;&lt;P&gt;Help wiil be greatly appreciated&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2021 12:11:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-activate-sceneview-toscreen-upon-polygon/m-p/1038555#M14454</guid>
      <dc:creator>MichaelLev</dc:creator>
      <dc:date>2021-03-19T12:11:59Z</dc:date>
    </item>
  </channel>
</rss>

