<?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: Disable zoom widget on mobile device screen only in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-zoom-widget-on-mobile-device-screen-only/m-p/1332517#M82321</link>
    <description>&lt;P&gt;Is the search widget not included? I've put "search" and "Search"&amp;nbsp; in the ui.compenents and they cause an error.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;ui.components = [
  "attribution",
  "zoom",
  "search"
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JaredPilbeam2_0-1695745576948.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81668i9A96272E214E979C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JaredPilbeam2_0-1695745576948.png" alt="JaredPilbeam2_0-1695745576948.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Sep 2023 16:26:33 GMT</pubDate>
    <dc:creator>JaredPilbeam2</dc:creator>
    <dc:date>2023-09-26T16:26:33Z</dc:date>
    <item>
      <title>Disable zoom widget on mobile device screen only</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-zoom-widget-on-mobile-device-screen-only/m-p/1332404#M82318</link>
      <description>&lt;P&gt;This works to remove it completely with v. 4.27.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const view = new MapView({
  container: "viewDiv",
  map: map,
  // Exclude the zoom widget from the default UI
  ui: {
    components: ["attribution"]
  }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/view-disable-navigation/" target="_self"&gt;sample code&lt;/A&gt; doesn't mention how to disable the zoom widget on mobile device only. Is that possible? It's not so practical and takes up too much room.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 14:09:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-zoom-widget-on-mobile-device-screen-only/m-p/1332404#M82318</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2023-09-26T14:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Disable zoom widget on mobile device screen only</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-zoom-widget-on-mobile-device-screen-only/m-p/1332436#M82320</link>
      <description>&lt;P&gt;You can watch for changes to the widthBreakpoint or heightBreakpoint of the View.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#widthBreakpoint" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#widthBreakpoint&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#heightBreakpoint" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#heightBreakpoint&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Then you can add/remove widgets as needed.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;watch(
	() =&amp;gt; view.widthBreakpoint,
	(breakpoint) =&amp;gt; {
		switch (breakpoint) {
			case "xsmall":
			case "small":
				view.ui.remove("zoom");
				break;
			default:
				if (!view.ui.find("zoom")) {
					view.ui.add("zoom", "top-left");
				}
		}
	}
);&lt;/LI-CODE&gt;&lt;P&gt;Here's a demo:&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/odoe/pen/OJrZVVW?editors=0011" target="_blank"&gt;https://codepen.io/odoe/pen/OJrZVVW?editors=0011&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 14:46:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-zoom-widget-on-mobile-device-screen-only/m-p/1332436#M82320</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2023-09-26T14:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Disable zoom widget on mobile device screen only</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-zoom-widget-on-mobile-device-screen-only/m-p/1332517#M82321</link>
      <description>&lt;P&gt;Is the search widget not included? I've put "search" and "Search"&amp;nbsp; in the ui.compenents and they cause an error.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;ui.components = [
  "attribution",
  "zoom",
  "search"
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JaredPilbeam2_0-1695745576948.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81668i9A96272E214E979C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JaredPilbeam2_0-1695745576948.png" alt="JaredPilbeam2_0-1695745576948.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 16:26:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-zoom-widget-on-mobile-device-screen-only/m-p/1332517#M82321</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2023-09-26T16:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Disable zoom widget on mobile device screen only</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-zoom-widget-on-mobile-device-screen-only/m-p/1332551#M82323</link>
      <description>&lt;P&gt;Search can't be added by string, I think it's just "zoom", and "attribution"&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 17:40:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-zoom-widget-on-mobile-device-screen-only/m-p/1332551#M82323</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2023-09-26T17:40:40Z</dc:date>
    </item>
  </channel>
</rss>

