Hoppa till huvudinnehållet

dynamically change a layer's display name

Kommentarer

2 kommentarer

  • Zack Robison
    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
  • Amanda Frech
    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,

     

    Amanda

     

     
    0

Du måste logga in om du vill lämna en kommentar.