<?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 Imitate right click &amp;quot;What's Here?&amp;quot; from map viewer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/imitate-right-click-quot-what-s-here-quot-from-map/m-p/1385629#M83720</link>
    <description>&lt;P&gt;The AGOL map viewer allows you to right click, see a context menu with "What's Here", reverse geocode the location, and display results in the popup.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="whatshere.gif" style="width: 624px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/95538iBF8C4C3CD349FBE1/image-size/large?v=v2&amp;amp;px=999" role="button" title="whatshere.gif" alt="whatshere.gif" /&gt;&lt;/span&gt;&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;P&gt;How do you mimic this with the javascript api 4.28?&lt;/P&gt;&lt;P&gt;I believe the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#event-click" target="_blank" rel="noopener"&gt;event click&lt;/A&gt;&amp;nbsp;and the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/tutorials/reverse-geocode/" target="_blank" rel="noopener"&gt;reverse-geocode&lt;/A&gt;&amp;nbsp;docs should get most of the way. I'm not sure about the context menu. The closest thing for 4.x I could find is the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-Grid-support-ButtonMenuViewModel.html?" target="_blank" rel="noopener"&gt;ButtonMenuViewModel&lt;/A&gt;. There are no samples available for usage.&lt;/P&gt;&lt;P&gt;There is also a sample from 3.x that does similar functionality.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/3/jssamples/graphics_contextmenu.html" target="_self"&gt;https://developers.arcgis.com/javascript/3/jssamples/graphics_contextmenu.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2024 18:57:29 GMT</pubDate>
    <dc:creator>DavinShokes1</dc:creator>
    <dc:date>2024-02-22T18:57:29Z</dc:date>
    <item>
      <title>Imitate right click "What's Here?" from map viewer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/imitate-right-click-quot-what-s-here-quot-from-map/m-p/1385629#M83720</link>
      <description>&lt;P&gt;The AGOL map viewer allows you to right click, see a context menu with "What's Here", reverse geocode the location, and display results in the popup.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="whatshere.gif" style="width: 624px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/95538iBF8C4C3CD349FBE1/image-size/large?v=v2&amp;amp;px=999" role="button" title="whatshere.gif" alt="whatshere.gif" /&gt;&lt;/span&gt;&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;P&gt;How do you mimic this with the javascript api 4.28?&lt;/P&gt;&lt;P&gt;I believe the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#event-click" target="_blank" rel="noopener"&gt;event click&lt;/A&gt;&amp;nbsp;and the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/tutorials/reverse-geocode/" target="_blank" rel="noopener"&gt;reverse-geocode&lt;/A&gt;&amp;nbsp;docs should get most of the way. I'm not sure about the context menu. The closest thing for 4.x I could find is the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-Grid-support-ButtonMenuViewModel.html?" target="_blank" rel="noopener"&gt;ButtonMenuViewModel&lt;/A&gt;. There are no samples available for usage.&lt;/P&gt;&lt;P&gt;There is also a sample from 3.x that does similar functionality.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/3/jssamples/graphics_contextmenu.html" target="_self"&gt;https://developers.arcgis.com/javascript/3/jssamples/graphics_contextmenu.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 18:57:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/imitate-right-click-quot-what-s-here-quot-from-map/m-p/1385629#M83720</guid>
      <dc:creator>DavinShokes1</dc:creator>
      <dc:date>2024-02-22T18:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Imitate right click "What's Here?" from map viewer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/imitate-right-click-quot-what-s-here-quot-from-map/m-p/1385753#M83722</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/147148"&gt;@DavinShokes1&lt;/a&gt;&amp;nbsp;-&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's an example on how this could be implemented with a button in the view (based off the &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/intro-popup/" target="_self"&gt;Intro to popups sample&lt;/A&gt;&amp;nbsp;) :&lt;A href="https://codepen.io/laurenb14/pen/QWoRRpj?editors=1000" target="_blank" rel="noopener"&gt;https://codepen.io/laurenb14/pen/QWoRRpj?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The workflow goes something like this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Watch when the MapView click event occurs.&lt;/LI&gt;&lt;LI&gt;Check if the right button was clicked and add a graphic to the map where the user clicked.&lt;/LI&gt;&lt;LI&gt;Display a button or tooltip to open the popup with the information from the reverse geocoding using the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#openPopup" target="_self"&gt;MapView.openPopup()&lt;/A&gt; method.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;You can always implement some sort of clickable tooltip to display at the clicked location as well.&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 21:52:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/imitate-right-click-quot-what-s-here-quot-from-map/m-p/1385753#M83722</guid>
      <dc:creator>LaurenBoyd</dc:creator>
      <dc:date>2024-02-22T21:52:35Z</dc:date>
    </item>
  </channel>
</rss>

