Select to view content in your preferred language

ViewLayer query features

63
2
Thursday
Aeseir
by
Frequent Contributor

We currently have a function that queries the FeatureLayer for specific features.

As part of optimisation it was identified that querying FeatureLayerView should be the way to go.

We want to implement something similar for MapImageLayers, however sublayers don't seem to have equivalent of FeatureLayerView.

 

Any advice on how to approach this?

0 Kudos
2 Replies
JonathanDawe_BAS
Regular Contributor

Querying the FeatureLayerView is an optimisation as it will allow you to query client side features - i.e. spatial data that has already been brought down to render in your mapview. This will be quicker in many cases as a request does not need to be sent across to be processed by the server, but it also has the caveat that you might not have the full resolution geometries or data that isn't available in the current view on the client side. 

For MapImageLayers there isn't really any equivalent as there are not client-side features brought down. Instead the server is providing static images. This means that any queries will need to go directly to the server, and thus just use the standard query methods available. 

Does that make sense?  

 

Aeseir
by
Frequent Contributor

Yep, thought as much.

So basically an approach I managed to land on today convert each sublayer to featurelayer, create layerview that which is added to map as FeatureLayerVIew which then act on it. Once finished, get rid of the temporary views.