-
Notifications
You must be signed in to change notification settings - Fork 11
Bug with renamed layer titles #1089
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @mmoosbac94, I'm looking into your issue. In the meantime, you might also try posting this on the ArcGIS Enterprise Questions board in the Esri Community forums, as the issue sounds like it's related to ArcGIS Enterprise, given the details you've included. If you create a post there, linking it here will be helpful for tracking purposes. Thanks! |
Hi @mmoosbac94, I'd like to request a bit more information:
|
Hi @dfeinzimer, in our ArcGIS Portal Root Directory it shows: Current Version: 9.2. And your colleagues informed us that this corresponds to 10.9.2? However the issue our client is experiencing seems to occur in version 11.3 when using the same layer multiple times with different filters and different names. At the moment I am unable to reproduce this issue myself because we are using a different version of ArcGIS Enterprise. |
Hi @mmoosbac94, I've confirmed that Current Version: 9.2 in the ArcGIS Portal Root Directory indicates an ArcGIS Enterprise version of 10.9.1—that's one mystery solved. As for reproducing the actual issue, I've still had no luck. I have access to 11.3 so I should be able to reproduce the issue but I'll need more detailed steps (e.g. what filters, how the layer is used, etc.). Thanks! |
Hi @dfeinzimer, thanks for testing! I was also able to reproduce the issue with version 11.3 now. When using feature layers, its working fine. However, if you add the same dynamic entity layer (e.g., SandyVehicles) to a map multiple times in the Map Viewer and then rename the layer titles, the changes are not reflected in the iOS app. So it seems to be specific to dynamic entity layers. Maybe you are able to reproduce the issue with that information. |
Hi @mmoosbac94, sorry for the delay and thank you for the additional details. I've again attempted to reproduce the bug, but haven't had any luck. For reference, I'm accessing the layer names with the following code: struct ContentView: View {
@State private var map = Map(url: URL(string: "...")!)!
var body: some View {
MapView(map: map)
.task {
do {
try await map.load()
map.operationalLayers.forEach { layer in
print("Layer:", layer.name)
}
} catch {
print(String(reflecting: error))
}
}
}
} In my map created with ArcGIS Enterprise 11.3, I've added the SandyVehicles layer 3 times and performed multiple rounds of renaming each layer, saving the map and restarting the iOS app. Each time, I've successfully printed the correct updated names. Are there potentially any other steps I'm missing? Thanks, I'm using:
|
Hi @dfeinzimer, thanks for your effort! I looked into this issue in more detail, and you're right—it's working in your example. The layer names are updated correctly. However, I found that the values are only correct when the specific layers are still in the "loading" state. Once they are fully loaded—for example, if you call .load() and await it—the names of the layers change and no longer match the names used in the portal (Map Viewer). Hopefully, this helps you reproduce the issue. Thank you, |
Hi Marvin, still no luck on my end unfortunately. Here is my updated code, and what it logged. The layer names stay consistent with their IDs before and after loading: var body: some View {
MapView(map: map)
.task {
do {
try await map.load()
await withThrowingTaskGroup { group in
map.operationalLayers.forEach { layer in
group.addTask {
print(layer.name, layer.loadStatus, layer.id!)
try await layer.load()
print(layer.name, layer.loadStatus, layer.id!)
}
}
}
} catch {
print(String(reflecting: error))
}
}
} SandyVehicles3 notLoaded 196f0354ea0-layer-2
SandyVehicles1 notLoaded 196f046f67a-layer-4
SandyVehicles2 notLoaded 196f0465523-layer-3
SandyVehicles3 loaded 196f0354ea0-layer-2
SandyVehicles1 loaded 196f046f67a-layer-4
SandyVehicles2 loaded 196f0465523-layer-3 I then added 10 to each layer's number, and the names remained consistent with their IDs: SandyVehicles13 notLoaded 196f0354ea0-layer-2
SandyVehicles12 notLoaded 196f0465523-layer-3
SandyVehicles11 notLoaded 196f046f67a-layer-4
SandyVehicles12 loaded 196f0465523-layer-3
SandyVehicles11 loaded 196f046f67a-layer-4
SandyVehicles13 loaded 196f0354ea0-layer-2 |
Hi @dfeinzimer, thanks four your example. I tried it out, and yes, you're right. It's working the same way for me too. The issue seems to occur when changing the symbology for a dynamic entity layer, such as "Sandy Vehicles." When I change the symbology directly within the map for each layer, everything works correctly and the names are updated as expected. However, when I change the symbology directly in the dynamic entity layer itself, the naming is not updated. But I believe this is an important use case, because when a layer is used in multiple maps, users typically want to adjust the symbology in the layer itself, rather than having to update it in each individual map. I hope this information helps you reproduce the issue. Thanks, |
In ArcGIS Enterprise version 11.3, there seems to be a bug related to renamed layer titles. When you add a layer to a map in the Map Viewer and rename or change its title, the updated title does not reflect in the iOS app using the ArcGIS Swift SDK. However, this issue does not occur in version 10.9.2 of ArcGIS Enterprise. Renaming layers is particularly important for us, especially when the same layer is added multiple times with for example different filter options. We are accessing the layer title using Layer.name in the iOS app.
The text was updated successfully, but these errors were encountered: