add available zoomlevel to MapInfo
This commit is contained in:
parent
6ee2a85e12
commit
363cf8b029
@ -79,6 +79,11 @@ public class MapInfo {
|
|||||||
*/
|
*/
|
||||||
public final Byte startZoomLevel;
|
public final Byte startZoomLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zoomlevels provided by this Database, if null then any zoomlevel can be queried.
|
||||||
|
*/
|
||||||
|
public final int[] zoomLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param bbox
|
* @param bbox
|
||||||
* ...
|
* ...
|
||||||
@ -100,11 +105,15 @@ public class MapInfo {
|
|||||||
* ...
|
* ...
|
||||||
* @param createdBy
|
* @param createdBy
|
||||||
* ...
|
* ...
|
||||||
|
* @param zoomLevel
|
||||||
|
* TODO
|
||||||
*/
|
*/
|
||||||
public MapInfo(BoundingBox bbox, Byte zoom, GeoPoint start, String projection,
|
public MapInfo(BoundingBox bbox, Byte zoom, GeoPoint start, String projection,
|
||||||
long date, long size, int version, String language, String comment, String createdBy) {
|
long date, long size, int version, String language, String comment,
|
||||||
|
String createdBy, int[] zoomLevel) {
|
||||||
|
|
||||||
this.startZoomLevel = zoom;
|
this.startZoomLevel = zoom;
|
||||||
|
this.zoomLevel = zoomLevel;
|
||||||
this.startPosition = start;
|
this.startPosition = start;
|
||||||
this.projectionName = projection;
|
this.projectionName = projection;
|
||||||
this.mapDate = date;
|
this.mapDate = date;
|
||||||
@ -116,5 +125,6 @@ public class MapInfo {
|
|||||||
|
|
||||||
this.comment = comment;
|
this.comment = comment;
|
||||||
this.createdBy = createdBy;
|
this.createdBy = createdBy;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,7 +59,7 @@ public class MapFileInfo extends org.oscim.database.MapInfo {
|
|||||||
mapFileInfoBuilder.fileVersion,
|
mapFileInfoBuilder.fileVersion,
|
||||||
mapFileInfoBuilder.optionalFields.languagePreference,
|
mapFileInfoBuilder.optionalFields.languagePreference,
|
||||||
mapFileInfoBuilder.optionalFields.comment,
|
mapFileInfoBuilder.optionalFields.comment,
|
||||||
mapFileInfoBuilder.optionalFields.createdBy);
|
mapFileInfoBuilder.optionalFields.createdBy, null);
|
||||||
|
|
||||||
debugFile = mapFileInfoBuilder.optionalFields.isDebugFile;
|
debugFile = mapFileInfoBuilder.optionalFields.isDebugFile;
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,7 @@ public class MapDatabase implements IMapDatabase {
|
|||||||
private static final MapInfo mMapInfo =
|
private static final MapInfo mMapInfo =
|
||||||
new MapInfo(new BoundingBox(-180, -90, 180, 90),
|
new MapInfo(new BoundingBox(-180, -90, 180, 90),
|
||||||
new Byte((byte) 4), new GeoPoint(53.11, 8.85),
|
new Byte((byte) 4), new GeoPoint(53.11, 8.85),
|
||||||
null, 0, 0, 0, "de", "comment", "author");
|
null, 0, 0, 0, "de", "comment", "author", null);
|
||||||
|
|
||||||
private boolean mOpenFile = false;
|
private boolean mOpenFile = false;
|
||||||
|
|
||||||
|
|||||||
@ -78,7 +78,7 @@ public class MapDatabase implements IMapDatabase {
|
|||||||
private static final MapInfo mMapInfo =
|
private static final MapInfo mMapInfo =
|
||||||
new MapInfo(new BoundingBox(-180, -90, 180, 90),
|
new MapInfo(new BoundingBox(-180, -90, 180, 90),
|
||||||
new Byte((byte) 4), new GeoPoint(53.11, 8.85),
|
new Byte((byte) 4), new GeoPoint(53.11, 8.85),
|
||||||
null, 0, 0, 0, "de", "comment", "author");
|
null, 0, 0, 0, "de", "comment", "author", null);
|
||||||
|
|
||||||
private boolean mOpenFile = false;
|
private boolean mOpenFile = false;
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,7 @@ public class MapDatabase implements IMapDatabase {
|
|||||||
new MapInfo(new BoundingBox(-180, -85, 180, 85),
|
new MapInfo(new BoundingBox(-180, -85, 180, 85),
|
||||||
new Byte((byte) 14), new GeoPoint(53.11, 8.85),
|
new Byte((byte) 14), new GeoPoint(53.11, 8.85),
|
||||||
WebMercator.NAME,
|
WebMercator.NAME,
|
||||||
0, 0, 0, "de", "comment", "author");
|
0, 0, 0, "de", "comment", "author", null);
|
||||||
|
|
||||||
private boolean mOpenFile = false;
|
private boolean mOpenFile = false;
|
||||||
|
|
||||||
|
|||||||
@ -35,13 +35,15 @@ public class MapDatabase implements IMapDatabase {
|
|||||||
private final static String PROJECTION = "Mercator";
|
private final static String PROJECTION = "Mercator";
|
||||||
private float[] mCoords = new float[20];
|
private float[] mCoords = new float[20];
|
||||||
private short[] mIndex = new short[4];
|
private short[] mIndex = new short[4];
|
||||||
// private Tag[] mTags = { new Tag("boundary", "administrative"), new Tag("admin_level", "2") };
|
// private Tag[] mTags = { new Tag("boundary", "administrative"), new
|
||||||
|
// Tag("admin_level", "2") };
|
||||||
private Tag[] mTags = { new Tag("natural", "water") };
|
private Tag[] mTags = { new Tag("natural", "water") };
|
||||||
private Tag[] mNameTags;
|
private Tag[] mNameTags;
|
||||||
|
|
||||||
private final MapInfo mMapInfo =
|
private final MapInfo mMapInfo =
|
||||||
new MapInfo(new BoundingBox(-180, -90, 180, 90),
|
new MapInfo(new BoundingBox(-180, -90, 180, 90),
|
||||||
new Byte((byte) 0), null, PROJECTION, 0, 0, 0, "de", "yo!", "by me");
|
new Byte((byte) 0), null, PROJECTION, 0, 0, 0, "de", "yo!", "by me",
|
||||||
|
null);
|
||||||
|
|
||||||
private boolean mOpenFile = false;
|
private boolean mOpenFile = false;
|
||||||
|
|
||||||
@ -50,8 +52,8 @@ public class MapDatabase implements IMapDatabase {
|
|||||||
|
|
||||||
float lat1 = -0.5f;
|
float lat1 = -0.5f;
|
||||||
float lon1 = -0.5f;
|
float lon1 = -0.5f;
|
||||||
float lat2 = Tile.TILE_SIZE - 0.5f;
|
float lat2 = Tile.TILE_SIZE + 0.5f;
|
||||||
float lon2 = Tile.TILE_SIZE - 0.5f;
|
float lon2 = Tile.TILE_SIZE + 0.5f;
|
||||||
|
|
||||||
mCoords[0] = lon1;
|
mCoords[0] = lon1;
|
||||||
mCoords[1] = lat1;
|
mCoords[1] = lat1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user