Example style update

This commit is contained in:
Tim Schaub
2021-10-26 16:55:56 -06:00
parent 6640d2d069
commit f1c0781eb2
+8 -5
View File
@@ -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: [