From f2038d55ccc16539fcb1fbe5cf37d525d45fc285 Mon Sep 17 00:00:00 2001 From: hpinkos Date: Sun, 24 Dec 2017 23:08:29 -0500 Subject: [PATCH] handle unexpected json response from bing api --- Source/Scene/BingMapsImageryProvider.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Scene/BingMapsImageryProvider.js b/Source/Scene/BingMapsImageryProvider.js index 0861a9c92122..0ae111431764 100644 --- a/Source/Scene/BingMapsImageryProvider.js +++ b/Source/Scene/BingMapsImageryProvider.js @@ -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;