Esri / esri-wab-build

Package used to build ESRI Web App Builder Apps for production.
Apache License 2.0
17 stars 5 forks source link

No errors, feature layers not displaying #69

Open crisand opened 5 years ago

crisand commented 5 years ago

Hi, so the build works great but when I run the optimised app, only the basemap shows and nothing else. The layers are visible in the Legend widget, the Attribute Table shows the results but the layers are not rendered on the map. We are using a webmap that contains several feature layers and a vector tile. At the moment we're using the optimised jimu modules but we load the arcgis js api from esri servers and not from dojo.js and this way we have a functional app. Not sure if there are some missing arcgis modules that have to be declared in the dojo layer when running the build, strange is that no js errors are outputed when the app is ran.

Thank you!

rsjones commented 4 years ago

Can you give any more information on version you were running and if it still occurs with the latest?

crisand commented 4 years ago

Can you give any more information on version you were running and if it still occurs with the latest?

Hi @rsjones , I've made a sample project which you can browser here https://github.com/crisand/wab-build-issue, it's using the web app builder version 2.16 and the arcgis js api version 3.32. If you just run that sample app with Web App Builder and then run the command "grunt build" you'll see that the output build will work flawlessly, but when you change the webmap id in the config.json to this id a26679dc01cb4834aada09e57c632c4e and run the build again, this time you're gonna see the errors that I've been experiencing, missing esri/tasks/support/pbfDeps. Even if I've managed to fix this issue by including this module in the build, then I get no errors bu the layers are not rendering.

Any advice would be greatly appreciated, thank you!

crisand commented 4 years ago

Can you give any more information on version you were running and if it still occurs with the latest?

Ok, so after more digging into the issue, I've realized that if I make the feature layers in my public webmap editable, they show on the map of the optimized version, if I set them as view only, no layers are drawn on the map. Obviously I can't make the public layer editable so this doesn't really solve the issue, just wanted to put it on the spotlight in case it help, thank you!