View Full Version : Rotate Ext.Map based on users heading

23 Jun 2011, 12:51 AM
Hi All,

We are building an app which acts like navigation app. For the map we use google maps though Ext.Map.

Now the GPS tracking is all fine but the map which is shown allways shows NORTH at the top. We would like to rotate the map so that the users heading is at the top of the screen (instead of north). Does anybody know how to do that?

I know we can get the heading from the location, but how to rotate the map?

Best regards,


16 Jul 2011, 11:22 AM
I'm also trying to achieve this. I know theorically should work by doing:

object.style.webkitTransform ='rotate(45deg)';

What I can't tell yet is how to do apply it to the entire Ext.Map object.

Anyone any idea?


Edit: just figured it out:

function rotate(map, heading){
map.el.dom.style.webkitTransform ='rotate(' + heading + 'deg)';