Is there a problem with WAB 2.5 and LocalLayer 2.5? I cant seem to get the LocalLayer widget to show up.

2431
15
Jump to solution
10-11-2017 09:02 AM
LesHampton
New Contributor III

I have been using the Local Layer Widget for a long time. I am upgrading to WAB 2.5 and followed the directions for the 2.5 LocalLayer widget but it will not show up in any App I try to configure. I haven't had any problems in the past versions and cant figure out what I am doing wrong.

0 Kudos
15 Replies
RebeccaStrauch__GISP
MVP Emeritus

I added a note about avoiding the subfolder in the help docs.  That was a good point.

0 Kudos
LefterisKoumis
Occasional Contributor III

Hello Robert. 

I have an existing app and I am trying to use this widget. 

Rebecca Strauch stated that the file structure shown below works for her.

so my question is :

How the app will access the widget.js under locallayer/2d/locallayer/ 

with this entry in app's config.json:    "uri": "widgets/LocalLayer/Widget" ?

Thanks.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Lefteris,

   I don't know about that structure working. I would copy the LocalLayer folder from the 2D folder and paste that in your widgets directory.

LefterisKoumis
Occasional Contributor III

Thank you. That's what I thought.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

I would follow what Robert says.  As mentioned, it's been a while since I messed with it.  I need to update my other page to reflect the new instructions.  I think the confusion came when they added 3D.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Although it is hard to see in the graphic, it looks like you have the lines added in the incorrect place....that is, getting the { } unbalanced.  "edit: Actually, looking again, that might not be the case, but you might want to try the below anyway.

I put the added lines at the top, right after the   ...  "widgets": [

I think you have yours pasted in the brackets right under the version line.

I'll attached a copy of my the <WAB>\client\stemapp\predefined-apps\default\config.json mine. They should be generic, but I would rename/move yours, put mine in it's place (rename the .txt back to .json) and make sure the NodeJS and WAB are totally closed. 

A reboot would not hurt.  For some reason, fixing or trying to add the LocalLayer even to a 2.5 app I created earlier did not work....for a few hours.  a bit puzzling but my guess is NodeJS was not fully shut down.

Also in my doc, I had written that sometimes you need to edit the app, save, shutdown/reboot and try it again...if it doesn't work with the first shutdown/reboot.

edit2: ...oops, see you just got it working.

0 Kudos