Tile layer rendering with the composite renderer
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 101 KiB |
@@ -2,33 +2,34 @@ import Map from '../../../src/ol/Map.js';
|
||||
import View from '../../../src/ol/View.js';
|
||||
import {Vector as VectorLayer, Tile as TileLayer} from '../../../src/ol/layer.js';
|
||||
import {Vector as VectorSource, XYZ} from '../../../src/ol/source.js';
|
||||
import Point from '../../../src/ol/geom/Point.js';
|
||||
import Feature from '../../../src/ol/Feature.js';
|
||||
import {fromLonLat} from '../../../src/ol/proj.js';
|
||||
|
||||
const center = fromLonLat([-111, 45.7]);
|
||||
import GeoJSON from '../../../src/ol/format/GeoJSON.js';
|
||||
import {Style, Stroke} from '../../../src/ol/style.js';
|
||||
|
||||
new Map({
|
||||
layers: [
|
||||
new TileLayer({
|
||||
source: new XYZ({
|
||||
url: '/data/tiles/satellite/{z}/{x}/{y}.jpg'
|
||||
url: '/data/tiles/satellite/{z}/{x}/{y}.jpg',
|
||||
maxZoom: 3
|
||||
})
|
||||
}),
|
||||
new VectorLayer({
|
||||
style: new Style({
|
||||
stroke: new Stroke({
|
||||
color: 'rgba(255,255,255,0.5)',
|
||||
width: 0.75
|
||||
})
|
||||
}),
|
||||
source: new VectorSource({
|
||||
features: [
|
||||
new Feature(
|
||||
new Point(center)
|
||||
)
|
||||
]
|
||||
url: '/data/countries.json',
|
||||
format: new GeoJSON()
|
||||
})
|
||||
})
|
||||
],
|
||||
target: 'map',
|
||||
view: new View({
|
||||
center: center,
|
||||
zoom: 3
|
||||
center: [0, 0],
|
||||
zoom: 2
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user