Tile decoders refactoring

This commit is contained in:
Emux
2019-10-01 18:41:13 +03:00
parent 1294ff9fea
commit c20922b5f5
11 changed files with 19 additions and 19 deletions

View File

@@ -65,6 +65,6 @@ public class MapilionMvtTileSource extends UrlTileSource {
@Override
public ITileDataSource getDataSource() {
return new OverzoomTileDataSource(new UrlTileDataSource(this, new MvtTileDecoder(locale), getHttpEngine()), mOverZoom);
return new OverzoomTileDataSource(new UrlTileDataSource(this, new TileDecoder(locale), getHttpEngine()), mOverZoom);
}
}

View File

@@ -69,6 +69,6 @@ public class MapzenMvtTileSource extends UrlTileSource {
@Override
public ITileDataSource getDataSource() {
return new OverzoomTileDataSource(new UrlTileDataSource(this, new MvtTileDecoder(locale), getHttpEngine()), mOverZoom);
return new OverzoomTileDataSource(new UrlTileDataSource(this, new TileDecoder(locale), getHttpEngine()), mOverZoom);
}
}

View File

@@ -66,6 +66,6 @@ public class NextzenMvtTileSource extends UrlTileSource {
@Override
public ITileDataSource getDataSource() {
return new OverzoomTileDataSource(new UrlTileDataSource(this, new MvtTileDecoder(locale), getHttpEngine()), mOverZoom);
return new OverzoomTileDataSource(new UrlTileDataSource(this, new TileDecoder(locale), getHttpEngine()), mOverZoom);
}
}

View File

@@ -69,6 +69,6 @@ public class OpenMapTilesMvtTileSource extends UrlTileSource {
@Override
public ITileDataSource getDataSource() {
return new OverzoomTileDataSource(new UrlTileDataSource(this, new MvtTileDecoder(locale), getHttpEngine()), mOverZoom);
return new OverzoomTileDataSource(new UrlTileDataSource(this, new TileDecoder(locale), getHttpEngine()), mOverZoom);
}
}

View File

@@ -42,7 +42,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
public class MvtTileDecoder implements ITileDecoder {
public class TileDecoder implements ITileDecoder {
private final String mLocale;
private static final float REF_TILE_SIZE = 4096.0f;
@@ -52,11 +52,11 @@ public class MvtTileDecoder implements ITileDecoder {
private final MapElement mMapElement;
private ITileDataSink mTileDataSink;
public MvtTileDecoder() {
public TileDecoder() {
this("");
}
public MvtTileDecoder(String locale) {
public TileDecoder(String locale) {
mLocale = locale;
mGeomFactory = new GeometryFactory();
mMapElement = new MapElement();