idea: map rotation and control.compass

2,770 views
Skip to first unread message

Kolam Training Center Admin

unread,
Aug 4, 2012, 7:09:51 AM8/4/12
to leafl...@googlegroups.com
Hi,
i was always looking for this feature in OL, without success, today, i'm asking myself if i can make it,
So i would like to start something about it, but where i should look first, if you have any sources or something as a starting point, i would go for it !

As i know, i need to look at map rotation (degree), the next step is to always identify the pivot point (can be the center of the map area), and then to build a new control with angle slider (or a compass with image rotate).

Right, this is not enough to dive in, the water is still too dark :D

Vladimir Agafonkin

unread,
Aug 6, 2012, 1:50:52 PM8/6/12
to leafl...@googlegroups.com
Kolam,

Implementing this is much harder than it looks and is not worth the effort in my opinion. I made some comments about this here: https://github.com/CloudMade/Leaflet/issues/268 

You can take a look at http://polymaps.org/ as an example of JS maps library with map rotation implemented.

2012/8/4 Kolam Training Center Admin <kola...@gmail.com>

--
 
 
 



--
Vladimir Agafonkin
http://agafonkin.com/en
+380 (93) 745 44 61

Kolam Training Center Admin

unread,
Aug 7, 2012, 12:16:29 PM8/7/12
to leafl...@googlegroups.com
Ok, i see the point, and what's about rotating image layer ? it's sometimes usefull to rotate an image overlay , simple as defining the center point !?

Raimund Merkert

unread,
Apr 23, 2013, 12:33:13 PM4/23/13
to leafl...@googlegroups.com
I know this is an old thread, but I really need rotation and I don't want to use Polymaps, because that project seems dead.

I've looked at the issue you cited, but I don't understand..
As far as I'm concerned a rotation of the map is no different from a change of the map's projection? You already need to
update the mouse events and project/unproject coordinates as necessary. The only thing that's really needed is a way to cleanly
update the map's CRS and repaint all layers.

I know that this simple approach doesn't work for tiles, but that's OK, because tiles are bound to a specific projection and I have no
problem with not being able to acquire tiles if the projection isn't right (no different from using a map projection that a WMS server doesn't support).

Paulo Vieira

unread,
Apr 23, 2013, 1:08:24 PM4/23/13
to leafl...@googlegroups.com
On Tue, Apr 23, 2013 at 5:33 PM, Raimund Merkert <merk...@gmail.com> wrote:
I know this is an old thread, but I really need rotation and I don't want to use Polymaps, because that project seems dead.

Take a look at Open Layers 3:
http://ol3js.org/en/r3.0.0-alpha.1/examples/rotation.html

Finally, some competition! :-)

Stefano Cudini

unread,
Jul 12, 2014, 8:03:19 PM7/12/14
to leafl...@googlegroups.com

this could be useful for good alternative solution!

Reply all
Reply to author
Forward
0 new messages