none
Bing Maps v8 API - loadModule RRS feed

  • Question

  • Hi,

    I am starting to try out the v8 API and am having a problem with loadModule.

    The v7 code

      Microsoft.Maps.loadModule('Microsoft.Maps.Themes.BingTheme', {callback: createBingMap});

    has been replaced by v8 code

     Microsoft.Maps.loadModule('Microsoft.Maps.Themes.BingTheme', createBingMap);

    It appears that createBingMap is simply not being called, although no errors are logged to the console.

    What am I doing wrong?

    JPL

    Friday, April 8, 2016 3:09 PM

Answers

  • The Bing Theme module has been deprecated. Personally that was one of the biggest headaches in the V7 control as it disabled all customizations. The main purpose of the Bing Theme module was to align the UI of the developer API with that of the Bing Maps website (bing.com/maps) as that is the first experience many have with Bing Maps. With V8 the UI of the developer API aligns with the new Bing Maps website by default. This is documented here: https://msdn.microsoft.com/en-us/library/mt712870.aspx


    http://rbrundritt.wordpress.com


    Friday, April 8, 2016 4:03 PM
  • No, that was an enumerator that was only used in the Bing Theme module, mainly by the map control itself and isn't most if not all developers used. The infobox class is still there. The default experience is the same as V7 to maintain backwards compatibility. However we are looking to add some features around this to make it easier to customize.

    http://rbrundritt.wordpress.com

    • Proposed as answer by Ricky_Brundritt Friday, April 8, 2016 7:18 PM
    • Marked as answer by JPL5780 Friday, April 8, 2016 10:30 PM
    Friday, April 8, 2016 7:18 PM
  • We may reintroduce the Microsoft.Maps.LabelOverlay a bit late. Not sure as we are looking at support more functionality around how the labels appear than just turning labels on/off. There are two new map options available currently that can be used to turn labels on/off:

    • allowHidingLabelsOfRoad - Allows users to turn off the labels using the label button in the map type dropdown.
    • showMapLabel - Turns off the labels on the map for the current map type.

    Here is how you can turn off the labels:

    map.setOptions({showMapLabels: false});

    http://rbrundritt.wordpress.com

    • Marked as answer by JPL5780 Friday, April 8, 2016 10:30 PM
    • Edited by Ricky_Brundritt Monday, April 11, 2016 7:30 PM Logged as Bug 283857
    Friday, April 8, 2016 7:26 PM

All replies

  • The Bing Theme module has been deprecated. Personally that was one of the biggest headaches in the V7 control as it disabled all customizations. The main purpose of the Bing Theme module was to align the UI of the developer API with that of the Bing Maps website (bing.com/maps) as that is the first experience many have with Bing Maps. With V8 the UI of the developer API aligns with the new Bing Maps website by default. This is documented here: https://msdn.microsoft.com/en-us/library/mt712870.aspx


    http://rbrundritt.wordpress.com


    Friday, April 8, 2016 4:03 PM
  • Ah! That was not quite the problem.

    I replaced 'Microsoft.Maps.Themes.BingTheme' with 'Microsoft.Maps.Directions', which moved things along further, but then found that Microsoft.Maps.LabelOverlay is no longer defined.  More reading required...

    JPL

    Friday, April 8, 2016 4:07 PM
  • Ricky,

    Thanks for your help.  I did look at that page but missed that item.  More care required...

    It also says that InfoboxType is deprecated.  Does this apply to Infobox itself also?

    JPL

    Friday, April 8, 2016 4:40 PM
  • No, that was an enumerator that was only used in the Bing Theme module, mainly by the map control itself and isn't most if not all developers used. The infobox class is still there. The default experience is the same as V7 to maintain backwards compatibility. However we are looking to add some features around this to make it easier to customize.

    http://rbrundritt.wordpress.com

    • Proposed as answer by Ricky_Brundritt Friday, April 8, 2016 7:18 PM
    • Marked as answer by JPL5780 Friday, April 8, 2016 10:30 PM
    Friday, April 8, 2016 7:18 PM
  • We may reintroduce the Microsoft.Maps.LabelOverlay a bit late. Not sure as we are looking at support more functionality around how the labels appear than just turning labels on/off. There are two new map options available currently that can be used to turn labels on/off:

    • allowHidingLabelsOfRoad - Allows users to turn off the labels using the label button in the map type dropdown.
    • showMapLabel - Turns off the labels on the map for the current map type.

    Here is how you can turn off the labels:

    map.setOptions({showMapLabels: false});

    http://rbrundritt.wordpress.com

    • Marked as answer by JPL5780 Friday, April 8, 2016 10:30 PM
    • Edited by Ricky_Brundritt Monday, April 11, 2016 7:30 PM Logged as Bug 283857
    Friday, April 8, 2016 7:26 PM
  • Thanks again.  I am impressed by the reasoning behind the changes.  As always, much to learn in the initial stages of the move to the new version...

    JPL

    Friday, April 8, 2016 10:30 PM