The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Bruce W (3) [Avatar] Offline
In chapter 4 page 84 - 85 you demonstrate how to add a map using the gray esri basemap layer. Can I do the same thing using an ArcGIStiledMapServerLayer?.. how?
Thank you for a great book!
Bruce W (3) [Avatar] Offline
Well, to answer my own question I did this...

In mapcontroller.js after the line: = new Map(this.options.elem, this.options.mapOptions);

I added the following code:

var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://myserver/ArcGIS/rest/services/Basemaps/Basemap_aRoads/MapServer");;

I also added "esri/layers/ArcGISTiledMapServiceLayer" under define.

Then in main.js I commented out //basemap: 'topo'

... voilĂ  it worked!

Rene Rubalcava (12) [Avatar] Offline
I'm glad you found a solution! If you need anything else, just let me know. Thanks!
Bruce W (3) [Avatar] Offline
I was also able to replace the ArcGIStiledMapServerLayer with a ESRI BasemapToggle widget and it works well too. I'm pretty excited about the possibilities!