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:
<script>
require([
"esri/config",
"esri/Map",
"esri/views/MapView",
"esri/layers/FeatureLayer",
"esri/layers/support/LabelClass"
], (esriConfig, Map, MapView, FeatureLayer, LabelClass) => {
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);
});
</script>
In this, whatever value I set for the zoom it is not reflecting.