none
Bing Maps Migration v7 to v8 - loadModule Bing theme issue RRS feed

  • Question

  • We are migrating to V7 from V8. I see that Bing theme is deprecated. The external js file does not contain theme module. So in here a call back to the JSON is failing. What alternative can I used instead of bing theme to make the call and get the json data?

    Can someone please help??  

    this.loadTheme = function loadTheme(){
                thisOneMap.setIndexOfFunction();
                thisOneMap.setParams();
                jQuery('#searchTxt').val("").blur();
                Microsoft.Maps.loadModule('Microsoft.Maps.Themes.BingTheme', { callback: thisOneMap.restService.initialJsonCall});



    • Edited by DR_123 Sunday, April 2, 2017 6:46 PM
    Sunday, April 2, 2017 6:43 PM

Answers

  • Correct, the Bing theme module is deprecated. If you simply skip loading the module and call the callback function your code should start working again. Here is a modified version of your code:

    this.loadTheme = function loadTheme(){
                thisOneMap.setIndexOfFunction();
                thisOneMap.setParams();
                jQuery('#searchTxt').val("").blur();
                thisOneMap.restService.initialJsonCall();
    });


    [Blog] [twitter] [LinkedIn]

    Monday, April 3, 2017 2:37 AM