LocalLayer Widget and Sub-Layers Question

1759
3
Jump to solution
04-28-2016 08:28 AM
TimHayes1
Occasional Contributor III

I am using Web AppBuilder 2.0 with the LocalLayer Widget 1.3.1.

I have two sub-layers (both dynamic). I configure pop-up and choose custom.

For the first sub-layer (Valves) I enter this:

<b>Diameter:</b> {DIAMETER}

<b>Type:</b> {VALVE_TYPE}

<b>Location:</b> {LOCATION}

<b>Purpose:</b> {PURPOSE}

<b>How is Valve Operated?</b> {OPERATOR_TYPE}

<b>Number of Turns:</b> {TURNS}

<b>What is the Normal Valve Position, Open or Closed?</b> {VALVE_POSITION}

For the second sub-layer (Pipes) I enter this:

<b>Map Label:</b> {ANNOTATION}

<b>Diameter:</b> {DIAMETER}

<b>Process Stream:</b> {PROCESS STREAM}

<b>Location:</b> {LOCATION}

<b>Purpose:</b> {PURPOSE}

I clear my cache (using Firefox). I save. I launch. I click on valves and pipes. You will see that the pop-up for valves is populated with the attributes. You will see that the pop-up for pipes is empty of attributes.

I double checked the attribute table and key values for both. They match exactly.

Any ideas on why the pop-up is normal for the first sub-layer and not the second?

See attached for screenshots of what I am seeing.

0 Kudos
1 Solution

Accepted Solutions
TimHayes1
Occasional Contributor III

Problem solved! Here is what I found out:

If you are using Web AppBuilder Developer Edition 2.0 with the LocalLayer Custom Widget 1.3.1 then you will encounter this issue.

To fix it:

1) First, create all your custom popups inside the WAB Developer Edition.

2) Exit out of WAB Developer Edition.

3) Then open the config_LocalLayerWidget.json in WebAppBuilder\server\apps\<app # here>\configs\LocalLayer (I use Notepad++)

4) Navigate to the line that shows your popup description with the fields between the brackets after fieldinfos populated. Copy and paste the info between the brackets to the next layer you have a custom popup for. Continue this for all layers which you have created a custom popup until you are done. (NOTE: be aware of the { }, [ ] closure syntax, it can be a bit confusing at first.)

5) OpenWAB Developer Edition in Firefox, clear your cache (always a good idea).

6) Launch your app and click on any feature and you should now see the popups populated.

As I said, I am not sure if this a bug in the LocalLayer Widget 1.3.1 when working with it in Web AppBuilder Developer Edition 2.0. Sure seems like a bug. But, a minor one.

View solution in original post

3 Replies
TimHayes1
Occasional Contributor III

A slight correction, {PROCESS STREAM} should read {PROCESS_STREAM}.

0 Kudos
TimHayes1
Occasional Contributor III

I think I found the problem. I opened the LocalLayer.json and saw that the brackets at the end of fieldinfos does not populate past the the first time you do a custom popup. Art the second and subsequent custom popups fieldinfos will be empty. The fix is you need to go in an populate the code between the fieldinfos brackets for each layer one by one for each of the popups.

I wonder if this is a bug with WAB DE 2.0?

See attached screenshots from LocalLayer.json for more info.

This is how it looks when the first custom pop-up is created for valves:

2016-04-28_11-02-17.png

This is how the custom pop-up for pipes looks (this is the second pop-up created after valves). Note: all subsequent custom popups looks like this, that is between the brackets after fieldinfos are empty.

2016-04-28_11-02-38.png

0 Kudos
TimHayes1
Occasional Contributor III

Problem solved! Here is what I found out:

If you are using Web AppBuilder Developer Edition 2.0 with the LocalLayer Custom Widget 1.3.1 then you will encounter this issue.

To fix it:

1) First, create all your custom popups inside the WAB Developer Edition.

2) Exit out of WAB Developer Edition.

3) Then open the config_LocalLayerWidget.json in WebAppBuilder\server\apps\<app # here>\configs\LocalLayer (I use Notepad++)

4) Navigate to the line that shows your popup description with the fields between the brackets after fieldinfos populated. Copy and paste the info between the brackets to the next layer you have a custom popup for. Continue this for all layers which you have created a custom popup until you are done. (NOTE: be aware of the { }, [ ] closure syntax, it can be a bit confusing at first.)

5) OpenWAB Developer Edition in Firefox, clear your cache (always a good idea).

6) Launch your app and click on any feature and you should now see the popups populated.

As I said, I am not sure if this a bug in the LocalLayer Widget 1.3.1 when working with it in Web AppBuilder Developer Edition 2.0. Sure seems like a bug. But, a minor one.

View solution in original post