VCamera v2.0.3版本的 MD5 值为:0c69d90ea31aeb3cb9d1431fccc77864
以下内容为反编译后的 MapBoxTileSource.java 源代码,内容仅作参考
package org.osmdroid.tileprovider.tilesource;
import android.content.Context;
import android.support.v4.media.C0166OooO0o0;
import org.osmdroid.tileprovider.util.ManifestUtil;
import org.osmdroid.util.MapTileIndex;
public class MapBoxTileSource extends OnlineTileSourceBase {
private static final String ACCESS_TOKEN = "MAPBOX_ACCESS_TOKEN";
private static final String MAPBOX_MAPID = "MAPBOX_MAPID";
private static final String[] mapBoxBaseUrl = {"https://api.mapbox.com/v4/"};
private String accessToken;
private String mapBoxMapId;
public MapBoxTileSource() {
super("mapbox", 1, 19, 256, ".png", mapBoxBaseUrl);
this.mapBoxMapId = "";
}
public MapBoxTileSource(Context context) {
super("mapbox", 1, 19, 256, ".png", mapBoxBaseUrl);
this.mapBoxMapId = "";
retrieveAccessToken(context);
retrieveMapBoxMapId(context);
this.mName = "mapbox" + this.mapBoxMapId;
}
public MapBoxTileSource(String str, int i, int i2, int i3, String str2) {
super(str, i, i2, i3, str2, mapBoxBaseUrl);
this.mapBoxMapId = "";
}
public MapBoxTileSource(String str, int i, int i2, int i3, String str2, String str3, String str4) {
super(str, i, i2, i3, str2, new String[]{str4});
this.mapBoxMapId = "";
}
public MapBoxTileSource(String str, String str2) {
super("mapbox", 1, 19, 256, ".png", mapBoxBaseUrl);
this.mapBoxMapId = "";
this.accessToken = str2;
this.mapBoxMapId = str;
StringBuilder OooO00o2 = C0166OooO0o0.OooO00o("mapbox");
OooO00o2.append(this.mapBoxMapId);
this.mName = OooO00o2.toString();
}
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) {
this.mapBoxMapId = ManifestUtil.retrieveKey(context, MAPBOX_MAPID);
}
public void setAccessToken(String str) {
this.accessToken = str;
}
public void setMapboxMapid(String str) {
this.mapBoxMapId = str;
StringBuilder OooO00o2 = C0166OooO0o0.OooO00o("mapbox");
OooO00o2.append(this.mapBoxMapId);
this.mName = OooO00o2.toString();
}
}