dynamically change a layer's display name
Is it possible to dynamically change a layer's display name?
I tried the following process:
1. added a property "DisplayName" for the layer of interest in Essential Manager, and then
2. in my workflow, used SetLayerProperty to assign a user-inputted value for the Property, and then used RefreshMap.
However, the process didn't work.
0
-
There is already a "displayName" property for a layer, which I presume is what you would need to change. Adding a new property won't help you since the viewer needs to know which property to find that data in....
I haven't played much with the display name property, but have found that some properties are accessed only when a layer is loaded into the viewer and so even changing them won't help, but I imagine that display name is something that the design team would configure to allow for this kind of dynamic change. Good luck.0 -
Hi Jie,
I'm sorry to say that the layer names in the layer list cannot be changed dynamically like you're describing. After assigning a DisplayName using the SetLayerProperty activity, you will only see the effect in certain places when the viewer calls for the layer name (for example, by clicking the ">" next to the layer name, or by identifying features from the layer and switching to table view). Like Zack has guessed, the layer list is loaded from the REST endpoint when the viewer loads, and the RefreshMap activity does not update it.
If you're hoping to see this an option for dynamically changing a layer's display name in the future, I would recommend posting to the Ideas section (https://support.geocortex.com/GSCIdeas?c=09a6000000008RsAAI&filter=1&categ=Geocortex%20Viewer%20for%20HTML5&type=html5&sub-nav=ideas&main-nav=essentials&page=1) so that other users can vote for it as well. I believe I have seen some interest in this one before.
Hope that helps,
Amanda0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
2 kommentarer