<?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: View pointer-move event has no mapPoint property for getting X,Y coordinates in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-pointer-move-event-has-no-mappoint-property/m-p/223143#M20732</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#events-summary" rel="nofollow noopener noreferrer" target="_blank"&gt;documentation&lt;/A&gt;, it shows that the pointer-move event doesn't return a MapPoint, but it still returns an x and y coordinate. You can use those coordinate to create a MapPoint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;view.on('pointer-move', (evt) =&amp;gt; {
&amp;nbsp; console.log(evt.x,evt.y);
&amp;nbsp; var point = view.toMap(evt);
&amp;nbsp; console.log(point.x, point.y);
});
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 10:51:15 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2021-12-11T10:51:15Z</dc:date>
    <item>
      <title>View pointer-move event has no mapPoint property for getting X,Y coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-pointer-move-event-has-no-mappoint-property/m-p/223141#M20730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello. I'm using JS 4.6.&lt;/P&gt;&lt;P&gt;I'm able to get x,y coordinates with view's click event. But i want to get xy coordinates with mouse move. For this i tried to get x,y below code. But i'm seeiny mouse X and Mouse Y, Not mappointX and Mappoint.Y&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below code has no problem (click event).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;appConfig.activeView.on("click", function(evt){&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;alert(evt.mapPoint.x);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;alert(evt.mapPoint.Y);&lt;/P&gt;&lt;P&gt;})&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below code has problem (no mappoint property for evt)&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;appConfig.activeView.on("pointer-move", function(evt){&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;alert(evt.mapPoint.x);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;alert(evt.mapPoint.Y);&lt;/P&gt;&lt;P&gt;})&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks inadvance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2018 13:37:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-pointer-move-event-has-no-mappoint-property/m-p/223141#M20730</guid>
      <dc:creator>TubaKumbara</dc:creator>
      <dc:date>2018-03-27T13:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: View pointer-move event has no mapPoint property for getting X,Y coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-pointer-move-event-has-no-mappoint-property/m-p/223142#M20731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you need the mapPoint on pointer events, you can use the Views &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#toMap"&gt;toMap()&lt;/A&gt; method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can just pass it the event directly, like &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;const pt = view.toMap(event)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2018 14:04:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-pointer-move-event-has-no-mappoint-property/m-p/223142#M20731</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2018-03-27T14:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: View pointer-move event has no mapPoint property for getting X,Y coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-pointer-move-event-has-no-mappoint-property/m-p/223143#M20732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#events-summary" rel="nofollow noopener noreferrer" target="_blank"&gt;documentation&lt;/A&gt;, it shows that the pointer-move event doesn't return a MapPoint, but it still returns an x and y coordinate. You can use those coordinate to create a MapPoint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;view.on('pointer-move', (evt) =&amp;gt; {
&amp;nbsp; console.log(evt.x,evt.y);
&amp;nbsp; var point = view.toMap(evt);
&amp;nbsp; console.log(point.x, point.y);
});
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:51:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-pointer-move-event-has-no-mappoint-property/m-p/223143#M20732</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-11T10:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: View pointer-move event has no mapPoint property for getting X,Y coordinates</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-pointer-move-event-has-no-mappoint-property/m-p/223144#M20733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for sample. working good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i see different values for same location between click event and pointer-move event.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;click returning x= 25.9666 y = 19.3333 (Decimal Degree)&lt;/P&gt;&lt;P&gt;pointer-move returning : x= 8095424.24577 y = 1587845.544875 (webmercator)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i used webMercatorUtils.webMercatorToGeographic&amp;nbsp; function to return as deciamldegree.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, All working good now. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2018 14:57:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-pointer-move-event-has-no-mappoint-property/m-p/223144#M20733</guid>
      <dc:creator>TubaKumbara</dc:creator>
      <dc:date>2018-03-27T14:57:35Z</dc:date>
    </item>
  </channel>
</rss>

