add getter for UrlTileSource.getUrl()
This commit is contained in:
@@ -24,7 +24,7 @@ import org.oscim.tiling.TileSource;
|
||||
|
||||
public abstract class UrlTileSource extends TileSource {
|
||||
|
||||
protected final URL mUrl;
|
||||
private final URL mUrl;
|
||||
private byte[] mExt;
|
||||
|
||||
public UrlTileSource(String urlString) {
|
||||
@@ -83,7 +83,7 @@ public abstract class UrlTileSource extends TileSource {
|
||||
* @param pos current position
|
||||
* @return new position
|
||||
*/
|
||||
protected int formatTilePath(Tile tile, byte[] buf, int pos) {
|
||||
public int formatTilePath(Tile tile, byte[] buf, int pos) {
|
||||
String p = getTileUrl(tile);
|
||||
if (p != null) {
|
||||
byte[] b = p.getBytes();
|
||||
@@ -103,4 +103,8 @@ public abstract class UrlTileSource extends TileSource {
|
||||
System.arraycopy(mExt, 0, buf, pos, mExt.length);
|
||||
return pos + mExt.length;
|
||||
}
|
||||
|
||||
public URL getUrl() {
|
||||
return mUrl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public abstract class BitmapTileSource extends UrlTileSource {
|
||||
|
||||
@Override
|
||||
public ITileDataSource getDataSource() {
|
||||
return new UrlTileDataSource(this, new BitmapTileDecoder(), new LwHttp(mUrl));
|
||||
return new UrlTileDataSource(this, new BitmapTileDecoder(), new LwHttp(getUrl()));
|
||||
}
|
||||
|
||||
public class BitmapTileDecoder implements ITileDecoder {
|
||||
|
||||
@@ -34,6 +34,6 @@ public class OSciMap4TileSource extends UrlTileSource {
|
||||
|
||||
@Override
|
||||
public ITileDataSource getDataSource() {
|
||||
return new UrlTileDataSource(this, new TileDecoder(), new LwHttp(mUrl));
|
||||
return new UrlTileDataSource(this, new TileDecoder(), new LwHttp(getUrl()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user