none
Bing Maps veapicore.js throws unhandled exception. RRS feed

  • Question

  • For at least the past few hours (and maybe longer?), the Bing Maps SDK for Windows Store apps (for Windows 8.0) has been throwing an unhandled exception in our app:

    Unhandled exception at line 1, column 37487 in ms-appx:///Bing.Maps.JavaScript//js/veapicore.js
    
    0x800a03f6 - JavaScript runtime error: Invalid character

    This has been confirmed on multiple machines and occurs on a call that has worked reliably for several years now (it's the basic loadModule call: Microsoft.Maps.loadModule('Microsoft.Maps.Map'...). In the past we've seen this happen when the Bing Maps API is unreachable (see this thread)—but never for this long. Any insight as to what might be causing the problem?

    Saturday, May 9, 2015 1:36 AM

Answers

  • Are you still seeing this issue? The dev team has cleared the cache on the servers that had a bad configuration file on them which was causing this issue. If you are still seeing this issue, try clearing your browser cache.

    http://rbrundritt.wordpress.com

    Tuesday, May 12, 2015 11:20 PM
  • Yes, it does work now. I've also tried to come up with another solution that would let my app work in case it happens again. It is not fully tested because the service is back up, but I am pretty sure it works well since I simulated the invalid response. I believe this is better than having the app crashing so if you guys want to try it out, add a javascript file after this line:

    <script type="text/javascript" src="ms-appx:///Bing.Maps.JavaScript//js/veapicore.js"></script>

    <script src="fix_bingmaps.js"></script>

    And the "fix_bingmaps.js" code:

    (function () {
    
        var gimme = Microsoft.Maps.Gimme;
        gimme.Ajax = new function () {
            function requestJson(url, callback) {
                sendRequest(url, callback, true)
            }
    
            function requestData(url, callback) {
                sendRequest(url, callback, false)
            }
    
            function createNewRequest() {
                if (typeof XMLHttpRequest != "undefined") return new XMLHttpRequest;
                if (typeof ActiveXObject != "undefined") try {
                    return new ActiveXObject("Microsoft.XMLHTTP")
                } catch (err) {
                    throw new Error("Error invoking XMLHTTP");
                } else throw new Error("XMLHttp is not supported");
            }
    
            function sendRequest(url, callback, expectJson) {
                var request = createNewRequest();
                request.onreadystatechange = function () {
                    if (request.readyState === 4) {
                        var response = request.responseText;
    
                        if (expectJson && response) {
                            try {
                                response = gimme.Internals.parseJSON(response);
                            } catch (err) {
                                // HACK around invalid map configuration response.
                                // ex.: "The server is temporarily unavailable. Try again later."
                                if (/mapconfiguration\.ashx/.test(url)) {
                                    response = defaultConfiguration;
                                } else {
                                    throw err;
                                }
                            }
                        }
    
                        callback.call(request, response, request.status);
                        request = null;
                        callback = null;
                    }
                };
                request.open("GET", url, !0);
                request.send("");
            }
    
            this.request_json = requestJson;
            this.request_ahah = requestData;
        };
    
        var defaultConfiguration = {
            "domain": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0",
            "version": "7.0.20150330144205.96",
            "serverversion": "7.0.20120123200232.91",
            "locale": "EN-US",
            "ishttpsenabled": false,
            "tilegeneration": 3485,
            "odmtilegeneration": 86,
            "onloadcallback": "__onscriptload__",
            "defaultTileSize": 256,
            "maxFPS": 60,
            "maxConcurrentTileDownloads": 12,
            "spacerImageUrl": "http://www.bing.com/maps/i/spacer.gif",
            "disableVenueMaps": false,
            "disableMicroPOI": false,
            "disableDirections": false,
            "disableStreetside": false,
            "disableAnalytics": false,
            "disableSearch": false,
            "disableTasks": false,
            "streetsideGlobalMetadataUriFormat": "http://ecn.dev.virtualearth.net/REST/V1/Imagery/BlockView/StreetMetadata/ECN/{0}/{1}/{2}/{3}.js?jsonp={4}&key=AvlNiRQgHx0x9v3UNufLEfme5-g467LK_fbxxteQANuhtNoL6E9Gjhb_-Nl_FCRL",
            "streetsideChunkMetadataUriFormat": "http://ecn.dev.virtualearth.net/REST/V1/Imagery/BlockView/ChunkMetadata/ECN/{0}/{1}/{2}/{3}.js?jsonp={4}&key=AvlNiRQgHx0x9v3UNufLEfme5-g467LK_fbxxteQANuhtNoL6E9Gjhb_-Nl_FCRL",
            "streetsideCoverageMercatorUriFormat": "{urischeme}ecn.t{subdomain}.tiles.virtualearth.net/tiles/hcn{quadkey}?g={generation}&n=z",
            "streetsideCoverageBirdseyeUriFormat": "{urischeme}ecn.t{subdomain}.tiles.virtualearth.net/tiles/hcs{quadkey}?g={generation}&dir={dir}&n=z",
            "streetsideImageryUriFormat": "http://ecn.t{1}.tiles.virtualearth.net/tiles/bvi{2}?g={0}&ir=ir0&mkt=en-us&n=f",
            "streetsideSingleBlockLookupWithDataUriFormat": "http://dev.virtualearth.net/REST/V1/Imagery/BlockView/BlockLookupWithData/{0}/{1}/{2},{3}/{4}?jsonp={5}&key=AvlNiRQgHx0x9v3UNufLEfme5-g467LK_fbxxteQANuhtNoL6E9Gjhb_-Nl_FCRL",
            "streetsideSingleBlockTokenLookupWithDataUriFormat": "http://dev.virtualearth.net/REST/V1/Imagery/BlockView/BlockLookupWithData/{0}/{1}/{2}?jsonp={3}&key=AvlNiRQgHx0x9v3UNufLEfme5-g467LK_fbxxteQANuhtNoL6E9Gjhb_-Nl_FCRL",
            "streetsideCubeImageryUriFormat": "http://ecn.t{0}.tiles.virtualearth.net/tiles/hs{1}.jpg?g={2}&n=z",
            "streetsideCubeDataLookupUriFormat": "{urischeme}dev.virtualearth.net/mapcontrol/HumanScaleServices/GetBubbles.ashx?c={0}&n={1}&s={2}&e={3}&w={4}&jsCallback={5}&key={6}",
            "streetsideTileGeneration": "864",
            "streetsideImageReportingUriFormat": "https://support.discoverbing.com/default.aspx?mkt={0}&productkey=bingmapprivacy&ct=eformts&(!)_SessionID=12345678&(!)_PermalinkURL={1}&(!)_Timestamp={2}&(!)_BubbleID={3}&(!)_CoordinatesofPro={4}",
            "streetsidePermalinkUriFormat": "http://www.bing.com/maps/?v=2&cp={0}~{1}&lvl=22&sty=t~pixelOffset~{2}~streetSide~{3}~isPrivacyFocusEnabled~{4}~blockID~{5}",
            "transitTrainLineComBuyTicketsUriFormat": "http://www.thetrainline.com/buytickets/?utm_source=Microsoft&utm_medium=Maps&WT.mc_id={0}",
            "cssPath": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/css/bin/7.0.20130228155632.36/en/",
            "imagePath": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/i/",
            "jsPath": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/js/bin/7.0.20130228155632.36/EN-US/",
            "directionsImagePath": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/i/Directions/",
            "venueMapsEroServiceAppId": "BF17C84531C2B15EBE4BACA0F545AF4040188EFA",
            "logServiceUriFormat": "{urischeme}dev.virtualearth.net/webservices/v1/LoggingService/LoggingService.svc/Log?entry=0&fmt=1&type=3&group=MapControl&name=Win8-JS&version={version}&mkt={culture}&auth={credentials}",
            "logOSServiceUriFormat": "{urischeme}dev.virtualearth.net/webservices/v1/LoggingService/LoggingService.svc/Log?entry=0&fmt=1&type=3&group=MapControl&name=imageryOS&version={version}&mkt={culture}&auth={credentials}",
            "roadUriFormat": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt={culture}&it=G,L&shading=hill&og={odmgeneration}&n=z&key={key}",
            "roadUnlabeledUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/r{quadkey}?g={generation}&mkt={culture}&lbl=l0&stl=h&shading=hill&n=z",
            "aerialUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/a{quadkey}.jpeg?g={generation}&n=z",
            "aerialWithLabelsUriFormat": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt={culture}&it=A,G,L&shading=hill&og={odmgeneration}&n=z&key={key}",
            "enhancedBirdseyeUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/svi{quadkey}?g={generation}&dir={dir}&n=z",
            "enhancedBirdseyeWithLabelsUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/cmd/svhybrid?a={quadkey}&g={generation}&dir={dir}&n=z",
            "nativeBirdseyeUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/o{quadkey}-{runtimeindex}-{level}-{index}?g={generation}",
            "nativeBirdseyeWithLabelsUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/cmd/ObliqueHybrid?a={quadkey}-{runtimeindex}-{level}-{index}&g={generation}",
            "collinsBartUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/r{quadkey}.png?g={generation}&productSet=mmCB",
            "ordnanceSurveyUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/r{quadkey}.png?g={generation}&productSet=mmOS",
            "fbUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/r{quadkey}?g={generation}&mkt={culture}&lbl=l1&stl=fb&shading=hill&n=z&key=AkF0mEyG789RQA6CcLimWZMzrDNF6MNSwRJOmNWb9gK_JGiwOBeMoQUoY1MFqksg",
            "fbUnlabeledUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/r{quadkey}?g={generation}&mkt={culture}&lbl=l0&stl=fb&shading=hill&n=z&key=AkF0mEyG789RQA6CcLimWZMzrDNF6MNSwRJOmNWb9gK_JGiwOBeMoQUoY1MFqksg",
            "bingMapsRESTServicesUrl": "{urischeme}dev.virtualearth.net/REST/v1/Locations",
            "imageryMetadataUrl": "{urischeme}dev.virtualearth.net/REST/V1/Imagery/Metadata/{imagerySet}?key={credentials}&centerPoint=47.6,-122.2&zoomLevel=1&include=ImageryProviders&culture={culture}",
            "elevationServiceUrl": "{urischeme}dev.virtualearth.net/REST/v1/Elevation/BoundingRect/{south},{west},{north},{east}/{rows}/{cols}?key={credentials}",
            "nativeBirdseyeMetadataUrl": "{urischeme}dev.virtualearth.net/REST/V1/Imagery/Metadata/Birdseye/{centerpoint}?key={credentials}&zl={zoom}&dir={heading}&dl=2",
            "venueMapsMetadataJsonpUrl": "default={urischeme}dev.virtualearth.net/REST/v1/JsonFilter/VenueMaps/data/{0}?culture={culture}&key={credentials};prod={urischeme}dev.virtualearth.net/REST/v1/JsonFilter/VenueMaps/data/{0}?culture={culture}&key={credentials};dev={urischeme}dev.virtualearth.net/REST/v1/JsonFilter/VenueMapsDev/{0}?culture={culture}&key={credentials};staging={urischeme}dev.virtualearth.net/REST/v1/JsonFilter/VenueMapsStaging/data/{0}?culture={culture}&key={credentials};",
            "venueMapsTileUrl": "default={urischeme}venuemaps.virtualearth.net/{0}/{1}/{{quadkey}}.png;prod={urischeme}venuemaps.virtualearth.net/{0}/{1}/{{quadkey}}.png;dev={urischeme}bingmapsdevelopment.blob.core.windows.net/{0}/{1}/{{quadkey}}.png;staging={urischeme}stagingembedmap.blob.core.windows.net/{0}/{1}/{{quadkey}}.png",
            "venueMapsNearbyUrl": "{urischeme}dev.virtualearth.net/REST/v1/VenueMaps/PointRadius/{location}/{radius}?output=json&key={credentials}",
            "venueMapsEroServiceUrl": "http://api.bing.net/json.aspx?AppId={appid}&Query={query}&Sources=Phonebook&Version=2.0&Market=en-us&UILanguage=en&Latitude={latitude}&Longitude={longitude}&Radius=10.0&Options=EnableHighlighting&Phonebook.Count=1&Phonebook.Offset=0&Phonebook.FileType=YP&Phonebook.SortBy=Distance&Phonebook.LocId={ypid}",
            "hotRegionsRoadUrl": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}.json?mkt={culture}&it=G,VE,BX,L,LA&shading=hill&og={odmgeneration}",
            "hotRegionsAerialWithLabelsUrl": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}.json?mkt={culture}&it=A,G,L&shading=hill&og={odmgeneration}",
            "onDemandRoadUriFormat": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt={culture}&it=G,VE,BX,L,LA&shading=hill&og={odmgeneration}&n=z",
            "onDemandAerialWithLabelsUriFormat": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt={culture}&it=A,G,L&shading=hill&og={odmgeneration}&n=z",
            "microPOIHotRegionsUrl": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/mpoi/MicroPoi/{quadkey}.json?q={query}&filter={filter}",
            "microPOITilesUrl": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/mpoi/MicroPoi/{quadkey}?q={query}&filter={filter}",
            "trafficUriFormat": "{urischeme}t{subdomain}.tiles.virtualearth.net/tiles/dp/content?p=tf&a={quadkey}&n=z",
            "imageryCopyrightUrl": "{urischeme}dev.virtualearth.net/REST/V1/Imagery/Copyright/{culture}/{imagerySet}/{zoom}/{minLat}/{minLon}/{maxLat}/{maxLon}?output=json&dir={heading}&key={credentials}",
            "directionsService": "{urischeme}dev.virtualearth.net/mapcontrol/directions.ashx?",
            "directionsMaxWaypoints": "25",
            "defaultAerialTiltOn": true,
            "notileImageUrl": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/i/notile.png",
            "pushpinImageUrl": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/i/poi_search.png",
            "microPOIImageUrl": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/i/MicroPOI/",
            "venueMapsNumberOfMapTileServers": 4,
            "venueMapsTileServerSubdomainsX": "0,2,4,6",
            "venueMapsTileServerSubdomainsY": "1,3,5,7",
            "logoBingMapsLink": "http://www.bing.com/maps/?v=2&cp={0}~{1}&lvl={2}&FORM=BMLOGO",
            "logoBingSearchUrl": "http://www.bing.com/search?q={0}&FORM=BMSDK1",
            "searchService": "{urischeme}dev.virtualearth.net/services/v1/SearchService/SearchService.asmx/Search2",
            "geocodingService": "{urischeme}dev.virtualearth.net/services/v1/geocodeservice/geocodeservice.asmx",
            "cursorPath": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/cursors/",
            "message": "",
            "biciLoggingService": "{urischeme}dev.virtualearth.net/mapcontrol/logging.ashx",
            "biciPID": "5902",
            "bingThemeIconUrlFormat": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/i/BingTheme/pins/pin_{iconStyle}{imageryStyle}{state}.png",
            "updateAvailable": "false",
            "versionNotSupported": "false",
            "trafficIncidentsJs": "{urischeme}ecn.dev.virtualearth.net/REST/v1/Traffic/Incidents/{bounds}/?severity={sev}&key={credentials}",
            "trafficMinZoom": 5,
            "trafficMinIncidentsZoom": 8,
            "trafficRefresh": 1.8E+5,
            "trafficExpiry": 1.8E+5,
            "localDetailsUrl": "http://www.bing.com/local/details.aspx?lid={0}&q={1}&mkt={culture}&FORM={2}",
            "restAdvancedSearchService": "{urischeme}dev.virtualearth.net/mapcontrol/search.ashx",
            "wikiDataUrl": "http://upload.maps.bing.com/WikipediaContentProviderService/WikipediaInfo.ashx?eid={0}",
            "weatherLightUriFormat": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt={culture}&it=GB&cstl=WL&og={odmgeneration}&n=z",
            "weatherDarkUriFormat": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt={culture}&it=GB&cstl=WD&og={odmgeneration}&n=z",
            "weatherLightLabelUriFormat": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt={culture}&it=Z,GF,L&cstl=WL&og={odmgeneration}&n=z",
            "weatherDarkLabelUriFormat": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt={culture}&it=Z,GF,L&cstl=WD&og={odmgeneration}&n=z",
            "localScoutSupported": false,
            "localScoutServiceUrlFormat": "nearby.ashx?action={action}&location={latitude},{longitude}&filters={filters}&sortby={sortby}",
            "displayMapAppsPanel": true,
            "venueMapAction1Context": "Mall",
            "venueMapAction2Context": "Airport",
            "mapAppApp1ActionContext": "10330",
            "mapAppApp2ActionContext": "10310",
            "privacyStatementLink": "http://www.microsoft.com/privacystatement/{culture}/bing/default.aspx",
            "isLocalEntityReportAProblemSupported": true,
            "distanceUnitMiles": true,
            "radixPointDecimal": true,
            "searchBoxContainerID": "sb_form",
            "searchBoxID": "sb_form_q",
            "searchBoxSubmitButtonID": "sb_form_go",
            "autoSuggestContainerID": "sw_as",
            "autoSuggestMaxResults": "5",
            "autoSuggestServiceUrlFormat": "http://platform.bing.com/geo/autosuggest/v1?umv={user_map_view}&ul={user_location}&q={query}&reqid={jsonso}&mr={max_results}&cb={callback}"
        };
    
    })();
    

    Wednesday, May 13, 2015 2:52 AM

