GibbyAR

BasemapGallery with DynamicMapService

Discussion created by GibbyAR on Jul 24, 2013
Latest reply on Jul 25, 2013 by zhiqiangliu
I am using a dynamic map service as my operational layer which is in a UTM (meters) projection. I am trying to implement the BasemapGallery. A couple issues:

1.) The initial basemap (topo) does not appear when loading the application.

2.) When choosing a difference basemap, the operational layer disappears and the basemap does not appear...blank screen. Code snippet is below.

Any ideas?

Thanks in advance,

rGibson

map = new esri.Map("map",{
     infoWindow:popup,
     basemap: "topo",
     logo: false,
     extent: new esri.geometry.Extent({xmin:705766,ymin:4341305,xmax:706059,ymax:4341504,spatialReference:{wkid:26914}}),
     sliderStyle:"small"
        });

var basemapGallery = new esri.dijit.BasemapGallery({
          showArcGISBasemaps: true,
          map: map
        }, "basemapGallery");
        basemapGallery.startup();       
        dojo.connect(basemapGallery, "onError", function(msg) {console.log(msg)});


layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://myDirectory/rest/services/myService/MapServer", {"imageParameters":imageParameters, id:"dynamicLayer"});

map.addLayer(layer);

Outcomes