Where in a WebApp Zip Download is specified which WebMap to include?

205
6
03-09-2020 05:38 AM
MarioNowak
New Contributor II

In Web AppBuilder Developer Edition, I can download the app as zip archive. I assume that somewhere it is specified, which WebMap the app should use. Can someone point out which file in the archive holds this piece of information?

Thanks for any help.

0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Mario,

  In the apps config.json is where the itemId this is the web map id.

MarioNowak
New Contributor II

Thank you, Robert.

I was hoping to see a URL similar to a MapService-URL.

The background is the following:

If I wanted to port a WebApp from one system to another (development to production), I could download the WebApp from development environment and upload it to the other system. But in order to make it work, I assume I would have to specify the WebMap.

Is there any solution to port a WebApp to another system?

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Mario,

   I think you are not understanding how WAB works. Production vs Development server does not matter when it comes to the webmap that is used. The webmap is just a pointer on AGOL or your Portal to the map data. So both the production server and the development server can and will use the same exact webmap id.

0 Kudos
MarioNowak
New Contributor II

Ok, but we have two fully different ArcGIS Portals. So if I create a webmap in the dev environment, it is not showing up in production environment... Also, the MapServices exists both on dev and production environment with different REST URLs.

So I guess my attempt should be to download the webmap as mxd, set the production data sources, add it to the production portal, get the new itemID, add the new itemID to the downloaded WebApp and then deploy it.I hope this can be done with arcgis.gis and arcpy Python code.

Or is there an easier way?

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Mario,

   So does the production and development servers both have a webmap containing the same Data  on then? If so then once you download the app from development then you just publish this app to production and swap the itemId to the production servers webmap id.

MarioNowak
New Contributor II

Yes, it is the same data, but the production webmap should be created automatically from the dev version. So I am looking for scripted solution, that downloads the dev webmap, sets new data sources and adds this wbemap as an item to the production Portal. Then I could get itemID (hopefully scripted too) and replace it in the web app (as you are pointing out).

0 Kudos