add VectorTileLayer constructor with TileSource
This commit is contained in:
parent
8068d6c25a
commit
d7914f4807
@ -32,11 +32,24 @@ import org.slf4j.LoggerFactory;
|
|||||||
* {@link VectorTileLoader} that load and assemble vector tiles
|
* {@link VectorTileLoader} that load and assemble vector tiles
|
||||||
* for rendering.
|
* for rendering.
|
||||||
*/
|
*/
|
||||||
public abstract class VectorTileLayer extends TileLayer {
|
public class VectorTileLayer extends TileLayer {
|
||||||
static final Logger log = LoggerFactory.getLogger(VectorTileLayer.class);
|
static final Logger log = LoggerFactory.getLogger(VectorTileLayer.class);
|
||||||
|
|
||||||
protected TileSource mTileSource;
|
protected TileSource mTileSource;
|
||||||
|
|
||||||
|
public VectorTileLayer(Map map, TileSource tileSource) {
|
||||||
|
|
||||||
|
super(map, new TileManager(map,
|
||||||
|
tileSource.getZoomLevelMin(),
|
||||||
|
tileSource.getZoomLevelMax(),
|
||||||
|
100),
|
||||||
|
new VectorTileRenderer());
|
||||||
|
|
||||||
|
// FIXME config!
|
||||||
|
initLoader(2);
|
||||||
|
setTileSource(tileSource);
|
||||||
|
}
|
||||||
|
|
||||||
public VectorTileLayer(Map map, int minZoom, int maxZoom, int cacheLimit) {
|
public VectorTileLayer(Map map, int minZoom, int maxZoom, int cacheLimit) {
|
||||||
super(map, new TileManager(map, minZoom, maxZoom, cacheLimit),
|
super(map, new TileManager(map, minZoom, maxZoom, cacheLimit),
|
||||||
new VectorTileRenderer());
|
new VectorTileRenderer());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user