ArcGISLocalFeatureLayer rendering issue 10.2.4

1570
7
Jump to solution
08-17-2016 01:20 AM
MichaelKnight
New Contributor II

Hi Guys,

I am trying to utilize the editing features of ArcGISLocalFeatureLayer. My code is currently all working correctly but I am getting rendering issues when trying to add certain geometries to the underlying .mpk

However if I view this layer using ArcGISLocalDynamicMapServiceLayer the rendering issue goes away. However because this layer does not allow editing I need to use ArcGISLocalFeatureLayer

So this code produces a correctly rendering pair of layers:

layer = new ArcGISLocalDynamicMapServiceLayer("C:\\synergyii\\gisdata\\All Floors.mpk");
map.getLayers().add(layer);
layer = new ArcGISLocalDynamicMapServiceLayer("C:\\synergyii\\gisdata\\AdvancedGraphic-1471274891125.mpk");
map.getLayers().add(layer);

This code produces an incorrectly rendering pair of layers:

layer = new ArcGISLocalDynamicMapServiceLayer("C:\\synergyii\\gisdata\\All Floors.mpk");
map.getLayers().add(layer);
layer = new ArcGISLocalFeatureLayer("C:\\synergyii\\gisdata\\AdvancedGraphic-1471274891125.mpk", 0, true, RenderingMode.DYNAMIC);
map.getLayers().add(layer);

As you can see only one geometry is actually showing here and its incomplete. If you pan and zoom around the map the rendering changes each time.

Does anyone have any ideas why the ArcGISLocalFeatureLayer is giving me rendering issues?

0 Kudos
1 Solution

Accepted Solutions
nita14
by
Occasional Contributor III

Michael,

You have to set maximum records returned property for feature layer. You are trying to insert  almost 3 000 rows at a single save button click. Please be aware that FeatureService returns only 1000 features by default. I just added the following code featureLayer.setMaximumRecords(100_000); and it works just fine.

However, I suggest you consider generalize input shapes you are adding - Generalize or Dissolve Geoporocessing tool - should be just fine. The app performance will boost. 

As for 1000 features limit, this constraint was removed in the newer ArcGIS for Server releases, However, ArcGIS Runtime 10.2.4 relies on ArcGIS for Server 10.2.2. You should look forward to see 'Quartz' release, the issue should not be present since then.

Hope this helps,

Adam

View solution in original post

0 Kudos
7 Replies
nita14
by
Occasional Contributor III

Hi Michael,

can you attach your input package files? I will take a look.

Regards,

Adam

0 Kudos
MichaelKnight
New Contributor II

Hello Adam,

Sorry for the delay in getting back to you I have been on holiday.

I have attached the Base map (All Floors.mpk) I am using which is an mpk along with the mpk I am using to add data via the applyEdits API (AdvancedGraphic-1471274891125.mpk).

Because of the way this SDK works the edits dont actually end up in the source mpk; instead they end up unpacked in a local server directory which I have attached for you.

The relative path to the actual GIS data in localserver is localserver\Documents\ArcGIS\Packages

Thank you for your time.

Mike

0 Kudos
nita14
by
Occasional Contributor III

Hi Micheal,

Could you describe the workflow of adding the Advanced Graphic? I do not see in the attached mpk any Feature Template for inserting new features. Can you provide as well your code, it would make debugging a lot easier.

Regards,

Adam

0 Kudos
MichaelKnight
New Contributor II

Hi Adam,

The full code is part of a much larger application. However I have written a sample application that demonstrates the same issue and is essentially doing the same thing.

If you click the load shape file button and then save shape button you should then see the rendering issue once the applyEdits API has been called.

I hope this is enough for you to isolate the issue.

Thanks,

Mike

0 Kudos
nita14
by
Occasional Contributor III

Michael,

You have to set maximum records returned property for feature layer. You are trying to insert  almost 3 000 rows at a single save button click. Please be aware that FeatureService returns only 1000 features by default. I just added the following code featureLayer.setMaximumRecords(100_000); and it works just fine.

However, I suggest you consider generalize input shapes you are adding - Generalize or Dissolve Geoporocessing tool - should be just fine. The app performance will boost. 

As for 1000 features limit, this constraint was removed in the newer ArcGIS for Server releases, However, ArcGIS Runtime 10.2.4 relies on ArcGIS for Server 10.2.2. You should look forward to see 'Quartz' release, the issue should not be present since then.

Hope this helps,

Adam

0 Kudos
MichaelKnight
New Contributor II

Hi Adam,

Thank you very much for this it fixes the issue on my machine too! 

I agree the geometries I have sent you are overly complex and the end product will contain more optimized versions. However for now we are testing the capabilities of the SDK against heavy loads on the target hardware to get an understanding of the performance limits.

Thank you again for your help I am glad the fix was quite simple!

0 Kudos
nita14
by
Occasional Contributor III

Micheal, please, mark the question as resolved. 

0 Kudos