Select to view content in your preferred language

Issue in visualization of a feature layer served through Koop

440
1
12-25-2023 03:59 AM
imrankhadri
Occasional Contributor

Hello,

I have a csv file(around 40000 recrords) that is loaded in koop and then loaded in a webscene as a featurelayer. The layer is being rendered using UniqueValueRenderer with a WebSyleSymbol.

The features are visible at all scales until all the features are downloaded on client side(paginated requests, as observed in the network activity) 
and after the layer is loaded fully , the features are only visible when zoomed out and disappear if zoomed in.

The same behaviour/issue is noticed if the featurelayer is served from a GeoJSON in Koop.

A featureLayer consumed from an ArcGIS server works with out any issues.

 

visualVariables=new Array<VisualVariable>();
visualVariables.push(new SizeVariable({
valueExpression:"10000",
}));

let renderer=new UniqueValueRenderer({
defaultSymbol:new WebStyleSymbol({
name:"Acer",
styleName: "EsriRealisticTreesStyle"
}),
visualVariables: visualVariables
})

const vegetationLayer = new FeatureLayer({

url:"http://localhost:8089/koop-provider-csv/rest/services/cities/FeatureServer/0",
elevationInfo: {
mode: "on-the-ground"
},
renderer: renderer,
outFields: ["*"],
minScale:0,
maxScale:0,
geometryType:"point",

});

 

I am attaching a video that shows the actual issue in action.

0 Kudos
1 Reply
imrankhadri
Occasional Contributor

I have observed the following difference between feature layers hosted on Koop and ArcGIS Server

In case of Feature layer hosted on ArcGIS Server, the feature query requests are applied with a spatial Filter i.e records within current view extent are fetched whereas the features from koopjs layers are downloaded completely through paginated requests.

So I thought of enabling koopjs requests to query based on view extent. The following undocumented trick solves the issue temporarily and is just a workaround. Now my layer loads properly at all scales.

Add this in a script tag prior to loading the API to enable extent based requests.

 

var dojoConfig = { has: { "featurelayer-snapshot-enabled": 0 // disable snapshot } };

 

Can anyone throw some light on why the this is happening?

0 Kudos