I would like to add basemap toggle to story map series

1179
5
05-15-2017 06:58 PM
BrandonPrice
Occasional Contributor

Can this easily be done? I would like to the newest basemap toggle widget version in arcgis api for js

0 Kudos
5 Replies
BrandonPrice
Occasional Contributor

By the way, I also have currently a hybrid basemap that starts out using dark-gray then goes to world imagery but would like to consider the basemap toggle

0 Kudos
ChrisSmith7
Frequent Contributor

Are you looking for something like this?

Rockville Historic Buildings Catalog 

0 Kudos
BrandonPrice
Occasional Contributor

Hi Chris,

Yes. Almost something exactly like that. I am using the storymap downloaded version called Storytelling-MapSeries-1.7.3. It is not the developer one.

-Brandon

0 Kudos
ChrisSmith7
Frequent Contributor

Brandon,

I don't use Story Maps, but as far as I understand, when you download the example and host it on your server, you should be able to edit main-app.js

Here's a reference example to the widget in 3.20, the version the story map example is using:

Basemap gallery | ArcGIS API for JavaScript 3.20 

I would add the reference to 

esri/dijit/BasemapGallery

Then instantiate it:

      var basemapGallery = new BasemapGallery({
        showArcGISBasemaps: true,
        map: map
      }, "basemapGallery");
      basemapGallery.startup();

You'll need to add a front-end reference to the basemapGallery div, probably to index.html

0 Kudos
BrandonPrice
Occasional Contributor

Hi Chris,

Thanks for getting me this.

-Brandon

0 Kudos