Skip to content

Commit

Permalink
Merge pull request #6071 from AnalyticalGraphicsInc/bing-metadata
Browse files Browse the repository at this point in the history
Handle unexpected json response from bing api
  • Loading branch information
Tom Fili authored Jan 3, 2018
2 parents 999f0ba + f2038d5 commit 7f9abdd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/Scene/BingMapsImageryProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ define([
var metadataError;

function metadataSuccess(data) {
if (data.resourceSets.length !== 1) {
metadataFailure();
return;
}
var resource = data.resourceSets[0].resources[0];

that._tileWidth = resource.imageWidth;
Expand Down

0 comments on commit 7f9abdd

Please sign in to comment.