Set Default Basemap to Our OWN Local Map Server

750
3
Jump to solution
06-16-2013 03:10 PM
JasonBarles
New Contributor II
Hi,

How do you set the default basemap to something other than the ones provided by ArcGIS online? I am trying to set the default basemap to load one from our local ArcGIS Server.

So far I have got it to load our own basemap after choosing it from the basemap gallery.

This is my current default basemap code, which of course loads an ArcGIS online map:

map = new esri.Map("map", {
   basemap: "satellite",
   center: [150.8263120280644, -22.003174],
   zoom: 3
});

Thanks in advance!
0 Kudos
1 Solution

Accepted Solutions
ManojrajTeli
Occasional Contributor II
Hi,

You can do this
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://yourServerLink/MapServer", { useMapImage: true, "id": "Basemap" });     map.addLayer(basemap);


dont use basemap property in map variable.

View solution in original post

0 Kudos
3 Replies
ManojrajTeli
Occasional Contributor II
Hi,

You can do this
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://yourServerLink/MapServer", { useMapImage: true, "id": "Basemap" });     map.addLayer(basemap);


dont use basemap property in map variable.
0 Kudos
derekswingley1
Frequent Contributor
The tiled map service sample shows how to do this.
0 Kudos
JasonBarles
New Contributor II
Hi,

You can do this
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://yourServerLink/MapServer", { useMapImage: true, "id": "Basemap" });
    map.addLayer(basemap);


dont use basemap property in map variable.



Thank you for confirming my code was correct, as that was what I had originally. The issue however was that my browser didn't trust the server where the maps were being hosted.
0 Kudos