Select to view content in your preferred language

Offline definitionExpression

4124
8
Jump to solution
04-25-2014 07:05 AM
RobFisher
New Contributor
I am moving a working iOS application to incorporate offline features.  I was using a definitionExpression on a feature layer to display only certain features when showing the map to simulate two different layers that share the same base table.

Moving the layer to a geodatabase and loading it as a AGSFeatureTableLayer I cannot seem to figure out how to replicate this filtering via a definitionExpression to show only one set of features on the map at a time.

Is this currently possible?

Thanks,
Rob
0 Kudos
1 Solution

Accepted Solutions
DiveshGoyal
Esri Regular Contributor
We currently don't have a way to filter features using a definitionExpression on AGSFeatureTableLayer. We hope to add this in an upcoming release.

You can manually toggle the visibility of features by using setVisible:forFeature: on AGSFeatureTableLayer
See https://developers.arcgis.com/ios/api-reference/interface_a_g_s_feature_table_layer.html#a5528e48638...

View solution in original post

0 Kudos
8 Replies
RobFisher
New Contributor
Is it even possible to set the visibility of offline features from an AGSFeatureTableLayer?  I can get a NSArray of the features I want to hide but they get returned as an AGSGDBFeature which has no visibility property.

Perhaps I'm not accessing the features via the right method but I can't see how to make a feature invisible which seems wrong.
0 Kudos
DiveshGoyal
Esri Regular Contributor
We currently don't have a way to filter features using a definitionExpression on AGSFeatureTableLayer. We hope to add this in an upcoming release.

You can manually toggle the visibility of features by using setVisible:forFeature: on AGSFeatureTableLayer
See https://developers.arcgis.com/ios/api-reference/interface_a_g_s_feature_table_layer.html#a5528e48638...
0 Kudos
MichaelDavis3
Regular Contributor

Are there any plans to implement a definition query functionality in the future? 

Setting visibility works, but cycling through every feature in a large-ish layer (13,000 points) is proving to be quite resource intensive and slow when running on a device.

0 Kudos
DiveshGoyal
Esri Regular Contributor

Yes, its definitely something we want to provide.

0 Kudos
MichaelDavis3
Regular Contributor

Thanks Divesh - From your answer I'll infer that this is something that might be in a future release, but probably won't be in this magical "Quartz" release Esri folks keep mentioning.

DiveshGoyal
Esri Regular Contributor

We hope to add it in Quartz

Nicholas-Furness
Esri Regular Contributor

Hey Rob,

FYI: definitionExpression was added to AGSFeatureTableLayer in 10.2.5 of the ArcGIS Runtime SDK for iOS.

Release notes for 10.2.5—ArcGIS Runtime SDK for iOS

Cheers,

Nick.

MichaelDavis3
Regular Contributor

This is fantastic - thanks Nick!

0 Kudos