Hannes Janetzek 1a27f56313 - making oscimap default backend
- added about-screen
- added TreeTile for Tile lookup, dropping that HashMap
- using simple line-shader instead of std-derivatives one,
  about twice as faster here
- use distance calculation from MapRenderer - removing TileScheduler
- no need for MapGeneratorJob, pass MapTile directly to MapWorkers
- added two-finger tap gestures for zoom-in/out
- added tub/tron rendertheme
- started caching for oscimap
- add x/y coordinates to MapPosition, using it in MapRenderer
- create tag hash when needed
- no need for long tile coordinates max zoomlevel 31 should suffice
2013-10-09 01:17:34 +02:00

70 lines
1.8 KiB
Java

/*
* Copyright 2012 Hannes Janetzek
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.mapgenerator;
import org.mapsforge.core.Tile;
/**
*
*/
public class MapTile extends Tile implements Comparable<MapTile> {
/**
* tile is loaded and ready for drawing. (set and used by render thread after uploading data to gl).
*/
public boolean isReady;
/**
* tile is removed from JobQueue and loading in DatabaseRenderer. set by MapWorker.
*/
public boolean isLoading;
/**
* tile is in view region. (set and used by render thread)
*/
public boolean isVisible;
/**
* tile is used by render thread. set by updateVisibleList (main thread).
*/
public boolean isActive;
/**
* distance from center, used in TileScheduler set by updateVisibleList.
*/
public float distance;
/**
* @param tileX
* ...
* @param tileY
* ...
* @param zoomLevel
* ..
*/
public MapTile(int tileX, int tileY, byte zoomLevel) {
super(tileX, tileY, zoomLevel);
}
@Override
public int compareTo(MapTile o) {
if (this.distance < o.distance) {
return -1;
} else if (this.distance > o.distance) {
return 1;
}
return 0;
}
}