Change LayerList Description from REST Endpoint to Layer Info

3711
26
Jump to solution
01-22-2016 02:41 AM
EoghanMcCarthy1
New Contributor III

Hi,

I want to supply some basic layer information under the LayerList Description instead to the default redirect to the REST endpoint.

Previously when using Flex I would edit the eLayerList config <usenewesridescription>false</usenewesridescription>

This would then provide the layer description included with the published layer.

Is this function possible in WAB or is there another method to providing  background info for your layers?

Thanks

0 Kudos
26 Replies
EoghanMcCarthy1
New Contributor III

Hi Robert Scheitlin, GISP‌,

You provided this great bit of code for me a number of years ago (attached above, under correct answer  - PopupMenuInfo.zip) and it has been vital for one of our applications since. On clicking "Description" in the layer list it loads a popup that shows the description and copyright in a message dialog instead of the rest endpoint for that layer.

We have since updated our version of WAB Developer Edition (2.12) and since this update the "Move Layers" (up/down) functionality is unresponsive in the Layer List when we are using the revised code you produced. Would you know off hand what might be causing this in the code? 

Many Thanks,

Eoghan  

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Eoghan,

  Here is a 2.13 version of it.

0 Kudos
EoghanMcCarthy1
New Contributor III

Many thanks for the speedy response Robert, 

I am tied to version 2.12 at the moment as the environment the app is sitting on has just undergone a penetration test so I can't rebuild in a different version. 

I did a test of what you sent in version 2.13 though, and it didn't work as expected. Upon clicking on the layer options to access the description, I am just getting a load spinning icon and no pop up - see below. Note, I have group layers in place here and they might be affecting things as I am getting a popup if I click on the group layer name. 

Thanks again,

Eoghan 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Are there any errors in the browsers web console?

0 Kudos
EoghanMcCarthy1
New Contributor III

Nothing that I can see bar a few font errors. Strangely, it worked once for a single layer.

I've set up a test module to try and configure it. 

ArcGIS Web Application 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

OK. I see the issue. Corrected attachment is attached

0 Kudos
EoghanMcCarthy1
New Contributor III

The "Description" option is grayed out now.

0 Kudos
EoghanMcCarthy1
New Contributor III

Just to elaborate on that a little further.  Looking at the test module that I have set up. If the "Description" feild of the REST service is blank, a (blank) pop up loads. Where there is content in the Description field, the Description option in the layer list becomes grayed out. 

Thanks,

Eoghan

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

OK. Lets try this again.

0 Kudos
EoghanMcCarthy1
New Contributor III

That did the trick!!! Yes, working nicely on the 2.13 app. 

Do you think I'll be able to replicate those code changes back to 2.12 or were there wholesale changes to that widget?

Really appreciate your help on this. 

Thanks,

Eoghan 

0 Kudos