Set your source to a point layer with millions of points Set the center of the map to where data exists Load the map.
Created
January 10, 2022 19:52
-
-
Save ryansutc/d33a0c21df91b93bfb95485c4946bf0a to your computer and use it in GitHub Desktop.
Layer Load Slow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require([ | |
"esri/Map", | |
"esri/views/MapView", | |
"esri/layers/FeatureLayer", | |
], function (Map, MapView, FeatureLayer) { | |
// The slow load problem on a large dataset can be produced with code as simple as this: | |
let url = | |
[yer point url] | |
let layer = new FeatureLayer({ | |
url: url, | |
}); | |
let map = new Map({ | |
basemap: "topo", | |
layers: [layer], | |
}); | |
let view = new MapView({ | |
container: "viewDiv", | |
map: map, | |
zoom: 17, | |
center: [yer extent], | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment