-use absolute x/y position and scale in MapPosition

- scale calculations look much nicer now, better always
   use 'double' unless you are sure about precision required
- finally got rid of zoomLevel relative coordinates
- cleanup MapPosition and MercatorProjection API functions
This commit is contained in:
Hannes Janetzek
2013-04-07 15:58:45 +02:00
parent a6a729244f
commit 8e01dce85e
29 changed files with 658 additions and 710 deletions

View File

@@ -24,6 +24,9 @@ import org.oscim.renderer.layer.TextItem;
*/
public final class MapTile extends JobTile {
public double x;
public double y;
/**
* Tile data set by TileGenerator.
*/
@@ -73,6 +76,8 @@ public final class MapTile extends JobTile {
MapTile(int tileX, int tileY, byte zoomLevel) {
super(tileX, tileY, zoomLevel);
this.x = (double)tileX / (1 << zoomLevel);
this.y = (double)tileY / (1 << zoomLevel);
}
/**