<?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 Bookmark Widget - disable zoom in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/bookmark-widget-disable-zoom/m-p/1537034#M14773</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was hoping to find a way to use the bookmark widget as a way to turn on and off multiple layers at a time.&amp;nbsp; I don't want the map extent to change, only the new layers to be displayed.&amp;nbsp; In the section below (around line 665 of the widget tsx file, I tried removing&amp;nbsp;&lt;STRONG&gt;jimuMapView.view.goTo&lt;/STRONG&gt; section but that did not have the desired result.&amp;nbsp; The bookmark would still change the map extent.&amp;nbsp; My custom bookmark widget did not throw any errors when starting the client.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The question of turning multiple layers on and off using a button or other method has been discussed before.&amp;nbsp; So far the only solution is to use different views.&amp;nbsp; For my application I would like to use separate views for another purpose and would not want to manage 15-20 different views for simple layer toggles.&amp;nbsp; I was able to this in Web AppBuilder.&amp;nbsp; Any ideas to make this work in Experience Builder via a button or Bookmark widget would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;viewBookmark = (item: ImmutableObject&amp;lt;Bookmark&amp;gt;) =&amp;gt; {
    const { appMode, config } = this.props
    const { jimuMapView } = this.state
    const { extent, viewpoint } = item
    const gotoOpts = { duration: AUTOPLAY_DURATION }

    if (appMode === AppMode.Run) {
      if (jimuMapView &amp;amp;&amp;amp; jimuMapView.view) {
        jimuMapView.view.type === '3d'
          ? jimuMapView.view.goTo(
            this.Viewpoint.fromJSON(viewpoint),
            gotoOpts
          )
          : jimuMapView.view.goTo(
            this.Extent.fromJSON(extent),
            gotoOpts
          )
        if (item.baseMap) {
          const baseMapJson = item.baseMap.asMutable ? item.baseMap.asMutable({ deep: true }) : item.baseMap
          jimuMapView.view.map.basemap = this.Basemap.fromJSON(baseMapJson)
        }
        if (item.timeExtent) {
          const timeExtent = item.timeExtent.asMutable({ deep: true })
          applyTimeExtent(jimuMapView, timeExtent)
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Sep 2024 19:19:06 GMT</pubDate>
    <dc:creator>Leonidas</dc:creator>
    <dc:date>2024-09-10T19:19:06Z</dc:date>
    <item>
      <title>Bookmark Widget - disable zoom</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/bookmark-widget-disable-zoom/m-p/1537034#M14773</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was hoping to find a way to use the bookmark widget as a way to turn on and off multiple layers at a time.&amp;nbsp; I don't want the map extent to change, only the new layers to be displayed.&amp;nbsp; In the section below (around line 665 of the widget tsx file, I tried removing&amp;nbsp;&lt;STRONG&gt;jimuMapView.view.goTo&lt;/STRONG&gt; section but that did not have the desired result.&amp;nbsp; The bookmark would still change the map extent.&amp;nbsp; My custom bookmark widget did not throw any errors when starting the client.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The question of turning multiple layers on and off using a button or other method has been discussed before.&amp;nbsp; So far the only solution is to use different views.&amp;nbsp; For my application I would like to use separate views for another purpose and would not want to manage 15-20 different views for simple layer toggles.&amp;nbsp; I was able to this in Web AppBuilder.&amp;nbsp; Any ideas to make this work in Experience Builder via a button or Bookmark widget would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;viewBookmark = (item: ImmutableObject&amp;lt;Bookmark&amp;gt;) =&amp;gt; {
    const { appMode, config } = this.props
    const { jimuMapView } = this.state
    const { extent, viewpoint } = item
    const gotoOpts = { duration: AUTOPLAY_DURATION }

    if (appMode === AppMode.Run) {
      if (jimuMapView &amp;amp;&amp;amp; jimuMapView.view) {
        jimuMapView.view.type === '3d'
          ? jimuMapView.view.goTo(
            this.Viewpoint.fromJSON(viewpoint),
            gotoOpts
          )
          : jimuMapView.view.goTo(
            this.Extent.fromJSON(extent),
            gotoOpts
          )
        if (item.baseMap) {
          const baseMapJson = item.baseMap.asMutable ? item.baseMap.asMutable({ deep: true }) : item.baseMap
          jimuMapView.view.map.basemap = this.Basemap.fromJSON(baseMapJson)
        }
        if (item.timeExtent) {
          const timeExtent = item.timeExtent.asMutable({ deep: true })
          applyTimeExtent(jimuMapView, timeExtent)
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 19:19:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/bookmark-widget-disable-zoom/m-p/1537034#M14773</guid>
      <dc:creator>Leonidas</dc:creator>
      <dc:date>2024-09-10T19:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Bookmark Widget - disable zoom</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/bookmark-widget-disable-zoom/m-p/1537253#M14786</link>
      <description>&lt;P&gt;I took a quick look at the code for the Bookmark Widget and I believe you have correctly identified the part of the code that makes the map move.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you working in a copy of the Bookmark Widget that you have re-named and moved into the your-extensions folder?&amp;nbsp;&lt;A href="https://community.esri.com/t5/experience-builder-tips-and-tricks/modifying-esri-widgets-and-making-the-search/ba-p/1373949" target="_blank"&gt;https://community.esri.com/t5/experience-builder-tips-and-tricks/modifying-esri-widgets-and-making-the-search/ba-p/1373949&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Can you add a console.log to verify that this section of code is being hit when the bookmark is used?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 12:17:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/bookmark-widget-disable-zoom/m-p/1537253#M14786</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2024-09-11T12:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Bookmark Widget - disable zoom</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/bookmark-widget-disable-zoom/m-p/1537418#M14798</link>
      <description>&lt;P&gt;If you have a working widget, please consider sharing it in the custom widgets group. I'm sure many people would find it useful.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/experience-builder-custom-widgets/gh-p/eb-custom-widgets" target="_blank"&gt;https://community.esri.com/t5/experience-builder-custom-widgets/gh-p/eb-custom-widgets&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 16:26:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/bookmark-widget-disable-zoom/m-p/1537418#M14798</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2024-09-11T16:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Bookmark Widget - disable zoom</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/bookmark-widget-disable-zoom/m-p/1537547#M14804</link>
      <description>&lt;P&gt;I posted a reply but I guess it did not make it through for some reason.&amp;nbsp; I had to comment out the 3d section in the ternary conditional.&amp;nbsp; Originally I had delated the second part of the ternary clause.&amp;nbsp; Code is pasted below.&amp;nbsp; It is not pretty.&amp;nbsp; I will likely clean it up as the code below shows the console testing I was doing.&amp;nbsp; Thanks for the tip.&lt;/P&gt;&lt;P&gt;I am not sure where the view type is set as 3d in app or webmap.&amp;nbsp; Initially I only removed the second jimuMapView.view.goTo which was what I though would apply to my map.&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if (appMode === AppMode.Run) {
      if (jimuMapView &amp;amp;&amp;amp; jimuMapView.view) {
	    console.log("Bookmark no zoom test");
        jimuMapView.view.type === '3d'
          /*jimuMapView.view.goTo(
            this.Viewpoint.fromJSON(viewpoint),
            gotoOpts
          )*/
		console.log("3D zoom test");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 21:02:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/bookmark-widget-disable-zoom/m-p/1537547#M14804</guid>
      <dc:creator>Leonidas</dc:creator>
      <dc:date>2024-09-11T21:02:58Z</dc:date>
    </item>
  </channel>
</rss>

