<?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: Get coordinates in planar in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/get-coordinates-in-planar/m-p/1181229#M14781</link>
    <description>&lt;P&gt;Solved with client-side esri/geometry/projection&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;projection.load().then(function (evt) {
                            const inSpatialReference = new SpatialReference({ wkid: 102100 });
                            const spSpatialReference = new SpatialReference({ wkid: 2881 });
                            const point = new Point(f.features[i].geometry, inSpatialReference);
                            var geoT = projection.getTransformation(inSpatialReference, spSpatialReference)
                            const projectedPoint = projection.project(point, spSpatialReference);

                            this.facObj.x = Math.round(projectedPoint.x);
                            this.facObj.y = Math.round(projectedPoint.y);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jun 2022 18:39:11 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2022-06-08T18:39:11Z</dc:date>
    <item>
      <title>Get coordinates in planar</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/get-coordinates-in-planar/m-p/1178694#M14777</link>
      <description>&lt;P&gt;Edit: I am open to any solution -- simple is better, GeometryService/Engine whatever works.&lt;/P&gt;&lt;P&gt;Back again, lots of interesting requirements lately!&lt;/P&gt;&lt;P&gt;This time I'm attempting to get the x/y values of point geometry in 102100/3857 as planar coordinates (wkid 2881).&amp;nbsp; Is there a simplified projectAs() function in the ESRI Javascript 3.x?&lt;/P&gt;&lt;P&gt;I've been attempting to implement projection but not having success with the overcoming errors with the geoTransformation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;               layer.layerObject.queryFeatures(query, function (f) {
                            const inSpatialReference = new SpatialReference({ wkid: 102100 });
                            const spSpatialReference = new SpatialReference({ wkid: 2881 });
                            var geoT = projection.getTransformations(inSpatialReference, spSpatialReference)
                            for (var i in f['features']) {                                
                                var facObj = Object.assign({}, f.features[i]['attributes']);

                                const point = new Point(f.features[i].geometry, inSpatialReference);
                                const projectedPoint = projection.project(point, spSpatialReference, geoT);

                                facObj.x = projectedPoint.x
                                facObj.y = projectedPoint.y&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a facObj that I just need to apply the xy planar coordinate values.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 18:09:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/get-coordinates-in-planar/m-p/1178694#M14777</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2022-05-31T18:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get coordinates in planar</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/get-coordinates-in-planar/m-p/1181229#M14781</link>
      <description>&lt;P&gt;Solved with client-side esri/geometry/projection&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;projection.load().then(function (evt) {
                            const inSpatialReference = new SpatialReference({ wkid: 102100 });
                            const spSpatialReference = new SpatialReference({ wkid: 2881 });
                            const point = new Point(f.features[i].geometry, inSpatialReference);
                            var geoT = projection.getTransformation(inSpatialReference, spSpatialReference)
                            const projectedPoint = projection.project(point, spSpatialReference);

                            this.facObj.x = Math.round(projectedPoint.x);
                            this.facObj.y = Math.round(projectedPoint.y);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2022 18:39:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/get-coordinates-in-planar/m-p/1181229#M14781</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2022-06-08T18:39:11Z</dc:date>
    </item>
  </channel>
</rss>

