openlayers/ol3 — pull request #1200 by bartvde (2013-11-12 15:06:56+00:00)
Title: initialising Bing source without api key results in error

Not sure if this was tackled by @twpayne and @tschaub on the recent Bing work and hasn't made it into the online build. This is totally user-error but it's about the way we handle it currently.

So if I do this:

```
var map = new ol.Map({
target: 'map',
renderer: ol.RendererHint.CANVAS,
layers: [
new ol.layer.Tile({
source: new ol.source.BingMaps()
})
],
view: new ol.View2D({
center: ol.proj.transform([-93.27, 44.98], 'EPSG:4326', 'EPSG:3857'),
zoom: 9
})
});
```

I end up with a JS error:

Uncaught TypeError: Cannot read property 'tileLoadFunction' of undefined

Maybe the BingMaps source should be protected against getting instantiated without an api key?