Example style update
This commit is contained in:
@@ -11,26 +11,29 @@ import {fromLonLat} from '../src/ol/proj.js';
|
|||||||
|
|
||||||
const shaft = new RegularShape({
|
const shaft = new RegularShape({
|
||||||
points: 2,
|
points: 2,
|
||||||
radius: 20,
|
radius: 5,
|
||||||
stroke: new Stroke({
|
stroke: new Stroke({
|
||||||
width: 2,
|
width: 2,
|
||||||
color: 'rgba(0,0,0,0.5)',
|
color: 'black',
|
||||||
}),
|
}),
|
||||||
rotateWithView: true,
|
rotateWithView: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const head = new RegularShape({
|
const head = new RegularShape({
|
||||||
points: 3,
|
points: 3,
|
||||||
radius: 10,
|
radius: 5,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: 'rgba(0,0,0,0.5)',
|
color: 'black',
|
||||||
}),
|
}),
|
||||||
rotateWithView: true,
|
rotateWithView: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const styles = [new Style({image: shaft}), new Style({image: head})];
|
const styles = [new Style({image: shaft}), new Style({image: head})];
|
||||||
|
|
||||||
const source = new VectorSource();
|
const source = new VectorSource({
|
||||||
|
attributions:
|
||||||
|
'Weather data by <a href="https://openweathermap.org/current">OpenWeather</a>',
|
||||||
|
});
|
||||||
|
|
||||||
const map = new Map({
|
const map = new Map({
|
||||||
layers: [
|
layers: [
|
||||||
|
|||||||
Reference in New Issue
Block a user