none
Bing Maps v8 Undocumented heading Behavior RRS feed

  • Question

  • I am trying to set an initial point of view on entering streetside and restore heading to 0 on leaving. 

    The documentation suggests simple getter and setters for heading.

    From the browser console, I am seeing this:     

    In streetside:

    sch_dir_bing_map.setView({heading:90})  //appears to change point of view.

    But:

    sch_dir_bing_map.getHeading();
    1.5707963267948966     //not the expected value (I've also seen negative values)

    After clicking the streetside exit button:   

    sch_dir_bing_map.getHeading();
    0

    Can you explain what heading numbers like this mean?




    Wednesday, July 26, 2017 12:50 AM

Answers

  • Looks like the getHeading function is returning a value in radians when in streetside mode. Multiplying the value by 180/Math.PI returns compass heading. I'll log this as a bug for the team to fix. 


    [Blog] [twitter] [LinkedIn]

    Wednesday, July 26, 2017 2:05 AM