VIRTUAL_HERO v2.1.0版本的 MD5 值为:3b332b47960b14f8b2d05ddc2f617624
以下内容为反编译后的 TileSourceFactory.java 源代码,内容仅作参考
package org.osmdroid.tileprovider.tilesource;
import java.util.ArrayList;
import java.util.List;
import org.osmdroid.util.MapTileIndex;
public class TileSourceFactory {
private static List<ITileSource> mTileSources;
public static final OnlineTileSourceBase MAPNIK = new XYTileSource("Mapnik", 0, 19, 256, ".png", new String[]{"https://a.tile.openstreetmap.org/", "https://b.tile.openstreetmap.org/", "https://c.tile.openstreetmap.org/"}, "© OpenStreetMap contributors", new TileSourcePolicy(2, 15));
public static final OnlineTileSourceBase WIKIMEDIA = new XYTileSource("Wikimedia", 1, 19, 256, ".png", new String[]{"https://maps.wikimedia.org/osm-intl/"}, "Wikimedia maps | Map data © OpenStreetMap contributors", new TileSourcePolicy(1, 15));
public static final OnlineTileSourceBase PUBLIC_TRANSPORT = new XYTileSource("OSMPublicTransport", 0, 17, 256, ".png", new String[]{"http://openptmap.org/tiles/"}, "© OpenStreetMap contributors");
public static final OnlineTileSourceBase DEFAULT_TILE_SOURCE = MAPNIK;
public static final OnlineTileSourceBase CLOUDMADESTANDARDTILES = new CloudmadeTileSource("CloudMadeStandardTiles", 0, 18, 256, ".png", new String[]{"http://a.tile.cloudmade.com/%s/%d/%d/%d/%d/%d%s?token=%s", "http://b.tile.cloudmade.com/%s/%d/%d/%d/%d/%d%s?token=%s", "http://c.tile.cloudmade.com/%s/%d/%d/%d/%d/%d%s?token=%s"});
public static final OnlineTileSourceBase CLOUDMADESMALLTILES = new CloudmadeTileSource("CloudMadeSmallTiles", 0, 21, 64, ".png", new String[]{"http://a.tile.cloudmade.com/%s/%d/%d/%d/%d/%d%s?token=%s", "http://b.tile.cloudmade.com/%s/%d/%d/%d/%d/%d%s?token=%s", "http://c.tile.cloudmade.com/%s/%d/%d/%d/%d/%d%s?token=%s"});
public static final OnlineTileSourceBase FIETS_OVERLAY_NL = new XYTileSource("Fiets", 3, 18, 256, ".png", new String[]{"https://overlay.openstreetmap.nl/openfietskaart-overlay/"}, "© OpenStreetMap contributors");
public static final OnlineTileSourceBase BASE_OVERLAY_NL = new XYTileSource("BaseNL", 0, 18, 256, ".png", new String[]{"https://overlay.openstreetmap.nl/basemap/"});
public static final OnlineTileSourceBase ROADS_OVERLAY_NL = new XYTileSource("RoadsNL", 0, 18, 256, ".png", new String[]{"https://overlay.openstreetmap.nl/roads/"}, "© OpenStreetMap contributors");
public static final OnlineTileSourceBase HIKEBIKEMAP = new XYTileSource("HikeBikeMap", 0, 18, 256, ".png", new String[]{"https://tiles.wmflabs.org/hikebike/"});
public static final OnlineTileSourceBase OPEN_SEAMAP = new XYTileSource("OpenSeaMap", 3, 18, 256, ".png", new String[]{"https://tiles.openseamap.org/seamark/"}, "OpenSeaMap");
public static final OnlineTileSourceBase USGS_TOPO = new OnlineTileSourceBase("USGS National Map Topo", 0, 15, 256, "", new String[]{"https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/"}, "USGS") {
@Override
public String getTileURLString(long j) {
return getBaseUrl() + MapTileIndex.getZoom(j) + "/" + MapTileIndex.getY(j) + "/" + MapTileIndex.getX(j);
}
};
public static final OnlineTileSourceBase USGS_SAT = new OnlineTileSourceBase("USGS National Map Sat", 0, 15, 256, "", new String[]{"https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryTopo/MapServer/tile/"}, "USGS") {
@Override
public String getTileURLString(long j) {
return getBaseUrl() + MapTileIndex.getZoom(j) + "/" + MapTileIndex.getY(j) + "/" + MapTileIndex.getX(j);
}
};
public static final OnlineTileSourceBase ChartbundleWAC = new XYTileSource("ChartbundleWAC", 4, 12, 256, ".png?type=google", new String[]{"https://wms.chartbundle.com/tms/v1.0/wac/"}, "chartbundle.com");
public static final OnlineTileSourceBase ChartbundleENRH = new XYTileSource("ChartbundleENRH", 4, 12, 256, ".png?type=google", new String[]{"https://wms.chartbundle.com/tms/v1.0/enrh/", "chartbundle.com"});
public static final OnlineTileSourceBase ChartbundleENRL = new XYTileSource("ChartbundleENRL", 4, 12, 256, ".png?type=google", new String[]{"https://wms.chartbundle.com/tms/v1.0/enrl/", "chartbundle.com"});
public static final OnlineTileSourceBase OpenTopo = new XYTileSource("OpenTopoMap", 0, 17, 256, ".png", new String[]{"https://a.tile.opentopomap.org/", "https://b.tile.opentopomap.org/", "https://c.tile.opentopomap.org/"}, "Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)");
public static ITileSource getTileSource(String str) throws IllegalArgumentException {
for (ITileSource iTileSource : mTileSources) {
if (iTileSource.name().equals(str)) {
return iTileSource;
}
}
throw new IllegalArgumentException("No such tile source: " + str);
}
public static boolean containsTileSource(String str) {
for (ITileSource iTileSource : mTileSources) {
if (iTileSource.name().equals(str)) {
return true;
}
}
return false;
}
@Deprecated
public static ITileSource getTileSource(int i) throws IllegalArgumentException {
for (ITileSource iTileSource : mTileSources) {
if (iTileSource.ordinal() == i) {
return iTileSource;
}
}
throw new IllegalArgumentException("No tile source at position: " + i);
}
public static List<ITileSource> getTileSources() {
return mTileSources;
}
public static void addTileSource(ITileSource iTileSource) {
mTileSources.add(iTileSource);
}
public static int removeTileSources(String str) {
int i = 0;
for (int size = mTileSources.size() - 1; size >= 0; size--) {
if (mTileSources.get(size).name().matches(str)) {
mTileSources.remove(size);
i++;
}
}
return i;
}
static {
ArrayList arrayList = new ArrayList();
mTileSources = arrayList;
arrayList.add(MAPNIK);
mTileSources.add(WIKIMEDIA);
mTileSources.add(PUBLIC_TRANSPORT);
mTileSources.add(HIKEBIKEMAP);
mTileSources.add(USGS_TOPO);
mTileSources.add(USGS_SAT);
mTileSources.add(ChartbundleWAC);
mTileSources.add(ChartbundleENRH);
mTileSources.add(ChartbundleENRL);
mTileSources.add(OpenTopo);
}
}