Map is blank when using Bing basemap

603
1
Jump to solution
03-07-2013 10:49 AM
JuneAcosta
Occasional Contributor III
The map draws blank when I try to add the Bing basemap. Firebug shows the error "this.spatialReference is undefined". The sample code does not show any spatial reference being defined, but I add it here since I have my own service added as well. Even if I remove the spatial reference I still get the same error. This is how the layer is added.
var initExtent = new esri.geometry.Extent({"xmin":-13073942.51,"ymin":3898938.00,"xmax":-13039545.85,"ymax":3921869.10,"spatialReference":{"wkid":102100}});                map = new esri.Map("mapDiv",{            extent:initExtent         });      //map = new esri.Map("mapDiv");     //Add the topographic layer to the map. View the ArcGIS Online site for services http://arcgisonline/home/search.html?t=content&f=typekeywords:service              //var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");          //map.addLayer(basemap);          //Create Bing map to add to map     veTileLayer = new esri.virtualearth.VETiledLayer({bingMapsKey: 'Aq6wyAehkpyMoyml9DNUcKN3YDVZ5oRbNwK0O--vJ2WJ7fAb0pC7VBX1VeRA6U9V', mapStyle:esri.virtualearth.VETiledLayer.MAP_STYLE_ROADS});     map.addLayer(veTileLayer);          var dynamicTraffic = new esri.layers.ArcGISDynamicMapServiceLayer("http://50.18.218.190/arcgis/rest/services/publicAGS/trafficStatus/MapServer");          map.addLayer(dynamicTraffic);
0 Kudos
1 Solution

Accepted Solutions
JuneAcosta
Occasional Contributor III
Its my error.... I am calling the map style: esri.virtualearth.VETiledLayer.MAP_STYLE_ROADS instead of esri.virtualearth.VETiledLayer.MAP_STYLE_ROAD.

View solution in original post

0 Kudos
1 Reply
JuneAcosta
Occasional Contributor III
Its my error.... I am calling the map style: esri.virtualearth.VETiledLayer.MAP_STYLE_ROADS instead of esri.virtualearth.VETiledLayer.MAP_STYLE_ROAD.
0 Kudos