Merge pull request #1067 from ilasica/sqliteYandex

Add support for ellipsoid in sqlitedb
This commit is contained in:
vshcherb 2015-02-08 22:00:09 +01:00
commit 5cfdc62b76

View file

@ -40,6 +40,7 @@ public class SQLiteTileSource implements ITileSource {
private boolean inversiveZoom = true; // BigPlanet private boolean inversiveZoom = true; // BigPlanet
private boolean timeSupported = false; private boolean timeSupported = false;
private int expirationTimeMillis = -1; // never private int expirationTimeMillis = -1; // never
private boolean isEllipsoid = false;
static final int tileSize = 256; static final int tileSize = 256;
private OsmandApplication ctx; private OsmandApplication ctx;
@ -187,6 +188,13 @@ public class SQLiteTileSource implements ITileSource {
} else { } else {
addInfoColumn("expireminutes", "0"); addInfoColumn("expireminutes", "0");
} }
int ellipsoid = list.indexOf("ellipsoid");
if(ellipsoid != -1) {
int set = (int) cursor.getInt(ellipsoid);
if(set == 1){
this.isEllipsoid = true;
}
}
//boolean inversiveInfoZoom = tnumbering != -1 && "BigPlanet".equals(cursor.getString(tnumbering)); //boolean inversiveInfoZoom = tnumbering != -1 && "BigPlanet".equals(cursor.getString(tnumbering));
boolean inversiveInfoZoom = inversiveZoom; boolean inversiveInfoZoom = inversiveZoom;
int mnz = list.indexOf("minzoom"); int mnz = list.indexOf("minzoom");
@ -422,7 +430,8 @@ public class SQLiteTileSource implements ITileSource {
@Override @Override
public boolean isEllipticYTile() { public boolean isEllipticYTile() {
return false; return this.isEllipsoid;
//return false;
} }
public int getExpirationTimeMinutes() { public int getExpirationTimeMinutes() {