Select to view content in your preferred language

Do you have to use AGOL to use WAB?

20919
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
NathanEnge
Esri Contributor

With some tinkering in AWAB beta 3, I was able to disconnect AGOL. Although still need to define the portal initially.

Heres the web app

ArcGIS Web Application

Here's the json

http://74.216.225.69/2/config.json

0 Kudos
StephenLead
Regular Contributor III

Nice one. I wonder if this breaks any Terms of Service? I guess Esri would be within their rights to insist we use AGOL, since they wrote WAB?

0 Kudos
NathanEnge
Esri Contributor

"Use at your own risk" perhaps. Definitely not sustainable, nor a recommended workflow. Since the JSON is a "snapshot" of the AGOL web map, as soon as said web map is tinkered with (add new layers, change symbol, etc) it would require grabbing another snapshot, then tinker with brackets and commas again.

I'd rather be drinking beer. However the client had required an AWAB app pointing to a web map that wasn't shared publicly that anybody in the organization could view without an AGOL account.

0 Kudos
TimHayes
Regular Contributor

I have seen many questions posted about ESRI requiring you to use AGOL/Portal for the WAB. Meaning you must load your data onto their servers or let down your firewall to give AGOL access to your data. I have also heard that you can use the WAB with your own data with no need to use AGOL/Portal.

I have no idea which stories are correct.

Do you do need to use AGOL for the WAB? how secure is your data if you do not want to put it out there for all to see? can your data still reside on your internal server or must you load onto the cloud?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Tim,

  1. Do you do need to use AGOL for the WAB? Currently Yes with the OTB WAB.
  2. How secure is your data if you do not want to put it out there for all to see? You don't have to put it out there for all to see you can still have the Web Map private to your organization or specific groups in your AGOL Org account. Data used in AGOL Web Maps does NOT have to be loaded into the cloud. This next statement is false:
    Meaning you must load your data onto their servers
  3. Can your data still reside on your internal server or must you load onto the cloud? Yes the data can reside on your own ArcGIS Server but AGOL will have to have access to it be able to have the web map use it. This part of the statement is correct:
    "or let down your firewall to give AGOL access to your data".
0 Kudos
LarryStout
Occasional Contributor III

You must have a WebMap defined in Portal or AGOL, but you don't need to move or copy the data that is on your own server.  This app uses that model: http://gis.hamiltoncounty.in.gov/mapviewer/index.html.  I have developed a way to intercept the WebMap definition and remove layers that are inaccessible to the user (on a non-public server) or that are secured on a public server.

Larry

ChristopherJohnson1
Occasional Contributor II

Hi, Larry.  So, in the site you mentioned above, only the web map is in ArcGIS Online/Portal, but the data comes from an internal GIS server?  Additionally, you used WAB to design the site/widgets and then just downloaded and customized the code?

Thanks...Chris

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Chris, very old thread, but you may want to look at the local Layer widget.  This and many other custom widgets and tips can be found Web AppBuilder Developer Edition - Customization Resource List

(sorry, would have written more but my tablet is acting up right now)

0 Kudos
ChristopherJohnson1
Occasional Contributor II

Thank you, Rebecca. That clarifies the point that you can add layers based on internal map services. However, the link between WAB and ArcGIS Online/Portal is still necessary for the web map, correct? Thanks.

0 Kudos
ChristopherJohnson1
Occasional Contributor II

I guess I am looking for a little clarification on workflow.

If I use Web AppBuilder to create an application, but I want to de-couple the application from ArcGIS Online and host it internally, without referencing ArcGIS Online, is that possible?

Thanks.

0 Kudos