- started to move Matrices to MapViewPosition as these can be shared with

MapRenderer(TileLoader) and GLRenderer.
- using inverse projection to determine visible tiles and mapping screen-coordinates to model
- making MapPosition not final, reuse instance to get Position in Map-/GLRender

added: ScanBox scanline fill used for calculating visible tiles

rename:
- ShortPool -> VertexPool
- tile.isActive -> isLocked
This commit is contained in:
Hannes Janetzek
2012-09-26 17:02:03 +02:00
parent 8ec405cf5c
commit c5e3be9d2b
26 changed files with 1281 additions and 865 deletions

View File

@@ -23,7 +23,6 @@ import java.util.Map;
import javax.xml.parsers.ParserConfigurationException;
import org.oscim.core.GeoPoint;
import org.oscim.core.MapPosition;
import org.oscim.core.Tile;
import org.oscim.database.IMapDatabase;
import org.oscim.database.MapDatabaseFactory;
@@ -56,9 +55,9 @@ public class MapView extends FrameLayout {
final static String TAG = "MapView";
public final static boolean debugFrameTime = false;
public final static boolean testRegionZoom = false;
private final boolean mDebugDatabase = false;
public static final boolean debugFrameTime = false;
public static final boolean testRegionZoom = false;
private static final boolean debugDatabase = false;
RegionLookup mRegionLookup;
@@ -146,7 +145,7 @@ public class MapView extends FrameLayout {
for (int i = 0; i < mNumMapWorkers; i++) {
IMapDatabase mapDatabase;
if (mDebugDatabase) {
if (debugDatabase) {
// mapDatabase = MapDatabaseFactory
// .createMapDatabase(MapDatabases.TEST_READER);
mapDatabase = MapDatabaseFactory
@@ -188,7 +187,7 @@ public class MapView extends FrameLayout {
mMapZoomControls = new MapZoomControls(mapActivity, this);
mMapZoomControls.setShowMapZoomControls(true);
// enableRotation = true;
enableRotation = true;
for (MapWorker worker : mMapWorkers)
worker.start();
@@ -353,7 +352,7 @@ public class MapView extends FrameLayout {
*/
public void setMapDatabase(MapDatabases mapDatabaseType) {
if (mDebugDatabase)
if (debugDatabase)
return;
TileGenerator tileGenerator;
@@ -470,6 +469,9 @@ public class MapView extends FrameLayout {
Log.d(TAG, "onSizeChanged" + width + " " + height);
super.onSizeChanged(width, height, oldWidth, oldHeight);
if (width != 0 && height != 0)
mMapViewPosition.setViewport(width, height);
mapWorkersProceed();
}