Make the tile debug source useful for understanding tiles
This commit is contained in:
@@ -1,26 +1,21 @@
|
||||
import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import {fromLonLat} from '../src/ol/proj.js';
|
||||
import {OSM, TileDebug} from '../src/ol/source.js';
|
||||
|
||||
|
||||
const osmSource = new OSM();
|
||||
const map = new Map({
|
||||
layers: [
|
||||
new TileLayer({
|
||||
source: osmSource
|
||||
source: new OSM()
|
||||
}),
|
||||
new TileLayer({
|
||||
source: new TileDebug({
|
||||
projection: 'EPSG:3857',
|
||||
tileGrid: osmSource.getTileGrid()
|
||||
})
|
||||
source: new TileDebug()
|
||||
})
|
||||
],
|
||||
target: 'map',
|
||||
view: new View({
|
||||
center: fromLonLat([-0.1275, 51.507222]),
|
||||
zoom: 10
|
||||
center: [0, 0],
|
||||
zoom: 1
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user