AnsweredAssumed Answered

Creating First Custom Application- Map/Layer Issues

Question asked by jfarmer@cityofstafford on Oct 2, 2013
Latest reply on Oct 3, 2013 by JUihlein-esristaff
We recently got a web host and cloud storage so I am working on creating some custom applications using ArcGIS API for Javascript. I have played around with the basemap gallery sample ( but instead of creating a new map, would like to use an existing webmap or separate layers.

I used this code to try the webmap with no success, I just get a blank screen. Also, if I just want to use feature services, how do I add those in to a new map?

Thanks for your help! I'm sure it's obvious I'm a newbie to this.
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10">
    <!--The viewport meta tag is used to improve the presentation and behavior of the samples
      on iOS devices-->
    <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; }
    <script src=""></script>
      var map;
        "esri/map", "esri/dijit/BasemapGallery", "esri/arcgis/utils",

        "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/TitlePane",
      ], function(
        Map, BasemapGallery, arcgisUtils,
      ) {

        arcgisUtils.createMap("ff0591055e3541ab951f3494c3553181", "mapDiv").then(function (response) {
          map =;  

        //add the basemap gallery, in this case we'll display maps from including bing maps
        var basemapGallery = new BasemapGallery({
          showArcGISBasemaps: true,
          map: map
        }, "basemapGallery");
        basemapGallery.on("error", function(msg) {
          console.log("basemap gallery error:  ", msg);

  <body class="claro">
    <div data-dojo-type="dijit/layout/BorderContainer"
         data-dojo-props="design:'headline', gutters:false"

      <div id="map"

        <div style="position:absolute; right:20px; top:10px; z-Index:999;">
          <div data-dojo-type="dijit/TitlePane"
               data-dojo-props="title:'Switch Basemap', closable:false,  open:false">
            <div data-dojo-type="dijit/layout/ContentPane" style="width:380px; height:280px; overflow:auto;">
            <div id="basemapGallery" ></div></div>