Hi,
im working with the Javascript API 4.4 visualizing features on the map depending on a query.
The map is lagging while panning and zooming depending on the amount of features / size of the browser window and level of zoom. I am using Chrome as a browser.
I tried 2 things to visualize the features:
rooms.queryFeatures(query1).then(function(result) {
for (i = 0; i < result.features.length; i++) {
addGraphicsToLayer(result.features[i]);
}
roomsGraphic.visible = true;
});
The addGraphicsToLayer() handles the symbolization based on attributes of the feature. Following the feature is added to the GraphicsLayer
roomsGraphic.add(feature);
In both cases the map gets laggy while in 3.x i was able to create a smooth map with even more features from other services using "mode: esri.layers.FeatureLayer.MODE_SELECTION" (Feature Service 3.x) on each feature layer.
Is there another possibility to visualize features with a better performance on the view or am i missing something else?
Thanks,
Wiard
I solved the problem by using a MapImageLayer for the visualization, controlling the content by .definitionExpression. Clicking on the map i query the feature service for the geoemtry of the map point.
Regards