Aller au contenu principal

Setting up a workflow using Get map and Get Layer

Commentaires

6 commentaires

  • Alex St. John

    Howdy neighbor (live in Milwaukee, work in Pewaukee),

    From the Get Map activity, you want the web map's “internal ID”:

    =$map.map.map.allLayers.items.filter( x => (x.title == "layer name"))[0].id

    Feed that to the Get Layer activity to get the Esri layer object.

    I found this through working with support and using the Chrome DevTools console to debug workflows in Web Designer.

    Note, just the name of the of the layer (e.g. “Tax Parcels”) should theoretically work, but I think I have noticed it failing sometimes, and the ID is more reliable.

    0
  • Mary Wagner

    Hi Alex!

    Thanks for the quick response. 

     

    I get an error with this saying it cannot read the id.  ill play around with it, but i am assuming the only activities id need would be the get map linked to the get layer along with that input expression?

    Thanks!

    0
  • Alex St. John

    That goes in the Get Layer activity Layer ID input.

    1
  • Alex St. John

    That gives you the formal Esri Layer object directly from your Web Map, which the VertiGIS feature details/popups respect better than otherwise.

    0
  • C Clark

    Hi Alex,

    I have a related question.  I am using the Get Map and Get Layer activities, but all of my final results in Studio Web are the service layer table, not the configured pop-up for the map layer.

    My Get Layer activity is taking =$map1.map.map.allLayers.items.filter( x => (x.title == "Water Facility"))[0].id, but the name of the layer is called “Water Service Locations” and it is inside the Water Facility group layer.  It only returns the layer like this "2b10ed91bc574d96a5016cfa9c474d35" not like this "18d0e99c4b4-layer-14" so I don't think I can get the pop up configuration for my results, only the layer service itself.  I have tried every expression I can think of in the Get Layer activity, and I cannot get the map layer, only the service layer to show in my results.  Any advice appreciated.

    Thank you

    0
  • Mary Wagner

    Hi, 

    I figured this out - see this post Setting display field in the result window VertiGIS Studio Web – VertiGIS Support you take that layer ID value from the web map and put it in the layer ID of the get layer activity.  

    I hope that helps!

    Mary

    0

Vous devez vous connecter pour laisser un commentaire.