moagrius / TileView

TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.
MIT License
1.46k stars 337 forks source link

Feature/rotatable map #489

Closed dilarakkl closed 5 years ago

dilarakkl commented 6 years ago

This branch will enable rotations. Calculates scroll limits and tiles according to rotation. The sample code is on the RealMapTileViewActivity.java in the demo repo. That code will rotate the map with 30 degrees every time a marker is tapped.

Basically all you have to do is setting the map rotatable first and then giving the rotation degrees.

  tileView.setRotational(true);

  tileView.rotate(45); 
moagrius commented 6 years ago

Wow - very cool - sorry for the delay in responding - I'll try to check this out this weekend - thanks for the contribution

moagrius commented 5 years ago

so this is very cool, but considering that it's on version 2, which is no longer supported, i'm not sure what to do with it - probably leave it as a fork? as far as migrating to version 3, that would be cool but i'd definitely want it as a plugin rather than modifications to the core - do you believe that's possible?

dilarakkl commented 5 years ago

@moagrius Hi. Yeah leaving as a fork seems to be more suitable. If people still use the version 2 they can get it from the fork. As for the version 3, I haven't looked at it yet so I dont know. Still would like to do it sometime when I have spare time. Just started my PhD so it probably will not be soon. No promises. If anyone is willing that would be great.

moagrius commented 5 years ago

Sounds reasonable, thanks!

srbhagwatsrb commented 4 years ago

@moagrius Does version 3 include this feature?

moagrius commented 4 years ago

@srbhagwatsrb no. as i've mentioned, i have no intention of adding rotation. if someone else creates a PR that somehow manages to add rotation without breaking any public APIs, i'd include it, but i find that unlikely.