Runtime Content Symbology Not Correct

4599
6
Jump to solution
02-05-2015 11:02 AM
MichaelHamsa
Occasional Contributor

Hello,

I've recently created some runtime content from ArcGIS 10.2.2 and noticed that the symbology rendered on the ArcGIS Runtime Map is not the same as the symbology rendered on ArcGIS 10.2.2 map. Several symbols have been changed in the runtime content and I can't figure out what happened.

Here's an example - the left picture is from the Runtime map (SDK for .Net v10.2.4) and the right picture is from the ArcGIS map (v10.2.2).

MapCompare.png

Closer view on one location - also noticed that pink dashed line (lower right quad of the map) is not the same in the runtime content, the 90 degree turn to the south was extended north. I've seem several instances where line routing was been altered in the runtime content.

MapCompare1.png

Any Ideas?

Thanks in advance,

Mike...

0 Kudos
1 Solution

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

Did you set the definition query on the feature layer when constructing them and assigning the table to each of them?

FeatureLayer.DefinitionExpression Property

Note: you're exporting the table data, not the layers - so you would have to configure the layer the same way as what you had in ArcMap.

View solution in original post

0 Kudos
6 Replies
dotMorten_esri
Esri Notable Contributor

Did you enable advanced symbology?

ServiceFeatureTable.UseAdvancedSymbology Property

0 Kudos
MichaelHamsa
Occasional Contributor

Morton,

Thanks a lot for the response.

I've have tried that and it does not look like it makes a difference in how those features are rendered. Unless I'm not using it correctly...

Here's a simple snippet of code that shows how the layers are added to the map.

Geodatabase gdb = await Geodatabase.OpenAsync(@"<gdb_file_location>");

foreach(var tbl in gdb.FeatureTables)

{

                tbl.UseAdvancedSymbology = true;

                var ftrLayer = new FeatureLayer(tbl);

                ftrLayer.DisplayName = tbl.Name;

                //ftrLayer.ResetRenderer();

                MyMapView.Map.Layers.Add(ftrLayer);

}

Let me know what you think.

Thanks again,

Mike...

0 Kudos
MichaelHamsa
Occasional Contributor

Hello,

I jumped back into the problem and I think it has to do with the use of a "Definition Query" when creating a layer. When I have more than one layer in my Map Document whose source is the same feature class in a geodatabase, it looks like the runtime draws the symbols for ALL the layers that use the feature class even though we have a "Definition Query" that differentiates the layers from one another. For example, let's say we have a feature class of type vehicle with all different types of vehicles in it - and I want them all to display differently on the map. If I create 4 layers that use the "vehicle" feature class and setup each of those layers with a different "Definition Query" (type='car', type='bus', type='truck', type='motorcycle') and define different symbols for each layer, the runtime seems to draw the symbols for all four layers at each point even if they a specific type of vehicle; car, bus, truck, motorcycle.

Is this a known issue, and if so is there a way to work around it other than creating 4 feature classes in my geodatabase.

I still have the problem of the "broken lines" in the runtime content, but I'll address in a separate post.

Thanks in advance,

Mike Hamsa

0 Kudos
dotMorten_esri
Esri Notable Contributor

Did you set the definition query on the feature layer when constructing them and assigning the table to each of them?

FeatureLayer.DefinitionExpression Property

Note: you're exporting the table data, not the layers - so you would have to configure the layer the same way as what you had in ArcMap.

0 Kudos
MichaelHamsa
Occasional Contributor

Morten,

I really appreciate the response. I see.

That would also explain why my runtime geodatabase is so large. If I've got 4 layers with definition queries in my Map Document that all use the same feature class from my File GeoDatabase, the runtime geodatabase gets 4 FeatureTables with all the rows from the 1 feature class - basically 4 times as much data.

Follow-up Question: If the process that creates the runtime geodatabase creates a FeatureTable for each layer (which it does), don't you think it should use the Definition Query defined on the layer to filter the rows that go into the runtime table instead of just blindly copying all the rows? That should be pretty straight forward to do since it already uses the Layer's Name to create the FeatureTable?

In any case, thanks for the quick and accurate response.

Mike Hamsa

0 Kudos
MichaelHamsa
Occasional Contributor

I've a bit more testing and this does correct the problem - Thanks Morten. I ended up restructuring the geodatabase so it didn't have different types of features in the same table, and that way I didn't need to use the Definition Query.

This is definitely a bug: not utilizing the Definition Query on a layer when creating a FeatureTable (for a layer) in runtime content. Most of the other Esri toolbox tools (data export, feature class export, etc) all honor the Definition Query when you export a layer to another geodatabase. Creating runtime content should be no different.

Not to mention the runtime geodatabase is MUCH larger then it should be in this situation.

Thanks again,

mike...