fix issue 242
git-svn-id: https://osmand.googlecode.com/svn/trunk@768 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
parent
47b00bd0b8
commit
225fe88e25
1 changed files with 25 additions and 0 deletions
|
@ -193,6 +193,8 @@ public class TileSourceManager {
|
|||
list.add(getGoogleMapsSatelliteSource());
|
||||
list.add(getGoogleMapsTerrainSource());
|
||||
|
||||
list.add(getCykloatlasCzSource());
|
||||
|
||||
list.add(getMicrosoftMapsSource());
|
||||
list.add(getMicrosoftEarthSource());
|
||||
list.add(getMicrosoftHybridSource());
|
||||
|
@ -203,6 +205,25 @@ public class TileSourceManager {
|
|||
}
|
||||
|
||||
|
||||
public static class CykloatlasSourceTemplate extends TileSourceTemplate {
|
||||
|
||||
public CykloatlasSourceTemplate(String name, String urlToLoad){
|
||||
super(name, urlToLoad, ".png", 15, 7, 256, 8, 26000); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUrlToLoad(int x, int y, int zoom) {
|
||||
String z = Integer.toString(zoom);
|
||||
// use int to string not format numbers! (non-nls)
|
||||
if(urlToLoad == null){
|
||||
return null;
|
||||
}
|
||||
if (zoom >= 13)
|
||||
z += "c";
|
||||
return MessageFormat.format(urlToLoad, z, x+"", y+""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static TileSourceTemplate getMapnikSource(){
|
||||
|
@ -218,6 +239,10 @@ public class TileSourceManager {
|
|||
return new TileSourceTemplate("CycleMap", "http://b.tile.opencyclemap.org/cycle/{0}/{1}/{2}.png", ".png", 17, 0, 256, 32, 18000); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
|
||||
}
|
||||
|
||||
public static TileSourceTemplate getCykloatlasCzSource(){
|
||||
return new CykloatlasSourceTemplate("Cykloatlas CZ", "http://services.tmapserver.cz/tiles/gm/shc/{0}/{1}/{2}.png"); //$NON-NLS-1$//$NON-NLS-2$
|
||||
}
|
||||
|
||||
public static TileSourceTemplate getAerialMapSource(){
|
||||
return new TileSourceTemplate("OpenAerialMap", "http://tile.openaerialmap.org/tiles/1.0.0/openaerialmap-900913/{0}/{1}/{2}.jpg", ".jpg", 13, 0, 256, 8, 18000); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue