public MapViewerLayer(String name, TileSource tileSource,
TileCache tileCache, boolean osmFileCache) {
super(name);
this.tileSource = tileSource;
if (osmFileCache) {
this.tileLoader = new OsmFileCacheTileLoader(this);
} else {
this.tileLoader = new OsmTileLoader(this);
}
this.tileCache = tileCache;
jobDispatcher = JobDispatcher.getInstance();