<?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 get Current X and Y on webmap on touch or clicklistener in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/how-to-get-current-x-and-y-on-webmap-on-touch-or/m-p/1503389#M2858</link>
    <description>&lt;P&gt;I am trying to get current x and current y (lat/lng) on webmap ontouchlistener, As I have implemented webmap layer and trying to get click x and y but unable to get if anyone knows how to get please let me know&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jul 2024 05:43:28 GMT</pubDate>
    <dc:creator>NancySuez</dc:creator>
    <dc:date>2024-07-10T05:43:28Z</dc:date>
    <item>
      <title>How to get Current X and Y on webmap on touch or clicklistener</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/how-to-get-current-x-and-y-on-webmap-on-touch-or/m-p/1503389#M2858</link>
      <description>&lt;P&gt;I am trying to get current x and current y (lat/lng) on webmap ontouchlistener, As I have implemented webmap layer and trying to get click x and y but unable to get if anyone knows how to get please let me know&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 05:43:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/how-to-get-current-x-and-y-on-webmap-on-touch-or/m-p/1503389#M2858</guid>
      <dc:creator>NancySuez</dc:creator>
      <dc:date>2024-07-10T05:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Current X and Y on webmap on touch or clicklistener</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/how-to-get-current-x-and-y-on-webmap-on-touch-or/m-p/1503405#M2859</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/743877"&gt;@NancySuez&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming you are writing a desktop JavaFX application (not a JavaScript web app), take a look at this &lt;A href="https://github.com/Esri/arcgis-maps-sdk-java-samples/tree/main/display_information/show-callout" target="_self"&gt;sample&lt;/A&gt; application which listens to a&amp;nbsp;&lt;SPAN&gt;setOnMouseClicked event and converts the screen coordinates to a WGS84 (lat / long) point.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Key steps are:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;      // click event to display the callout
      mapView.setOnMouseClicked(e -&amp;gt; {

        // check that the primary mouse button was clicked and user is not panning
        if (e.getButton() == MouseButton.PRIMARY &amp;amp;&amp;amp; e.isStillSincePress()) {

          // create a point from where the user clicked
          Point2D point = new Point2D(e.getX(), e.getY());

          // create a map point from a point
          Point mapPoint = mapView.screenToLocation(point);

          // project user-tapped map point location
          Point projectedPoint = (Point)GeometryEngine.project(mapPoint, SpatialReferences.getWgs84());&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Does this help?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 08:50:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/how-to-get-current-x-and-y-on-webmap-on-touch-or/m-p/1503405#M2859</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2024-07-10T08:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Current X and Y on webmap on touch or clicklistener</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/how-to-get-current-x-and-y-on-webmap-on-touch-or/m-p/1505256#M2863</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/48868"&gt;@MarkBaird&lt;/a&gt;&amp;nbsp;Thankyou for sharing the solution....Its working&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2024 04:25:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/how-to-get-current-x-and-y-on-webmap-on-touch-or/m-p/1505256#M2863</guid>
      <dc:creator>NancySuez</dc:creator>
      <dc:date>2024-07-15T04:25:31Z</dc:date>
    </item>
  </channel>
</rss>

