How to add Nova Basemap to BasemapToggle

1092
5
Jump to solution
04-26-2018 02:01 PM
EvelynHernandez
Occasional Contributor III

Hey there,

im wondering if there is a way to put the new nova basemap in the basemap toggle, cuz i really like it.

I hope u guys can help me, its really appreciated.

Thanks in advice.

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Sure here is a sample:

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
  <title>VectorTileLayer sample</title>
  <link rel="stylesheet" href="https://js.arcgis.com/3.24/esri/css/esri.css">
  <style>
    html, 
    body, 
    #map {
      height: 100%;
      width: 100%;
      margin: 0;
      padding: 0;
    }
  </style>
  <script src="https://js.arcgis.com/3.24/"></script>
  <script>
    require([
      "esri/map",
      "esri/layers/VectorTileLayer",
      "dojo/domReady!"
    ], function(Map, VectorTileLayer) {

      var map = new Map("map", {
        center: [2.3508, 48.8567], // longitude, latitude
        zoom: 2
      });

      //The URL referenced in the constructor may point to a style url JSON (as in this sample)
      //or directly to a vector tile service
      var vtlayer = new VectorTileLayer("http://www.arcgis.com/sharing/rest/content/items/75f4dfdff19e445395653121a95a85db/resources/styles/r...");
      map.addLayer(vtlayer);
    });
  </script>
</head>
<body>
  <div id="map"></div>
</body>
</html>

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Emeritus

Evelyn,

   The process involves a few steps:

  1. Select Groups in the arcgis.com banner.
  2. Select ‘Create a Group’.
  3. Complete the required fields (including Group members) and click ‘Save’.
  4. In the ‘Search for Maps’ area, search for ‘NOVA’ (make sure to uncheck the option "Only search in Organization" on the left). This will display the NOVA basemap.
  5. Click ‘Details’ for the Map you want to add to the Group.
  6. Click ‘Share’ and select the Group that you created.
  7. Now follow this link to add your group as your orgs default basemap gallery group: How To: Configure a default basemap in ArcGIS Online 
  8. Be sure to check "Share the Esri default basemaps to this group when you click Save"

Now you will see the NOVA basemap in your orgs basemap choices when you create a new web map.

0 Kudos
EvelynHernandez
Occasional Contributor III

But there is a way to add it in a js application?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Sure here is a sample:

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
  <title>VectorTileLayer sample</title>
  <link rel="stylesheet" href="https://js.arcgis.com/3.24/esri/css/esri.css">
  <style>
    html, 
    body, 
    #map {
      height: 100%;
      width: 100%;
      margin: 0;
      padding: 0;
    }
  </style>
  <script src="https://js.arcgis.com/3.24/"></script>
  <script>
    require([
      "esri/map",
      "esri/layers/VectorTileLayer",
      "dojo/domReady!"
    ], function(Map, VectorTileLayer) {

      var map = new Map("map", {
        center: [2.3508, 48.8567], // longitude, latitude
        zoom: 2
      });

      //The URL referenced in the constructor may point to a style url JSON (as in this sample)
      //or directly to a vector tile service
      var vtlayer = new VectorTileLayer("http://www.arcgis.com/sharing/rest/content/items/75f4dfdff19e445395653121a95a85db/resources/styles/r...");
      map.addLayer(vtlayer);
    });
  </script>
</head>
<body>
  <div id="map"></div>
</body>
</html>
ReneRubalcava
Frequent Contributor

Do you mean in the BasemapToggle widget?

BaseMap Toggle 

You don't get the thumbnail until it loads, but could load it yourself with the Basemap class.

RobertScheitlin__GISP
MVP Emeritus

I completely missed the toggle portion of Her question...

0 Kudos