Skip to content

Instantly share code, notes, and snippets.

@ryansutc
Created January 10, 2022 19:52
Show Gist options
  • Save ryansutc/d33a0c21df91b93bfb95485c4946bf0a to your computer and use it in GitHub Desktop.
Save ryansutc/d33a0c21df91b93bfb95485c4946bf0a to your computer and use it in GitHub Desktop.
Layer Load Slow

Set your source to a point layer with millions of points Set the center of the map to where data exists Load the map.

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