samccone
samccone

Reputation: 10926

Embed Bing map rotate programmatically

Does anyone know how to rotate a embedded bing map in bird eye view with JS?

I tried to click the .NavBar_rotateRight element in JS with a .click() but it does not respond

this is the API

http://www.bingmapsportal.com/ISDK/AjaxV7#CreateMapWithViewOptions7

ideas?

Upvotes: 3

Views: 957

Answers (1)

Alex
Alex

Reputation: 34978

To rotate the map to the east, you can set the heading property to 90 degree like this:

var options = map.getOptions();
options.heading = 90;
map.setView(options);

You can only use the values 0, 90, 180 and 270 for heading.

Source: http://msdn.microsoft.com/en-us/library/gg427628.aspx.

Upvotes: 4

Related Questions