add TileSource.Builders

This commit is contained in:
Hannes Janetzek
2014-09-11 20:11:29 +02:00
parent 67336e0c93
commit a97b3283a0
18 changed files with 276 additions and 131 deletions

View File

@@ -35,7 +35,6 @@ import org.oscim.theme.VtmThemes;
import org.oscim.tiling.TileSource;
import org.oscim.tiling.source.bitmap.BitmapTileSource;
import org.oscim.tiling.source.bitmap.DefaultSources;
import org.oscim.tiling.source.bitmap.DefaultSources.StamenToner;
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -90,17 +89,17 @@ class GwtMap extends GdxMap {
BitmapTileSource ts;
if ("toner".equals(mapName))
ts = new StamenToner();
ts = DefaultSources.STAMEN_TONER.build();
else if ("osm".equals(mapName))
ts = new DefaultSources.OpenStreetMap();
ts = DefaultSources.OPENSTREETMAP.build();
else if ("watercolor".equals(mapName))
ts = new DefaultSources.StamenWatercolor();
ts = DefaultSources.STAMEN_WATERCOLOR.build();
else if ("arcgis-shaded".equals(mapName))
ts = new DefaultSources.ArcGISWorldShaded();
ts = DefaultSources.ARCGIS_RELIEF.build();
else if ("imagico".equals(mapName))
ts = new DefaultSources.ImagicoLandcover();
ts = DefaultSources.IMAGICO_LANDCOVER.build();
else
ts = new StamenToner();
ts = DefaultSources.STAMEN_TONER.build();
mMap.setBaseMap(new BitmapTileLayer(mMap, ts));
} else {
@@ -123,7 +122,11 @@ class GwtMap extends GdxMap {
boolean s3db = mapUrl.params.containsKey("s3db");
if (s3db) {
TileSource ts = new OSciMap4TileSource("http://opensciencemap.org/tiles/s3db");
TileSource ts = OSciMap4TileSource.builder()
.url("http://opensciencemap.org/tiles/s3db")
.zoomMin(16)
.zoomMax(16)
.build();
mMap.layers().add(new S3DBLayer(mMap, ts));
}
if (l != null) {