All,
Note this no longer applies to current releases of WAB.
I have been digging into the MapManager.js and have found that esri must be listening to all the complaints from users about being forced to us a WebMapID from AGOL and there is code in there to just use basemap and operational layers (like good old ArcGIS Viewer for Flex) in the config.json. They just have not exposed the ability to configure this in the WAB UI.
So in the config.json after going thorough the paces of choosing a WebMap from the ones available on AGOL your config.json will look like this for the map object.
"map": { "3D": false, "2D": true, "position": { "left": 0, "top": 40, "right": 0, "bottom": 0 }, "itemId": "6e03e8c26aad4b9c92a87c1063ddb0e3", "mapOptions": { "extent": { "xmin": -15000000, "ymin": 2700000, "xmax": -6200000, "ymax": 6500000, "spatialReference": { "wkid": 102100 } } }, "id": "map", "portalUrl": "http://YourOrg.maps.arcgis.com/" },
all you have to do is change it to something like this:
"map": { "3D": false, "2D": true, "position": { "left": 0, "top": 40, "right": 0, "bottom": 0 }, "basemaps": [{ "label": "base map1", "url": "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer", "type": "tiled" }], "operationallayers": [{ "label": "Earthquakes", "url": "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/EarthquakesFromLastSevenDays/...", "type": "feature" }], "mapOptions": { "extent": { "xmin": -15000000, "ymin": 2700000, "xmax": -6200000, "ymax": 6500000, "spatialReference": { "wkid": 102100 } } }, "id": "map", "portalUrl": "http://Calhoun.maps.arcgis.com/" },
Notice that I have just replaced the itemId with a basemaps and operationallayers objects.
I think this is great news
Message was edited by: Robert Scheitlin, GISP
Chris,
You would have to modify MANY file in the WAB stemApp as there are several placed in the code that use info from protal. It is not just the map.
Thanks, Robert. Yes, I am beginning to notice that, as I delve into some of the downloaded code. Thanks again.
Thanks, Rebecca.
Hi Robert,
In the current release of Web App Builder 2.0.1, is it possible to do away with the ArcGIS Online pass-through?
William
William,
Nope WAB is dependent on several aspects of AGOL.You can use all your own data on your ArcGIS Servers using the Local Layer widget but the WAB stemapp will connect with AGOL for things like your orgs default basemap, geocoders, etc.
As Robert mentioned, web AppBuilder developer edition relies on certain items from AGOL or a locally hosted Portal. The other option is to just write your own with the Javascript API. There are many samples but you lose the convenience of all the built in functionality and convenience that WAB brings to the table.
Not sure what you mean by "requiring"...
AWAB was designed to be used w/ Portal for ArcGIS (on-premise or cloud or combination thereof). It was designed for the non-coder/developer to quickly stand up targeted web applications based upon Portal web maps, which also is intended to be easy-to-use self-service mapping by non-GIS professionals. That is AWAB OTB.
However, if you were to hardcode your Portal web map's JSON directly into your AWAB app - as I did, it effectively becomes the same coding practice and methodology as Flex and the Silverlight. Whereas Flex uses compiled action script, JSON and JS is open and clear text, therefore you may have those "security" considerations.
I can't comment on Esri's intention on moving away from editing direct configuration files vs use of the AWAB/Portal combo; however, there are several examples of Javascript apps that interface directly with AGS services and not use AWAB/AGOL/Portal at all (Election Results, Polling Place Finder, My Gov Services etc...).
another simple way to serve out a webmap JSON to the webappbuilder is to paste your webmap JSON into Cartoview web map. This way you can serve out the web map without having to use the portal.
Take a look at www.cartologic.com/cartoview
steps on how to create webmapid with cartoview is found here Cartoview webmapid