<?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: Zoom not working if basemap is disabled arcgis javascript in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-not-working-if-basemap-is-disabled-arcgis/m-p/1258865#M80286</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/657951"&gt;@aggarwalarpit93&lt;/a&gt;, without a basemap I think you likely need to use the scale property instead of zoom.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require([
  "esri/config",
  "esri/Map",
  "esri/views/MapView",
  "esri/layers/FeatureLayer",
  "esri/layers/support/LabelClass"
], (esriConfig, Map, MapView, FeatureLayer, LabelClass) =&amp;gt; {
  esriConfig.apiKey = "";

  const map = new Map();

  const view = new MapView({
    map: map,
    center: [85.7780685, 25.8560264],
    scale: 3000000,
    container: "viewDiv",
    constraints: {
      snapToZoom: false
    }
  });

  // Add district layer to the mapview
  const districtLayer = new FeatureLayer({
    url:
      "https://gis.fmiscwrdbihar.gov.in/arcgis/rest/services/GisAtlas/GIS_Atlas_2023/MapServer/22",
    outFields: ["*"]
  });
  map.add(districtLayer, 0);
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Feb 2023 13:44:00 GMT</pubDate>
    <dc:creator>Sage_Wall</dc:creator>
    <dc:date>2023-02-16T13:44:00Z</dc:date>
    <item>
      <title>Zoom not working if basemap is disabled arcgis javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-not-working-if-basemap-is-disabled-arcgis/m-p/1258777#M80281</link>
      <description>&lt;P&gt;Hello, I have a map and using API key to display map. In API key I have disabled the basemap and using only feature layers without showing any map in the background. But if I do this map default zoom setting not working. Here is what I am trying:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;&amp;lt;script&amp;gt;
        require([
            "esri/config",
            "esri/Map",
            "esri/views/MapView",
            "esri/layers/FeatureLayer",
            "esri/layers/support/LabelClass"
        ], (esriConfig, Map, MapView, FeatureLayer, LabelClass) =&amp;gt; {

            esriConfig.apiKey= API_KEY;

            const map = new Map();

            const view = new MapView({
                map: map,
                center: [85.7780685, 25.8560264],
                zoom: 12,
                container: "viewDiv",
                constraints: {
                    snapToZoom: false
                }
            });

            // Add district layer to the mapview
            const districtLayer = new FeatureLayer({
                url: "https://gis.fmiscwrdbihar.gov.in/arcgis/rest/services/GisAtlas/GIS_Atlas_2023/MapServer/22",
                outFields:["*"],
            });
            map.add(districtLayer, 0);
        });
    &amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this, whatever value I set for the zoom it is not reflecting.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 05:18:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-not-working-if-basemap-is-disabled-arcgis/m-p/1258777#M80281</guid>
      <dc:creator>aggarwalarpit93</dc:creator>
      <dc:date>2023-02-16T05:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom not working if basemap is disabled arcgis javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-not-working-if-basemap-is-disabled-arcgis/m-p/1258865#M80286</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/657951"&gt;@aggarwalarpit93&lt;/a&gt;, without a basemap I think you likely need to use the scale property instead of zoom.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require([
  "esri/config",
  "esri/Map",
  "esri/views/MapView",
  "esri/layers/FeatureLayer",
  "esri/layers/support/LabelClass"
], (esriConfig, Map, MapView, FeatureLayer, LabelClass) =&amp;gt; {
  esriConfig.apiKey = "";

  const map = new Map();

  const view = new MapView({
    map: map,
    center: [85.7780685, 25.8560264],
    scale: 3000000,
    container: "viewDiv",
    constraints: {
      snapToZoom: false
    }
  });

  // Add district layer to the mapview
  const districtLayer = new FeatureLayer({
    url:
      "https://gis.fmiscwrdbihar.gov.in/arcgis/rest/services/GisAtlas/GIS_Atlas_2023/MapServer/22",
    outFields: ["*"]
  });
  map.add(districtLayer, 0);
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 13:44:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-not-working-if-basemap-is-disabled-arcgis/m-p/1258865#M80286</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2023-02-16T13:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom not working if basemap is disabled arcgis javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-not-working-if-basemap-is-disabled-arcgis/m-p/1259165#M80298</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="EggeJanPoll1_3-1676589289442.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/63058i6C97F9BC89459769/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EggeJanPoll1_3-1676589289442.png" alt="EggeJanPoll1_3-1676589289442.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/657951"&gt;@aggarwalarpit93&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Please see screen dump attached: your data in an application without a basemap.&lt;/P&gt;&lt;P&gt;I slightly modified your code (see below) and, next to the districts I also added the settlements, which will become visible when you zoom in.&lt;/P&gt;&lt;P&gt;Yeah, zooming in and zooming out is working fine.&lt;/P&gt;&lt;P&gt;And yeah, &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/507049"&gt;@Sage_Wall&lt;/a&gt; is right: you should use the &lt;STRONG&gt;scale&lt;/STRONG&gt; instead of the &lt;STRONG&gt;zoom&lt;/STRONG&gt; property.&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Egge-Jan&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="utf-8" /&amp;gt;
  &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" /&amp;gt;
  &amp;lt;title&amp;gt;Test: no background map&amp;lt;/title&amp;gt;
  &amp;lt;link rel="stylesheet" href="https://js.arcgis.com/4.25/esri/themes/light/main.css"&amp;gt;
  &amp;lt;script src="https://js.arcgis.com/4.25/"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;style&amp;gt;
    html, body {
      padding: 0;
      margin: 0;
      height: 100%;
      width: 100%;
      font-family: sans-serif;
    }
    #header {	
      width: 100%;
      height: 70px;
      background-color: #154273;
      color:#FFFFFF;
      margin: 0;
    }
    #headertext {
      float: left;
      font-size: 35px;
      color: white;
      line-height: 70px;
      padding-left: 15px;
    }
    #viewDiv {
      position: absolute;
      top: 70px;
      bottom: 0;
      right: 0;
      left: 0;
      padding: 0;
      margin: 0;
    }
  &amp;lt;/style&amp;gt;
  &amp;lt;script&amp;gt;
    require([
      "esri/Map",
      "esri/views/MapView",
      "esri/layers/FeatureLayer",
      "esri/widgets/LayerList",
      "esri/widgets/Expand",
    ], (Map, MapView, FeatureLayer, LayerList, Expand) =&amp;gt; {

      const map = new Map();

      const settlementLayer = new FeatureLayer({
        url: "https://gis.fmiscwrdbihar.gov.in/arcgis/rest/services/GisAtlas/GIS_Atlas_2023/MapServer/4",
        minScale: 100000
      });
      const districtLayer = new FeatureLayer({
        url: "https://gis.fmiscwrdbihar.gov.in/arcgis/rest/services/GisAtlas/GIS_Atlas_2023/MapServer/22",
      });

      map.addMany([districtLayer, settlementLayer]);

      const view = new MapView({
        map: map,
        center: [85.7780685, 25.8560264],
        scale: 1800000,
        container: "viewDiv",
      });

      const layerList = new LayerList({
        view: view,
        listItemCreatedFunction: function(event){
          const item = event.item;
          item.actionsSections = [
            [
              {
              title: item.layer.title,
              className: "esri-icon-description",
              id: "information"
              }
            ]
          ];
        }
      });
    
      layerList.on("trigger-action", function(event) {
        if (event.action.id === "information") {
          // If the information action is triggered, then open the item details page of the service layer.
          window.open(event.item.layer.url);
        }
      });
    
      const layerListExpand = new Expand({
        expandIconClass: "esri-icon-layers",
    //    expandTooltip: layerList.label,
        expandTooltip: "LayerList",
        view: view,
    	expanded: true,
        content: layerList,
        group: "expandable-widgets"
      });
      
      view.ui.add([layerListExpand], "top-right")
    });
  &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;div id="header"&amp;gt;
  &amp;lt;div id="headertext" class="stretch"&amp;gt;Test: no background map&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
  &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 23:19:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-not-working-if-basemap-is-disabled-arcgis/m-p/1259165#M80298</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2023-02-16T23:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom not working if basemap is disabled arcgis javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-not-working-if-basemap-is-disabled-arcgis/m-p/1259227#M80301</link>
      <description>&lt;P&gt;Thank you so much for the help.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 05:26:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-not-working-if-basemap-is-disabled-arcgis/m-p/1259227#M80301</guid>
      <dc:creator>aggarwalarpit93</dc:creator>
      <dc:date>2023-02-17T05:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom not working if basemap is disabled arcgis javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-not-working-if-basemap-is-disabled-arcgis/m-p/1259228#M80302</link>
      <description>&lt;P&gt;Thank you so much. Scale property is what I was looking for.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 05:26:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-not-working-if-basemap-is-disabled-arcgis/m-p/1259228#M80302</guid>
      <dc:creator>aggarwalarpit93</dc:creator>
      <dc:date>2023-02-17T05:26:36Z</dc:date>
    </item>
  </channel>
</rss>

