Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It's possible to add a layer as a basemap in by checking the check box use as baselayer:

Use as base Layer

But when I consume the map using:

var mapDeferred = esri.arcgis.utils.createMap("<guid>", "map", {
                mapOptions: {
                    slider: true,
                    nav: false

the basemap don't show up, is there any rules that define what content can be used as a basemap?

share|improve this question
one quick question, after u added the required Web Service as basemap, were you able to customize it and enable popups on it? In the same manner as we can do when we add a simple shapefile and then enable popups on it. I tried but it seems that if you want to add a shapefile as a basemap, the enable popup feature is no more available. This is the question that I posted,… – Sam007 Aug 20 '12 at 21:58
up vote 7 down vote accepted

Yes, this is definitely possible, here's an example:

<!doctype html>
<html lang="en">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" />
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
    <link rel="stylesheet" href="">
    <link rel="stylesheet" href="">
      html, body { height: 100%; width: 100%; margin: 0; padding: 0; }
      #map{ margin: 0; padding: 0; }
    <script>var dojoConfig = { parseOnLoad: true };</script>
    <script src=""></script>

      var map;
      esri.config.defaults.geometryService = new esri.tasks.GeometryService('');
      function init() {
        var agol_map = new esri.arcgis.utils.createMap("c11215b898ec46369f855c82b28fc65e", "map", {
          mapOptions: {
            slider: true,
        agol_map.addCallback(function(response) {
          // Keep a reference to the map
          map =;

          dojo.connect(dijit.byId('map'), 'resize', function() { 
            dojo.connect(dijit.byId('map'), 'resize', map, map.resize);

  <body class="tundra">
    <div data-dojo-type="dijit.layout.BorderContainer" 
         style="width: 100%; height: 100%; margin: 0;">
      <div id="map" 

Update: The key is to add a default geometry service:

esri.config.defaults.geometryService = new esri.tasks.GeometryService('');
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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