All,
I thought I would share some info on Web App Builder Beta 2.
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