Rotate Bird's eye view

Last post 8/20/2008 12:27:52 AM by Chris Pietschmann. 3 replies. << Back to Web.Maps.VE v2.0 General
8/12/2008 3:56:49 AM
harrattb

Rotate Bird's eye view

Can somebody let me know what the server side command is to rotate the view when in birdseye view?

It's VEMap.SetBirdseyeOrientation in the VE SDK.

I bought this control thinking it'd replicate all the javascript commands in the MS SDK, have I made a mistake or is there always a way to access the underlying methods?

Ben

8/14/2008 3:13:36 AM
Chris Pietschmann

Re:Rotate Bird's eye view

The current release of Web.Maps.VE (v2.00.01) doesn't have server-side support for the SetBirdseyeOrientation method, but you can access it using JavaScript.

Below is an example of getting a reference to the Map object using JavaScript:

var map = $find("<%=Map1.ClientID%>");

The reference access above has wrappers for all the VEMap object's methods. If for some reason one isn't supported, or errors, you can use the following method to get a direct reference to the VEMap object itself:

var virtualEarthMapObject = map.get_Map();

Let me know if you have any further questions.

8/16/2008 12:43:34 AM
harrattb

Re:Rotate Bird's eye view

Thanks for the quick reply, I tried adding the following in to my page_load event:

Map1.OnClientMapLoaded = "var map = this; map.get_Map().SetBirdseyeOrientation('North');"

I've tried it with and without the get_Map() but it still errors.

I'm getting:   Value cannot be undefined.  Parameter name: method.

The VEMap.SetBirdseyeOrientation method supports string (ie north, south, etc).

Am I missing something?, I've tried using the $find method to set the instance of the map control as well as using "this", but it throws the same error.

Thanks in advance.

Ben

8/20/2008 12:27:52 AM
Chris Pietschmann

Re:Rotate Bird's eye view

You'll want to use the VEOrientation enumeration in your JavaScript code.

You'll want to change your code to the following:

Map1.OnClientMapLoaded = "var map = this; map.get_Map().SetBirdseyeOrientation(VEOrientation.North);"