VCamera v2.0.3版本的 MD5 值为:0c69d90ea31aeb3cb9d1431fccc77864
以下内容为反编译后的 MapQuestTileSource.java 源代码,内容仅作参考
package org.osmdroid.tileprovider.tilesource;
import android.content.Context;
import androidx.appcompat.view.OooO00o;
import org.osmdroid.tileprovider.util.ManifestUtil;
import org.osmdroid.util.MapTileIndex;
public class MapQuestTileSource extends OnlineTileSourceBase {
private static final String ACCESS_TOKEN = "MAPQUEST_ACCESS_TOKEN";
private static final String MAPBOX_MAPID = "MAPQUEST_MAPID";
private static final String[] mapBoxBaseUrl = {"http://api.tiles.mapbox.com/v4/"};
private String accessToken;
private String mapBoxMapId;
public MapQuestTileSource(Context context) {
super("MapQuest", 1, 19, 256, ".png", mapBoxBaseUrl, "MapQuest");
this.mapBoxMapId = "mapquest.streets-mb";
retrieveAccessToken(context);
retrieveMapBoxMapId(context);
this.mName = "MapQuest" + this.mapBoxMapId;
}
public MapQuestTileSource(String str, int i, int i2, int i3, String str2) {
super(str, i, i2, i3, str2, mapBoxBaseUrl, "MapQuest");
this.mapBoxMapId = "mapquest.streets-mb";
}
public MapQuestTileSource(String str, int i, int i2, int i3, String str2, String str3, String str4) {
super(OooO00o.OooO00o(str, str3), i, i2, i3, str2, new String[]{str4}, "MapQuest");
this.mapBoxMapId = "mapquest.streets-mb";
this.mapBoxMapId = str3;
}
public MapQuestTileSource(String str, String str2) {
super(OooO00o.OooO00o("MapQuest", str), 1, 19, 256, ".png", mapBoxBaseUrl, "MapQuest");
this.mapBoxMapId = "mapquest.streets-mb";
this.accessToken = str2;
this.mapBoxMapId = str;
}
public String getAccessToken() {
return this.accessToken;
}
public String getMapBoxMapId() {
return this.mapBoxMapId;
}
@Override
public String getTileURLString(long j) {
return getBaseUrl() + getMapBoxMapId() + "/" + MapTileIndex.getZoom(j) + "/" + MapTileIndex.getX(j) + "/" + MapTileIndex.getY(j) + ".png?access_token=" + getAccessToken();
}
public final void retrieveAccessToken(Context context) {
this.accessToken = ManifestUtil.retrieveKey(context, ACCESS_TOKEN);
}
public final void retrieveMapBoxMapId(Context context) {
String retrieveKey = ManifestUtil.retrieveKey(context, MAPBOX_MAPID);
if (retrieveKey == null || retrieveKey.length() <= 0) {
return;
}
this.mapBoxMapId = retrieveKey;
}
public void setAccessToken(String str) {
this.accessToken = str;
}
public void setMapboxMapid(String str) {
this.mapBoxMapId = str;
}
}