I'm following some of the samples for creating a new AGSMap instance from a web map. This works fine except that filters on layers in the web map are not honored or used. My web map basically contains a layer that has a filter expression that limits features to a single floor within a building. When viewed on the web, the web map works fine. However, used within the iOS 100.0.0 SDK, features from all floors within the building are displayed.
Any help appreciated!
Hello. How are you setting the filter expression on the feature layer in the AGOL map viewer? I have been able to set a filter and have it loaded successfully using the "filter" button on the layer:
Once I set a filter, it looks like this:
And then how are you creating the AGSMap in your app? I'm using the following code:
let portal = AGSPortal.arcGISOnline(withLoginRequired: false)
let portalItem = AGSPortalItem(portal: portal, itemID: "415658075f2840b89925258867081d90")
let map = AGSMap(item:portalItem)
self.mapView.map = self.map
Thank you Mark. I'll compare your code to mine tonight. It looks similar but I was following a different sample which I don't think created the portal and portal item.