# How to set layer bing map with labels active

**URL:** <https://community.cesium.com/t/how-to-set-layer-bing-map-with-labels-active/2168>\
**Category:** CesiumJS\
**Created:** [March 16, 2015, 10:23am UTC](https://community.cesium.com/t/how-to-set-layer-bing-map-with-labels-active/2168 "2015-03-16T10:23:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dylan\_Tusler](https://avatars.discourse-cdn.com/v4/letter/d/65b543/32.png) [@Dylan\_Tusler](https://community.cesium.com/u/Dylan_Tusler)\
**Post date:** [March 16, 2015, 10:23am UTC](https://community.cesium.com/t/how-to-set-layer-bing-map-with-labels-active/2168/1 "2015-03-16T10:23:32Z")

</div>

How can I get the bing map with labels to be the default layer shown when setting up my viewer?

I want the existing default layers to be available, I just want to select a different default selected layer.

Failed attempt:

```
    var bing = new Cesium.BingMapsImageryProvider({

      url : 'http://dev.virtualearth.net',

      mapStyle : Cesium.BingMapsStyle.AERIAL_WITH_LABELS

    });

    var viewer = new Cesium.Viewer('cesiumContainer', {

      animation: false,

      timeline: false,

      selectedImageryProviderViewModel: bing

    });
```

---

<div class="post-metadata">

**Author:** ![Matt\_Amato](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/matt_amato/32/1993_2.png) [@Matt\_Amato](https://community.cesium.com/u/Matt_Amato)\
**Post date:** [March 17, 2015, 7:15pm UTC](https://community.cesium.com/t/how-to-set-layer-bing-map-with-labels-active/2168/2 "2015-03-17T19:15:44Z")

</div>

This can be a little confusing because there are actually two ways to specify imagery depending on if you are using the baseLayerPicker or not. Try this:

var bing = new Cesium.BingMapsImageryProvider({

url : ‘[http://dev.virtualearth.net](http://dev.virtualearth.net)’,

mapStyle : Cesium.BingMapsStyle.AERIAL\_WITH\_LABELS

});

var viewer = new Cesium.Viewer(‘cesiumContainer’, {

animation : false,

timeline : false,

baseLayerPicker : false,

imageryProvider : bing

});

---

<div class="post-metadata">

**Author:** ![Dylan\_Tusler](https://avatars.discourse-cdn.com/v4/letter/d/65b543/32.png) [@Dylan\_Tusler](https://community.cesium.com/u/Dylan_Tusler)\
**Post date:** [March 17, 2015, 10:06pm UTC](https://community.cesium.com/t/how-to-set-layer-bing-map-with-labels-active/2168/3 "2015-03-17T22:06:08Z")

</div>

I’d like to use the BaseLayerPicker, just default to a different BaseLayer.

---

<div class="post-metadata">

**Author:** ![Matt\_Amato](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/matt_amato/32/1993_2.png) [@Matt\_Amato](https://community.cesium.com/u/Matt_Amato)\
**Post date:** [March 18, 2015, 9:24pm UTC](https://community.cesium.com/t/how-to-set-layer-bing-map-with-labels-active/2168/4 "2015-03-18T21:24:29Z")

</div>

There’s a few different ways to do it, but assuming you are using our default collection of view modes, this is probably the easiest way.

var viewer = new Cesium.Viewer(‘cesiumContainer’);

var baseLayerPickerViewModel = viewer.baseLayerPicker.viewModel;

baseLayerPickerViewModel.selectedImagery = baseLayerPickerViewModel.imageryProviderViewModels[1];

If you are defining your own collection of view models, pass “selectedImageryProviderViewModel” as an option to the Viewer constructor with the view model you want along with imageryProviderViewModels, which is the full set.

---

<div class="post-metadata">

**Author:** ![Dylan\_Tusler](https://avatars.discourse-cdn.com/v4/letter/d/65b543/32.png) [@Dylan\_Tusler](https://community.cesium.com/u/Dylan_Tusler)\
**Post date:** [March 19, 2015, 1:07am UTC](https://community.cesium.com/t/how-to-set-layer-bing-map-with-labels-active/2168/5 "2015-03-19T01:07:59Z")

</div>

That’s perfect, thanks.
