Attached is a small MMPK, created in Pro 2.0, that demonstrates a bad symbol rotation in Runtime 100.1 [I don't recall seeing this issue in Pro 1.4.1/Runtime 100.0, but I may be wrong].
Here's how it appears imported into Pro:
And here's how it appears in Runtime:
Solved! Go to Solution.
Thanks, Mark. I'm able to reproduce the issue in v100.1 and it looks like it did not render at all in v100.
Also, I find that when you opt-out advanced symbology, it renders just at it would in ArcGIS Pro. Do you mind trying the following workaround?
var mmpk = await MobileMapPackage.OpenAsync(path);
var map = mmpk.Maps.FirstOrDefault();
foreach(var layer in map.OperationalLayers.OfType<FeatureLayer>())
{
var table = (ArcGISFeatureTable)layer.FeatureTable;
table.UseAdvancedSymbology = false;
}
MyMapView.Map = map;
I have logged the issue so our team can investigate further.
Thanks.
Jennifer
Thanks, Mark. I'm able to reproduce the issue in v100.1 and it looks like it did not render at all in v100.
Also, I find that when you opt-out advanced symbology, it renders just at it would in ArcGIS Pro. Do you mind trying the following workaround?
var mmpk = await MobileMapPackage.OpenAsync(path);
var map = mmpk.Maps.FirstOrDefault();
foreach(var layer in map.OperationalLayers.OfType<FeatureLayer>())
{
var table = (ArcGISFeatureTable)layer.FeatureTable;
table.UseAdvancedSymbology = false;
}
MyMapView.Map = map;
I have logged the issue so our team can investigate further.
Thanks.
Jennifer
That works for me. Thanks!
No problem, I updated the workaround a bit - no need to load and clone.
Is there any way to determine the geometry of a feature layer without loading the table? I would like to be able to apply the workaround only to point layers (I have polyline layers with advanced symbology).
Hi Mark, I'm not aware a way to that without loading the metadata for the table since the layer doesn't have any information about it's content before that is done. If you are using MMPKs the loading operation shouldn't be too expensive since no network calls are done at that point.
Unfortunately, I can't change the UseAdvancedSymbology setting once the table is loaded. I tried cloning the layers, closing the GDB, even opening the MMPK a second time, but in those cases I couldn't get the map to load.
Does this work? it's not very pretty but after I go through UseAdvancedSymbology values on loaded event, i get thing set properly. I didn't have a service that clearly has different symbology so not sure if the correct symbols was used though.
offlineMapPackage = await MobileMapPackage.OpenAsync(offlineDataFolder);
offlineMap = offlineMapPackage.Maps.First();
var featureLayers = offlineMap.OperationalLayers.OfType<FeatureLayer>().ToList();
var featureLayer = featureLayers.First();
var gdbTable = featureLayer.FeatureTable as GeodatabaseFeatureTable;
var gdb = await Geodatabase.OpenAsync(gdbTable.Geodatabase.Path);
var pointLayers = new List<int>();
for (int i = 0; i < gdb.GeodatabaseFeatureTables.Count; i++)
{
var table = gdb.GeodatabaseFeatureTables[i] as GeodatabaseFeatureTable;
await table.LoadAsync();
if (table.GeometryType == GeometryType.Point)
pointLayers.Add(i);
}
foreach (var index in pointLayers)
{
var table = gdbTable.Geodatabase.GeodatabaseFeatureTables[index];
table.UseAdvancedSymbology = false;
}
Nope. Still can't get the map to load. I'm using the same MMPK that I originally attached to this thread.
More info: I'm getting a FileNotFound exception at the Geodatabase.OpenAsync step.