0

We have a map with streets as basemap.

We have been trying unsuccessfully, for the last two days to change the basemap to tiled layer with no success at all.

I am posting a snippet because script is long.

On the surface, it looks simple but it has been extremely challenging.

1 Answer 1

2

The issue is that you are declaring an initial basemap when you create the map. I've commented out that line, and added your code to add your tiled service.

    <script>
  var map;

  require([
    "esri/map", "esri/InfoTemplate",
    "esri/layers/FeatureLayer", "esri/dijit/HistogramTimeSlider",
    "dojo/parser", "dojo/dom-construct",
    "dijit/layout/BorderContainer", "dijit/layout/ContentPane",
    "dojo/domReady!"
  ], function(
    Map, InfoTemplate,
    FeatureLayer, HistogramTimeSlider,
    parser, domConstruct
  ) {
      parser.parse();

      map = new Map("mapDiv", {
       basemap: "streets",
        center: [-37.32, 33.22],
        zoom: 4
      });


        
                
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.