Features NVZ takes more time to load on map

667
3
02-12-2020 03:27 AM
ShivamMishra2
New Contributor

Here is my code: 

var map;
require([
"esri/widgets/Sketch",
"esri/Map",
"esri/layers/GraphicsLayer",
"esri/views/MapView",
"esri/geometry/Polygon",
"esri/layers/FeatureLayer",
"esri/symbols/SimpleLineSymbol",
"esri/Graphic",
"esri/symbols/SimpleFillSymbol",
"esri/Color"
],
function(Sketch, Map, GraphicsLayer, MapView, Polygon, FeatureLayer, SimpleLineSymbol, Graphic, SimpleFillSymbol, Color) {
const layer = new GraphicsLayer();
const map = new Map({
basemap: "streets",
layers: [layer]
});

const view = new MapView({
container: "map",
map: map,
zoom: 5,
center: [-3.118092, 54.509865]
});

// set dynamic url for feature layer
function initOperationalLayer() {
var featureLayer = new  FeatureLayer("https://environment.data.gov.uk/arcgis/rest/services/EA/NitrateVulnerableZones2017Final/FeatureServer/0",{
mode: FeatureLayer.MODE_ONDEMAND,
map.add(featureLayer);
}
initOperationalLayer();
});

Please see this screen shots: 

0 Kudos
3 Replies
irtizahussain
Occasional Contributor

You can set the visibility of your layer by this. min Scale

ShivamMishra2
New Contributor

Thanks!

I set the min Scale and its working.

But I have one issue that I mentioned in the previous question that it takes more time to load.

I have attached the video:

Here is the link: Untitled: Feb 13, 2020 11:15 AM.webm - Google Drive 

0 Kudos
ShivamMishra2
New Contributor

Can you please provide me the solution for this loading issue.

0 Kudos