All replies

  • I've also confirmed that this unhandled exception is being thrown by a blank app, created from scratch using the old Bing Maps for Windows Store SDK instructions; it doesn't seem to be specific to our app. I'm glad to share that solution, should anyone be able to investigate / confirm. Help needed!
    • Edited by Matt Hauger Sunday, May 10, 2015 2:13 AM clarity.
    Sunday, May 10, 2015 2:11 AM
  • I was seeing the same exception yesterday and earlier today. Then it just stopped. Are you still getting the exception?
    Monday, May 11, 2015 2:30 AM
  • As of 8:30am ET, this exception is still being thrown by veapicore.js, both in our app and in a blank app with maps added.
    Monday, May 11, 2015 12:37 PM
  • I've had the same problem 3 weeks ago. And now as well. I posted on this forums to get workarounds, but no real answer. In more details, what happens is a request is sent to this url by Bing Maps: http://ecn.dev.virtualearth.net/mapcontrol/mapconfiguration.ashx?name=wwa&v=7.0.2wwa&culture=en-us&homeRegion=US

    But the response is: The server is temporarily unavailable. And that cannot be parsed into a JSON object. I've been trying the url this morning and the server seems to be on & off. Some requests work, but most don't.

    Would still love go get an official work-around because it is making my app crashing and completely unusable.

    Monday, May 11, 2015 2:34 PM
  • As of right now, the Bing Maps API appears to be working again. Fingers crossed!
    Monday, May 11, 2015 3:11 PM
  • After working all day, the issue has just started occurring again. Anyone else?

    Has anyone come up with a way to prevent the exception from crashing the app? I've tried handling it in the onerror event but no matter what I do, once the onerror function completes the app crashes. 

    Monday, May 11, 2015 10:14 PM
  • I was checking out out LambdaFun's explanation and found that the URL returns correctly if you adjust the version number down to 7.0.1 like this: http://ecn.dev.virtualearth.net/mapcontrol/mapconfiguration.ashx?name=wwa&v=7.0.1wwa&culture=en-us&homeRegion=US.

    I then tracked down the veapicore.js source file on my machine and modified the URL in the source. And now the bing maps is working fine again. When I change the veapicore.js file back to the original it fails. This seems like a poor solution but better than nothing. Thoughts?

    Monday, May 11, 2015 10:33 PM
  • When I analysed it, I started overwriting some Bing Maps functions right after loading it. I stopped for two reasons, I felt it would not work great after Bing Maps API updates and my time was taken by other projects.

    I am pretty should we could come up with a decent solution if we continue in that direction.

    Tuesday, May 12, 2015 1:58 AM
  • I have the same problem in all my apps. Is there any solution yet?

    Tuesday, May 12, 2015 7:10 AM
  • Updating the version number for the mapconfiguration.ashx to 7.0.1 is the only solution that I've found. I don't really know what the consequences of doing this are though. So far it has worked while the 7.0.2 version continues to return "The server is temporarily unavailable".  I wish someone from Microsoft would weigh in here since the clearly appears to be an issue with their service. I'm not really sure who/how to make aware of this.

    Tuesday, May 12, 2015 4:59 PM
  • Are you still seeing this issue? The dev team has cleared the cache on the servers that had a bad configuration file on them which was causing this issue. If you are still seeing this issue, try clearing your browser cache.

    http://rbrundritt.wordpress.com

    Tuesday, May 12, 2015 11:20 PM
  • I can confirm that it's working now. Thank you!

    Is this something we should expect in the future? I've experienced it on and off over the last few weeks and it sounds like others have as well. It's a killer for javascript apps that use the map control. I can't find a way to handle the resulting exception either. I can detect/log them in onerror but it immediately crashes the app right after. Any ideas? Also, any suggestions on how we can report the issue and get it resolved more quickly if it happens again.

    Wednesday, May 13, 2015 2:40 AM
  • Yes, it does work now. I've also tried to come up with another solution that would let my app work in case it happens again. It is not fully tested because the service is back up, but I am pretty sure it works well since I simulated the invalid response. I believe this is better than having the app crashing so if you guys want to try it out, add a javascript file after this line:

    <script type="text/javascript" src="ms-appx:///Bing.Maps.JavaScript//js/veapicore.js"></script>

    <script src="fix_bingmaps.js"></script>

    And the "fix_bingmaps.js" code:

    (function () {
    
        var gimme = Microsoft.Maps.Gimme;
        gimme.Ajax = new function () {
            function requestJson(url, callback) {
                sendRequest(url, callback, true)
            }
    
            function requestData(url, callback) {
                sendRequest(url, callback, false)
            }
    
            function createNewRequest() {
                if (typeof XMLHttpRequest != "undefined") return new XMLHttpRequest;
                if (typeof ActiveXObject != "undefined") try {
                    return new ActiveXObject("Microsoft.XMLHTTP")
                } catch (err) {
                    throw new Error("Error invoking XMLHTTP");
                } else throw new Error("XMLHttp is not supported");
            }
    
            function sendRequest(url, callback, expectJson) {
                var request = createNewRequest();
                request.onreadystatechange = function () {
                    if (request.readyState === 4) {
                        var response = request.responseText;
    
                        if (expectJson && response) {
                            try {
                                response = gimme.Internals.parseJSON(response);
                            } catch (err) {
                                // HACK around invalid map configuration response.
                                // ex.: "The server is temporarily unavailable. Try again later."
                                if (/mapconfiguration\.ashx/.test(url)) {
                                    response = defaultConfiguration;
                                } else {
                                    throw err;
                                }
                            }
                        }
    
                        callback.call(request, response, request.status);
                        request = null;
                        callback = null;
                    }
                };
                request.open("GET", url, !0);
                request.send("");
            }
    
            this.request_json = requestJson;
            this.request_ahah = requestData;
        };
    
        var defaultConfiguration = {
            "domain": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0",
            "version": "7.0.20150330144205.96",
            "serverversion": "7.0.20120123200232.91",
            "locale": "EN-US",
            "ishttpsenabled": false,
            "tilegeneration": 3485,
            "odmtilegeneration": 86,
            "onloadcallback": "__onscriptload__",
            "defaultTileSize": 256,
            "maxFPS": 60,
            "maxConcurrentTileDownloads": 12,
            "spacerImageUrl": "http://www.bing.com/maps/i/spacer.gif",
            "disableVenueMaps": false,
            "disableMicroPOI": false,
            "disableDirections": false,
            "disableStreetside": false,
            "disableAnalytics": false,
            "disableSearch": false,
            "disableTasks": false,
            "streetsideGlobalMetadataUriFormat": "http://ecn.dev.virtualearth.net/REST/V1/Imagery/BlockView/StreetMetadata/ECN/{0}/{1}/{2}/{3}.js?jsonp={4}&key=AvlNiRQgHx0x9v3UNufLEfme5-g467LK_fbxxteQANuhtNoL6E9Gjhb_-Nl_FCRL",
            "streetsideChunkMetadataUriFormat": "http://ecn.dev.virtualearth.net/REST/V1/Imagery/BlockView/ChunkMetadata/ECN/{0}/{1}/{2}/{3}.js?jsonp={4}&key=AvlNiRQgHx0x9v3UNufLEfme5-g467LK_fbxxteQANuhtNoL6E9Gjhb_-Nl_FCRL",
            "streetsideCoverageMercatorUriFormat": "{urischeme}ecn.t{subdomain}.tiles.virtualearth.net/tiles/hcn{quadkey}?g={generation}&n=z",
            "streetsideCoverageBirdseyeUriFormat": "{urischeme}ecn.t{subdomain}.tiles.virtualearth.net/tiles/hcs{quadkey}?g={generation}&dir={dir}&n=z",
            "streetsideImageryUriFormat": "http://ecn.t{1}.tiles.virtualearth.net/tiles/bvi{2}?g={0}&ir=ir0&mkt=en-us&n=f",
            "streetsideSingleBlockLookupWithDataUriFormat": "http://dev.virtualearth.net/REST/V1/Imagery/BlockView/BlockLookupWithData/{0}/{1}/{2},{3}/{4}?jsonp={5}&key=AvlNiRQgHx0x9v3UNufLEfme5-g467LK_fbxxteQANuhtNoL6E9Gjhb_-Nl_FCRL",
            "streetsideSingleBlockTokenLookupWithDataUriFormat": "http://dev.virtualearth.net/REST/V1/Imagery/BlockView/BlockLookupWithData/{0}/{1}/{2}?jsonp={3}&key=AvlNiRQgHx0x9v3UNufLEfme5-g467LK_fbxxteQANuhtNoL6E9Gjhb_-Nl_FCRL",
            "streetsideCubeImageryUriFormat": "http://ecn.t{0}.tiles.virtualearth.net/tiles/hs{1}.jpg?g={2}&n=z",
            "streetsideCubeDataLookupUriFormat": "{urischeme}dev.virtualearth.net/mapcontrol/HumanScaleServices/GetBubbles.ashx?c={0}&n={1}&s={2}&e={3}&w={4}&jsCallback={5}&key={6}",
            "streetsideTileGeneration": "864",
            "streetsideImageReportingUriFormat": "https://support.discoverbing.com/default.aspx?mkt={0}&productkey=bingmapprivacy&ct=eformts&(!)_SessionID=12345678&(!)_PermalinkURL={1}&(!)_Timestamp={2}&(!)_BubbleID={3}&(!)_CoordinatesofPro={4}",
            "streetsidePermalinkUriFormat": "http://www.bing.com/maps/?v=2&cp={0}~{1}&lvl=22&sty=t~pixelOffset~{2}~streetSide~{3}~isPrivacyFocusEnabled~{4}~blockID~{5}",
            "transitTrainLineComBuyTicketsUriFormat": "http://www.thetrainline.com/buytickets/?utm_source=Microsoft&utm_medium=Maps&WT.mc_id={0}",
            "cssPath": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/css/bin/7.0.20130228155632.36/en/",
            "imagePath": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/i/",
            "jsPath": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/js/bin/7.0.20130228155632.36/EN-US/",
            "directionsImagePath": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/i/Directions/",
            "venueMapsEroServiceAppId": "BF17C84531C2B15EBE4BACA0F545AF4040188EFA",
            "logServiceUriFormat": "{urischeme}dev.virtualearth.net/webservices/v1/LoggingService/LoggingService.svc/Log?entry=0&fmt=1&type=3&group=MapControl&name=Win8-JS&version={version}&mkt={culture}&auth={credentials}",
            "logOSServiceUriFormat": "{urischeme}dev.virtualearth.net/webservices/v1/LoggingService/LoggingService.svc/Log?entry=0&fmt=1&type=3&group=MapControl&name=imageryOS&version={version}&mkt={culture}&auth={credentials}",
            "roadUriFormat": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt={culture}&it=G,L&shading=hill&og={odmgeneration}&n=z&key={key}",
            "roadUnlabeledUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/r{quadkey}?g={generation}&mkt={culture}&lbl=l0&stl=h&shading=hill&n=z",
            "aerialUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/a{quadkey}.jpeg?g={generation}&n=z",
            "aerialWithLabelsUriFormat": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt={culture}&it=A,G,L&shading=hill&og={odmgeneration}&n=z&key={key}",
            "enhancedBirdseyeUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/svi{quadkey}?g={generation}&dir={dir}&n=z",
            "enhancedBirdseyeWithLabelsUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/cmd/svhybrid?a={quadkey}&g={generation}&dir={dir}&n=z",
            "nativeBirdseyeUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/o{quadkey}-{runtimeindex}-{level}-{index}?g={generation}",
            "nativeBirdseyeWithLabelsUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/cmd/ObliqueHybrid?a={quadkey}-{runtimeindex}-{level}-{index}&g={generation}",
            "collinsBartUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/r{quadkey}.png?g={generation}&productSet=mmCB",
            "ordnanceSurveyUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/r{quadkey}.png?g={generation}&productSet=mmOS",
            "fbUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/r{quadkey}?g={generation}&mkt={culture}&lbl=l1&stl=fb&shading=hill&n=z&key=AkF0mEyG789RQA6CcLimWZMzrDNF6MNSwRJOmNWb9gK_JGiwOBeMoQUoY1MFqksg",
            "fbUnlabeledUriFormat": "{urischeme}ak.t{subdomain}.tiles.virtualearth.net/tiles/r{quadkey}?g={generation}&mkt={culture}&lbl=l0&stl=fb&shading=hill&n=z&key=AkF0mEyG789RQA6CcLimWZMzrDNF6MNSwRJOmNWb9gK_JGiwOBeMoQUoY1MFqksg",
            "bingMapsRESTServicesUrl": "{urischeme}dev.virtualearth.net/REST/v1/Locations",
            "imageryMetadataUrl": "{urischeme}dev.virtualearth.net/REST/V1/Imagery/Metadata/{imagerySet}?key={credentials}&centerPoint=47.6,-122.2&zoomLevel=1&include=ImageryProviders&culture={culture}",
            "elevationServiceUrl": "{urischeme}dev.virtualearth.net/REST/v1/Elevation/BoundingRect/{south},{west},{north},{east}/{rows}/{cols}?key={credentials}",
            "nativeBirdseyeMetadataUrl": "{urischeme}dev.virtualearth.net/REST/V1/Imagery/Metadata/Birdseye/{centerpoint}?key={credentials}&zl={zoom}&dir={heading}&dl=2",
            "venueMapsMetadataJsonpUrl": "default={urischeme}dev.virtualearth.net/REST/v1/JsonFilter/VenueMaps/data/{0}?culture={culture}&key={credentials};prod={urischeme}dev.virtualearth.net/REST/v1/JsonFilter/VenueMaps/data/{0}?culture={culture}&key={credentials};dev={urischeme}dev.virtualearth.net/REST/v1/JsonFilter/VenueMapsDev/{0}?culture={culture}&key={credentials};staging={urischeme}dev.virtualearth.net/REST/v1/JsonFilter/VenueMapsStaging/data/{0}?culture={culture}&key={credentials};",
            "venueMapsTileUrl": "default={urischeme}venuemaps.virtualearth.net/{0}/{1}/{{quadkey}}.png;prod={urischeme}venuemaps.virtualearth.net/{0}/{1}/{{quadkey}}.png;dev={urischeme}bingmapsdevelopment.blob.core.windows.net/{0}/{1}/{{quadkey}}.png;staging={urischeme}stagingembedmap.blob.core.windows.net/{0}/{1}/{{quadkey}}.png",
            "venueMapsNearbyUrl": "{urischeme}dev.virtualearth.net/REST/v1/VenueMaps/PointRadius/{location}/{radius}?output=json&key={credentials}",
            "venueMapsEroServiceUrl": "http://api.bing.net/json.aspx?AppId={appid}&Query={query}&Sources=Phonebook&Version=2.0&Market=en-us&UILanguage=en&Latitude={latitude}&Longitude={longitude}&Radius=10.0&Options=EnableHighlighting&Phonebook.Count=1&Phonebook.Offset=0&Phonebook.FileType=YP&Phonebook.SortBy=Distance&Phonebook.LocId={ypid}",
            "hotRegionsRoadUrl": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}.json?mkt={culture}&it=G,VE,BX,L,LA&shading=hill&og={odmgeneration}",
            "hotRegionsAerialWithLabelsUrl": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}.json?mkt={culture}&it=A,G,L&shading=hill&og={odmgeneration}",
            "onDemandRoadUriFormat": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt={culture}&it=G,VE,BX,L,LA&shading=hill&og={odmgeneration}&n=z",
            "onDemandAerialWithLabelsUriFormat": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt={culture}&it=A,G,L&shading=hill&og={odmgeneration}&n=z",
            "microPOIHotRegionsUrl": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/mpoi/MicroPoi/{quadkey}.json?q={query}&filter={filter}",
            "microPOITilesUrl": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/mpoi/MicroPoi/{quadkey}?q={query}&filter={filter}",
            "trafficUriFormat": "{urischeme}t{subdomain}.tiles.virtualearth.net/tiles/dp/content?p=tf&a={quadkey}&n=z",
            "imageryCopyrightUrl": "{urischeme}dev.virtualearth.net/REST/V1/Imagery/Copyright/{culture}/{imagerySet}/{zoom}/{minLat}/{minLon}/{maxLat}/{maxLon}?output=json&dir={heading}&key={credentials}",
            "directionsService": "{urischeme}dev.virtualearth.net/mapcontrol/directions.ashx?",
            "directionsMaxWaypoints": "25",
            "defaultAerialTiltOn": true,
            "notileImageUrl": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/i/notile.png",
            "pushpinImageUrl": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/i/poi_search.png",
            "microPOIImageUrl": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/i/MicroPOI/",
            "venueMapsNumberOfMapTileServers": 4,
            "venueMapsTileServerSubdomainsX": "0,2,4,6",
            "venueMapsTileServerSubdomainsY": "1,3,5,7",
            "logoBingMapsLink": "http://www.bing.com/maps/?v=2&cp={0}~{1}&lvl={2}&FORM=BMLOGO",
            "logoBingSearchUrl": "http://www.bing.com/search?q={0}&FORM=BMSDK1",
            "searchService": "{urischeme}dev.virtualearth.net/services/v1/SearchService/SearchService.asmx/Search2",
            "geocodingService": "{urischeme}dev.virtualearth.net/services/v1/geocodeservice/geocodeservice.asmx",
            "cursorPath": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/cursors/",
            "message": "",
            "biciLoggingService": "{urischeme}dev.virtualearth.net/mapcontrol/logging.ashx",
            "biciPID": "5902",
            "bingThemeIconUrlFormat": "http://ecn.dev.virtualearth.net/mapcontrol/v7.0/i/BingTheme/pins/pin_{iconStyle}{imageryStyle}{state}.png",
            "updateAvailable": "false",
            "versionNotSupported": "false",
            "trafficIncidentsJs": "{urischeme}ecn.dev.virtualearth.net/REST/v1/Traffic/Incidents/{bounds}/?severity={sev}&key={credentials}",
            "trafficMinZoom": 5,
            "trafficMinIncidentsZoom": 8,
            "trafficRefresh": 1.8E+5,
            "trafficExpiry": 1.8E+5,
            "localDetailsUrl": "http://www.bing.com/local/details.aspx?lid={0}&q={1}&mkt={culture}&FORM={2}",
            "restAdvancedSearchService": "{urischeme}dev.virtualearth.net/mapcontrol/search.ashx",
            "wikiDataUrl": "http://upload.maps.bing.com/WikipediaContentProviderService/WikipediaInfo.ashx?eid={0}",
            "weatherLightUriFormat": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt={culture}&it=GB&cstl=WL&og={odmgeneration}&n=z",
            "weatherDarkUriFormat": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt={culture}&it=GB&cstl=WD&og={odmgeneration}&n=z",
            "weatherLightLabelUriFormat": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt={culture}&it=Z,GF,L&cstl=WL&og={odmgeneration}&n=z",
            "weatherDarkLabelUriFormat": "{urischeme}ak.dynamic.t{subdomain}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt={culture}&it=Z,GF,L&cstl=WD&og={odmgeneration}&n=z",
            "localScoutSupported": false,
            "localScoutServiceUrlFormat": "nearby.ashx?action={action}&location={latitude},{longitude}&filters={filters}&sortby={sortby}",
            "displayMapAppsPanel": true,
            "venueMapAction1Context": "Mall",
            "venueMapAction2Context": "Airport",
            "mapAppApp1ActionContext": "10330",
            "mapAppApp2ActionContext": "10310",
            "privacyStatementLink": "http://www.microsoft.com/privacystatement/{culture}/bing/default.aspx",
            "isLocalEntityReportAProblemSupported": true,
            "distanceUnitMiles": true,
            "radixPointDecimal": true,
            "searchBoxContainerID": "sb_form",
            "searchBoxID": "sb_form_q",
            "searchBoxSubmitButtonID": "sb_form_go",
            "autoSuggestContainerID": "sw_as",
            "autoSuggestMaxResults": "5",
            "autoSuggestServiceUrlFormat": "http://platform.bing.com/geo/autosuggest/v1?umv={user_map_view}&ul={user_location}&q={query}&reqid={jsonso}&mr={max_results}&cb={callback}"
        };
    
    })();
    

    Wednesday, May 13, 2015 2:52 AM
  • Bing Map is working again.

    I think the best solution will be when loadModule will be extended with some kind of error handling and no exception will be thrown when the service is unavailable.

    Microsoft.Maps.loadModule('Microsoft.Maps.Map', { callback: function() {}, errorCallback: function(error) {} );


    Wednesday, May 13, 2015 6:13 AM
  • I can confirm that this issue if fixed by MSFT side.

    If some users still encounter it, please respond.

    Thanks!


    MSFT
    Hemant Goyal

    Wednesday, May 13, 2015 8:37 PM
  • This isn't an issue you should write code to try and prepare for/workaround. This is a very uncommon occurrence and the first time I've seen this with the Win8.1 JavaScript control.

    http://rbrundritt.wordpress.com

    Thursday, May 14, 2015 4:18 PM