Basemap not wanted

680
4
06-20-2014 01:42 PM
MichaelThompson2
Occasional Contributor
I am wanting to configure one of the JS templates but I don't want a basemap to load. Is there is an option for this like there is in ArcMAP?

Thank all 🙂
0 Kudos
4 Replies
BjornSvensson
Esri Regular Contributor
Do you mean you don't want a basemap from ArcGIS Online, or you don't want a basemap at all? Do you want a completely blank map, or do you want some map data in the map?

The base map does not have to be one of the Esri-provided ones, see for example http://doc.arcgis.com/en/arcgis-online/create-maps/choose-basemap.htm.
0 Kudos
MichaelThompson2
Occasional Contributor
Do you mean you don't want a basemap from ArcGIS Online, or you don't want a basemap at all? Do you want a completely blank map, or do you want some map data in the map?

The base map does not have to be one of the Esri-provided ones, see for example http://doc.arcgis.com/en/arcgis-online/create-maps/choose-basemap.htm.


My thought was to not have a basemap at all, just locally published map services. My application has no need for layers other than the services we are publishing, though I see that the projection is set by the basemap. So maybe I need to save one of our layers as a tiled layer and use it as a basemap for the sake of the projection? Would section lines be something one could use for that?
0 Kudos
TimWitt
Frequent Contributor
Michael,

if you don't want a basemap, just add your layers and create the map with the minimum information needed

            map = new Map("map", {
                
            });


That won't load a basemap.

Tim
0 Kudos
KonstantinLapine
New Contributor
My thought was to not have a basemap at all, just locally published map services. My application has no need for layers other than the services we are publishing, though I see that the projection is set by the basemap. So maybe I need to save one of our layers as a tiled layer and use it as a basemap for the sake of the projection? Would section lines be something one could use for that?


The projection is set by extent the map was initialized with or, if no extent was used in the map constructor, by the first layer added to the map, whether it is a a tiled service or a dynamic one.

So, if to the code above you add:

var service = new esri.layers.ArcGISDynamicMapServiceLayer('http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer');

map.addLayer(service);


the map spatial reference will be set to the layer's one: 4326
0 Kudos