4

since this morning, there is a major bug regarding to the combination of Openlayers (version 2) and the base layers of Bing (satellite confirmed). During a refresh, the satellite map of Bing does not show up and throws the following error:

TypeError: this.metadata.resourceSets[0] is undefined

A general as well as brief fix, which helped me out was to update the API key of Bing. Unfortunately, my old api key of Openlayers v2 didn't work anymore and I came up with the idea to use the key of Openlayers v3.

Now my code look like this:

var apiKey = "Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3";
var satellit = new OpenLayers.Layer.Bing({
        name: 'Bing Satellit',
        key: apiKey,
        type: 'Aerial'
});   
map.addLayer(satellit);

This is just a hot fix. Does anyone has a better solution for this?

Thank you.

Gigelicious
  • 118
  • 1
  • 10

0 Answers0