<?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: Map view re-render on click on android in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-view-re-render-on-click-on-android/m-p/1364258#M83205</link>
    <description>&lt;P&gt;I can confirm this happens with the live view of the sample linked above in the chrome browser on an up-to-date Samsung S20 FE:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/basemaps-portal/live/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/basemaps-portal/live/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Note: the problem goes away if I view the same page in 'desktop' mode (though that introduces a different issue, where the map either does not draw, or draws incorrectly when displayed in portrait - only works in landscape...I'm pretty sure that's an unrelated concern, as I've been seeing that behaviour for a while).&lt;/P&gt;</description>
    <pubDate>Mon, 25 Dec 2023 19:15:14 GMT</pubDate>
    <dc:creator>mleahy_cl</dc:creator>
    <dc:date>2023-12-25T19:15:14Z</dc:date>
    <item>
      <title>Map view re-render on click on android</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-view-re-render-on-click-on-android/m-p/1364075#M83196</link>
      <description>&lt;P&gt;Hello, Im using ArcGis javascript to create a web app especially for phones. At some point I found out, that on Android devices when the map is clicked (not touched - movement on map is fine), it re-renders for some reason.&amp;nbsp;&lt;BR /&gt;Ive tried it on different devices and OS (iphones, tablets, desktops with mobile settings..) and all are good but android devices.&lt;BR /&gt;&lt;BR /&gt;Here is a video with issue. Before each rerender comes click:&amp;nbsp;&lt;A href="https://drive.google.com/file/d/1PU5s_6yUsLoGqfmLHI3RnPjaUUtnp3vr/view?usp=sharing" target="_self"&gt;video&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The code is pretty simple:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;const &lt;/SPAN&gt;&lt;SPAN&gt;mapDiv &lt;/SPAN&gt;= &lt;SPAN&gt;useRef&lt;/SPAN&gt;&amp;lt;&lt;SPAN&gt;any&lt;/SPAN&gt;&amp;gt;(&lt;SPAN&gt;null&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;useEffect&lt;/SPAN&gt;(() =&amp;gt; {&lt;BR /&gt;    &lt;SPAN&gt;if &lt;/SPAN&gt;(!&lt;SPAN&gt;mapDiv&lt;/SPAN&gt;.&lt;SPAN&gt;current&lt;/SPAN&gt;) &lt;SPAN&gt;return&lt;/SPAN&gt;;&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;const &lt;/SPAN&gt;&lt;SPAN&gt;initializeMap &lt;/SPAN&gt;= () =&amp;gt; {&lt;BR /&gt;       &lt;SPAN&gt;try &lt;/SPAN&gt;{&lt;BR /&gt;          &lt;SPAN&gt;const &lt;/SPAN&gt;&lt;SPAN&gt;map &lt;/SPAN&gt;= &lt;SPAN&gt;new &lt;/SPAN&gt;Map({&lt;BR /&gt;             &lt;SPAN&gt;basemap&lt;/SPAN&gt;: &lt;SPAN&gt;'dark-gray-vector'&lt;/SPAN&gt;,&lt;BR /&gt;          });&lt;BR /&gt;&lt;BR /&gt;          &lt;SPAN&gt;const &lt;/SPAN&gt;&lt;SPAN&gt;mapView &lt;/SPAN&gt;= &lt;SPAN&gt;new &lt;/SPAN&gt;MapView({&lt;BR /&gt;             &lt;SPAN&gt;container&lt;/SPAN&gt;: &lt;SPAN&gt;mapDiv&lt;/SPAN&gt;.&lt;SPAN&gt;current&lt;/SPAN&gt;,&lt;BR /&gt;             &lt;SPAN&gt;map&lt;/SPAN&gt;: &lt;SPAN&gt;map&lt;/SPAN&gt;,&lt;BR /&gt;             &lt;SPAN&gt;center&lt;/SPAN&gt;: [&lt;SPAN&gt;16&lt;/SPAN&gt;, &lt;SPAN&gt;49&lt;/SPAN&gt;],&lt;BR /&gt;             &lt;SPAN&gt;zoom&lt;/SPAN&gt;: &lt;SPAN&gt;18&lt;/SPAN&gt;,&lt;BR /&gt;          });&lt;BR /&gt;&lt;BR /&gt;          &lt;SPAN&gt;return &lt;/SPAN&gt;() =&amp;gt; {&lt;BR /&gt;             &lt;SPAN&gt;mapView &lt;/SPAN&gt;&amp;amp;&amp;amp; &lt;SPAN&gt;mapView&lt;/SPAN&gt;.&lt;SPAN&gt;destroy&lt;/SPAN&gt;()&lt;BR /&gt;          };&lt;BR /&gt;       } &lt;SPAN&gt;catch &lt;/SPAN&gt;(error) {&lt;BR /&gt;          &lt;SPAN&gt;console&lt;/SPAN&gt;.&lt;SPAN&gt;error&lt;/SPAN&gt;(&lt;SPAN&gt;"Error creating map:"&lt;/SPAN&gt;, error);&lt;BR /&gt;       }&lt;BR /&gt;    };&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;initializeMap&lt;/SPAN&gt;();&lt;BR /&gt;}, []);&lt;/PRE&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;return &lt;/SPAN&gt;(&lt;BR /&gt;    &lt;SPAN&gt;&amp;lt;div &lt;/SPAN&gt;ref&lt;SPAN&gt;=&lt;/SPAN&gt;{ &lt;SPAN&gt;mapDiv &lt;/SPAN&gt;} className&lt;SPAN&gt;="map-container" &lt;/SPAN&gt;&lt;SPAN&gt;/&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;Ive also tried some ArcGis examples and with some of them I experience the same behavior.&amp;nbsp;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;A title="https://developers.arcgis.com/javascript/latest/sample-code/basemaps-portal/" href="https://developers.arcgis.com/javascript/latest/sample-code/basemaps-portal/" target="_blank" rel="noreferrer noopener"&gt;https://developers.arcgis.com/javascript/latest/sample-code/basemaps-portal/&lt;/A&gt;&amp;nbsp;in codepen this map rerenders after click on android phone.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;But this one doesnt get rerendered:&amp;nbsp;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;A title="https://developers.arcgis.com/javascript/latest/sample-code/widgets-basemapgallery/" href="https://developers.arcgis.com/javascript/latest/sample-code/widgets-basemapgallery/" target="_blank" rel="noreferrer noopener"&gt;https://developers.arcgis.com/javascript/latest/sample-code/widgets-basemapgallery/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Im really confused about this behavior, can anyone tell me how to stop these unwanted mapView re-renders?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Im using:&lt;BR /&gt;- Typescript 4.4.2&lt;BR /&gt;- React 18.2.0&lt;BR /&gt;- Arcgis core 4.28.10&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2023 18:24:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-view-re-render-on-click-on-android/m-p/1364075#M83196</guid>
      <dc:creator>MichalKopčil</dc:creator>
      <dc:date>2023-12-22T18:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Map view re-render on click on android</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-view-re-render-on-click-on-android/m-p/1364258#M83205</link>
      <description>&lt;P&gt;I can confirm this happens with the live view of the sample linked above in the chrome browser on an up-to-date Samsung S20 FE:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/basemaps-portal/live/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/basemaps-portal/live/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Note: the problem goes away if I view the same page in 'desktop' mode (though that introduces a different issue, where the map either does not draw, or draws incorrectly when displayed in portrait - only works in landscape...I'm pretty sure that's an unrelated concern, as I've been seeing that behaviour for a while).&lt;/P&gt;</description>
      <pubDate>Mon, 25 Dec 2023 19:15:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-view-re-render-on-click-on-android/m-p/1364258#M83205</guid>
      <dc:creator>mleahy_cl</dc:creator>
      <dc:date>2023-12-25T19:15:14Z</dc:date>
    </item>
  </channel>
</rss>

