AnsweredAssumed Answered

Bing map (veTileLayer) as basemap

Question asked by SRoberts on Dec 17, 2012
Latest reply on Dec 18, 2012 by DSwingley-esristaff
I am working with the Tax Parcel Viewer template from the local government gallery.  I would like to add Bing Maps as a basemap.  I was able to modify the CreateBaseMapLayer to add a VeTileLayer as below, but I have two problems.  First the Bing Maps basemap draws on load, and the ChangeBaseMap function doesn't work properly.  How would I make the Bing layer not visible on load, and how do I get a reference to it using similar to "map.getLayer" so that I can update the ChangeBaseMap function? 
function CreateBaseMapLayer(layerURL, layerId, isVisible,bingKey) {     if (isVisible) {         currentBaseMap = layerId;     }  if (bingKey.length > 0 ){    veTileLayer = new esri.virtualearth.VETiledLayer({    bingMapsKey: bingKey,    mapStyle: esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL    });    return veTileLayer  }else{   var layer = new esri.layers.ArcGISTiledMapServiceLayer(layerURL, { id: layerId, visible: isVisible });   return layer;  } }