Basemap Gallery Widget Problem

5232
10
Jump to solution
08-18-2014 11:23 AM
LarryStout
Occasional Contributor III

I'm very new to working with ArcGIS Online, so be kind.  I created a new group called Hamilton County Base Maps and placed two Web Maps in it.  The Web Maps point to services on our ArcGIS for Server and are shared with everyone.  I set the Basemap Gallery in AGOL to this group.  When I go to my home page (http://hamco.maps.arcgis.com/home/index.html), all is as expected.

When I added the BasemapGallery widget to my WebApp Builder application I see my maps in edit mode, but not when I launch the application in WebApp Builder or when I download the application and put it on my server.  In those cases, I see the AGOL basemaps (Streets, Oceans, etc.).  Am I doing something wrong, or is this a bug?

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Absolutely.

{

  "basemapGallery": {

    "showArcGISBasemaps": false,

    "basemaps": [

      {

        "title": "My BaseMap",

        "thumbnailUrl": "images/thumbnailUrl.gif",

        "layers": [

          {

            "url": "http://blah blah/arcgis/rest/services/blah blah/MapServer"

          }

        ]

      }

    ]

  }

}

View solution in original post

0 Kudos
10 Replies
RobertScheitlin__GISP
MVP Emeritus

Larry,

   Are you using Beta 1 or Beta 2?

0 Kudos
LarryStout
Occasional Contributor III

Beta 2.  I made an app with only the default widgets plus the BasemapGallery Widget to make sure none of my widgets were interfering.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Strange I am using Beta2 an have a webmap that I use for testing that is not even public and I have no issue.

0 Kudos
LarryStout
Occasional Contributor III

I'm pulling my hair out trying to chase this through the Chrome debugging tools.  I'm getting different galleryGroup variables in BasePortalUtils.js, line 919.  That only confirms there is a problem, and doesn't answer the "why" part of the question.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Larry,

   Something seems off about your process explanation... The Basemap Gallery widget takes ArcGIS Server map service URLS not webmap ids?.. Am I missing something?

0 Kudos
LarryStout
Occasional Contributor III

I'm trying to point to AGOL Basemaps.  Are you saying that I can just put the rest endpoints in the "basemaps" array in config.json?  Here is my config.json:

{

  "basemapGallery": {

    "showArcGISBasemaps": true,

    "basemaps": []

  }

}

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Absolutely.

{

  "basemapGallery": {

    "showArcGISBasemaps": false,

    "basemaps": [

      {

        "title": "My BaseMap",

        "thumbnailUrl": "images/thumbnailUrl.gif",

        "layers": [

          {

            "url": "http://blah blah/arcgis/rest/services/blah blah/MapServer"

          }

        ]

      }

    ]

  }

}

0 Kudos
LarryStout
Occasional Contributor III

It's not working for me.  Do i need to change the map definition in the main config.json file also?  I've been pointing to a Web Map for that also.  Here's what I have now:

  "map": {

    "3D": false,

    "2D": true,

    "position": {

      "left": 0,

      "top": 40,

      "right": 0,

      "bottom": 0

    },

    "itemId": "1aebb15171434340ad2c5c0a0299ac4c",

    "mapOptions": {},

    "id": "map",

    "portalUrl": "http://Hamco.maps.arcgis.com"

  },

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Larry,

   I created that file though the Basemap Gallery widget UI so maybe you are getting your json incorrect when you are manually editing the json.

0 Kudos