MAUI app - TilingMode behavior with FeatureLayer hosted in ArcGIS 11.1

438
5
12-04-2023 05:55 PM
DavidSchuster
Occasional Contributor

Good evening!

We are building a .NET MAUI app using version 200.2.0 of the Maps SDK, and we're experiencing an issue with the MapView not displaying all features for a particular FeatureLayer that we've added to the map.  At full extent, it only shows the first feature (the one added most recently to the database). When we zoom into other areas of the map where we expect to see other features, it will display just a single feature at that location. 

We have a separate WPF app that uses the same FeatureLayer, and a slightly older version of the Maps SDK (200.0.0) and it is able to display all of features correctly.  In addition, we have the same FeatureLayer hosted in an old environment running ArcGIS Server 10.71, and if I add this to the MAUI app it works fine.

After much trial and error, I found that if I set the FeatureLayer's TilingMode property to Disabled, then all features are displayed correctly in the MAUI app.

Is there something we need to do differently when publishing this FeatureLayer from ArcPro to ArcGIS Server 11.1 for this to work without setting the TilingMode?

Also, we initialize our MapView using a config JSON file we've built (by calling the Map.FromJson method).  To set the TilingMode, I was thinking I could add a parameter to the that section of the FeatureLayer's JSON, something like "tilingMode": 1, or "tilingMode": "disabled" but this doesn't seem to work.  In fact, the TilingMode doesn't even show up in the JSON if I use the Map.ToJson() method so I'm guessing it's not part of the de/serialization.  Can this be added?

Thanks in advance!

-David

0 Kudos
5 Replies
PreetiMaske
Esri Contributor

I am not sure where and what the problem is but I have few questions :


- What do you see when you add that featureservice in ArcGIS Pro or ArcGIS Online?

- Is 200.0 version of app, that display data correctly, using the same exact service that does not work with 200.2.

- What is the server version?

- What authoring tool was used to publish the service?

- How is Map's json constructed?

- Is it possible to share the service endpoint ?

0 Kudos
DavidSchuster
Occasional Contributor

Hi Preeti, sorry for the delayed reply.  Please see the answers to your questions down below.  

I tried reproducing this issue using a different feature layer from the same service and found that it worked as expected - in other words, all features are displayed.  I'll need to check with our GIS administrators to see if they can spot any differences in how these layers and their data sources are configured.

 

- What do you see when you add that featureservice in ArcGIS Pro or ArcGIS Online? 

When I add this service to ArcGIS Pro, it works correctly.  All features are displayed on the map.

- Is 200.0 version of app, that display data correctly, using the same exact service that does not work with 200.2. 

That's correct.  The app that works is a WPF .NET app using the 200.0 version.  The app that doesn't work is a .NET MAUI app using the 200.2 version.  Note, I also tried upgrading to 200.3 and also downgrading to 200.1 and 200.0, but the problem persists in all versions I tried.

- What is the server version? 

The server version is 11.1.

- What authoring tool was used to publish the service? 

ArcGIS Pro

- How is Map's json constructed?

We created a simple .NET app to programmatically add the basemap and operational layers we needed, then called the ToJson() method on that Map object to extract the json.  Note, however, that the problem persists whether we initialize the map manually or via the map's FromJson() method.

- Is it possible to share the service endpoint ?

Unfortunately, it's a sensitive layer that we cannot share externally.  I'll see if we can generate some fake data and create a new service to replicate the issue.

 

Thanks,

David

0 Kudos
DavidSchuster
Occasional Contributor

I think we found the root cause of the issue, although it doesn't make total sense to me why it behaved the way it did.

For the feature layer that wasn't displaying all of the features on the map in our MAUI app, its data source was a SQL Server view and the problem seems to be that the Object ID column for that view was a bigint data type, which apparently isn't fully supported.  On example is that in ArcGIS Pro we weren't able to open the feature table for that layer because of the bigint column.  As soon as we changed this to an int instead of a bigint and restarted the service, all of the features started showing up correctly.

Before this fix, I had a workaround of programmatically setting the TilingMode for the FeatureLayer to a value of disabled.  That made it so that all of the features showed up correctly.  When I compared the outgoing web requests to the map service using Fiddler (with and without setting the TilingMode), I noticed that with tiling mode disabled it was requesting a format of json.  Without setting tiling mode, it was requesting a format of pbf (protocol buffer format) and also sending request parameters of quantizationParameters and geometryPrecision=0.  So maybe something in the tiling process also didn't like the bigint data type as well?

0 Kudos
PreetiMaske
Esri Contributor

Thanks David for all the troubleshooting and digging. That's some very useful information. I will pass this information to our subject matter expert on the team. I will get back here when I have something to share.

 

Thanks again,

Preeti

0 Kudos
PreetiMaske
Esri Contributor

Also, in the meantime if you can prepare and share some test data that we could use, that will be very helpful for us to get to the bottom of the issue. Let me know. Thanks.

0 Kudos