Do you have to use AGOL to use WAB?

20297
48
08-13-2014 07:52 AM
RobertScheitlin__GISP
MVP Emeritus

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

48 Replies
RobertScheitlin__GISP
MVP Emeritus

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.

0 Kudos
ChristopherJohnson1
Occasional Contributor II

Thanks, Robert. Yes, I am beginning to notice that, as I delve into some of the downloaded code. Thanks again.

0 Kudos
ChristopherJohnson1
Occasional Contributor II

Thanks, Rebecca.

0 Kudos
WilliamMiller4
Occasional Contributor II

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

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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.

RebeccaStrauch__GISP
MVP Emeritus

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.

Web APIs | ArcGIS for Developers

NathanEnge
Esri Contributor

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...).

0 Kudos
AdamJoseph1
New Contributor

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

0 Kudos
AdamJoseph1
New Contributor

steps on how to create webmapid with cartoview is found here Cartoview webmapid

0 Kudos