0

My code as below:

require([ "esri/Map", "esri/views/SceneView", "esri/layers/FeatureLayer", "dojo/domReady!" ], function (Map, SceneView, FeatureLayer) {

var featureLayer = new FeatureLayer("https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/votes_popup_final3/FeatureServer/0");
var map = new Map({
    basemap: "streets",
    ground: "world-elevation",
    layers: [featureLayer]
});
var view = new SceneView({
    container: "viewDiv",     
    map: map,                
    scale: 5000000,         
    center: [-110, 32] 
});

});

The result as below: enter image description here

Only show a little part of all features. And show the below error in Firebug:

[esri.layers.graphics.controllers.SnapshotController] Feature limit exceeded on layer " Votes popup final3 - All Votes ". Not all features are shown.

But when use MapView, it can show all features. The code as below:

require([ "esri/Map", "esri/views/MapView", "esri/layers/FeatureLayer", "esri/widgets/Legend", "esri/widgets/LayerList", "dojo/domReady!" ], function (Map, MapView, FeatureLayer, Legend, LayerList) {

var featureLayer = new FeatureLayer("https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/votes_popup_final3/FeatureServer/0");
var map = new Map({
    basemap: "streets",
    layers: [featureLayer]
});

var view = new MapView({
    container: "viewDiv", 
    map: map,
    zoom: 4, 
    center: [-110, 32]
});

});

Of course need include webgl as below:

var dojoConfig = { has: { "esri-featurelayer-webgl": 1 } };

This time it can show all of features. The page shows as below: enter image description here

2

The WebGL is only available, as beta version, for 2D (MapView) and not for 3D (SceneView)

You can see that in the ESRI documentation:

Starting at version 4.5, you can render FeatureLayers with WebGL in 2D MapViews. [...] By default, FeatureLayer is rendered using Scalable Vector Graphics (SVG), which limits the number of features that can be displayed in the view. WebGL-rendered FeatureLayers overcome that limitation, allowing the user to display hundreds of thousands, potentially millions, of features in the browser.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.