Compare commits

..

No commits in common. "b357b55c6bea38444625576a1dbc3b53edc90cbf" and "49386d5b8f1eab26130ab0a72b7bd05a39e5a494" have entirely different histories.

2 changed files with 61 additions and 62 deletions

View File

@ -26,27 +26,12 @@ const vectorLayer = new VectorLayer({
}
},
}),
style: function(feature){
let scale = [1, 1];
let rotation = ['E', 'SE', 'S', 'SW', 'W', 'NW', 'N', 'NE'].indexOf(feature.get('heading'));
if (rotation < 0) { // heading not found in array
console.warn(`Could not find ${feature.get('heading')} in rotation array`);
}
if (2 < rotation && rotation <= 6 ) {
rotation -= 4; // half turn
scale = [-1, 1];
}
rotation = Math.PI / 4 * rotation;
return new Style({
style: new Style({
image: new Icon({
anchor: [0.5, .9],
src: pinURL,
rotateWithView: true,
rotation: rotation,
scale: scale,
}),
});
}
}),
});
setInterval(() => vectorLayer.getSource().refresh(), 30000);

104
package-lock.json generated
View File

@ -370,14 +370,9 @@
}
},
"node_modules/@petamoriken/float16": {
"version": "3.8.7",
"resolved": "https://registry.npmjs.org/@petamoriken/float16/-/float16-3.8.7.tgz",
"integrity": "sha512-/Ri4xDDpe12NT6Ex/DRgHzLlobiQXEW/hmG08w1wj/YU7hLemk97c+zHQFp0iZQ9r7YqgLEXZR2sls4HxBf9NA=="
},
"node_modules/@types/rbush": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@types/rbush/-/rbush-3.0.4.tgz",
"integrity": "sha512-knSt9cCW8jj1ZSFcFeBZaX++OucmfPxxHiRwTahZfJlnQsek7O0bazTJHWD2RVj9LEoejUYF2de3/stf+QXcXw=="
"version": "3.8.6",
"resolved": "https://registry.npmjs.org/@petamoriken/float16/-/float16-3.8.6.tgz",
"integrity": "sha512-GNJhABTtcmt9al/nqdJPycwFD46ww2+q2zwZzTjY0dFFwUAFRw9zszvEr9osyJRd9krRGy6hUDopWUg9fX7VVw=="
},
"node_modules/color-name": {
"version": "2.0.0",
@ -410,9 +405,9 @@
"integrity": "sha512-nKqUYlo0vZATVOFHY810BSYjmCARrG7e5R3UE3CQlyjJTvv5kSSmPG1kzm/oDyyqjehM+lW1RnEt9It9GNa5JA=="
},
"node_modules/earcut": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/earcut/-/earcut-3.0.0.tgz",
"integrity": "sha512-41Fs7Q/PLq1SDbqjsgcY7GA42T0jvaCNGXgGtsNdvg+Yv8eIu06bxv4/PoREkZ9nMDNwnUSG9OFB9+yv8eKhDg=="
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz",
"integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ=="
},
"node_modules/esbuild": {
"version": "0.18.20",
@ -484,9 +479,28 @@
}
},
"node_modules/hls.js": {
"version": "1.5.15",
"resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.5.15.tgz",
"integrity": "sha512-6cD7xN6bycBHaXz2WyPIaHn/iXFizE5au2yvY5q9aC4wfihxAr16C9fUy4nxh2a3wOw0fEgLRa9dN6wsYjlpNg=="
"version": "1.5.8",
"resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.5.8.tgz",
"integrity": "sha512-hJYMPfLhWO7/7+n4f9pn6bOheCGx0WgvVz7k3ouq3Pp1bja48NN+HeCQu3XCGYzqWQF/wo7Sk6dJAyWVJD8ECA=="
},
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/lerc": {
"version": "3.0.0",
@ -517,17 +531,16 @@
}
},
"node_modules/ol": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/ol/-/ol-10.1.0.tgz",
"integrity": "sha512-/efepydpzhFoeczA9KAN5t7G0WpFhP46ZXEfSl6JbZ7ipQZ2axpkYB2qt0qcOUlPFYMt7/XQFApH652KB08tTg==",
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/ol/-/ol-9.1.0.tgz",
"integrity": "sha512-nDrkJ2tzZNpo/wzN/PpHV5zdxbnXZaFktoMaD2cFLEc6gCwlgLY21Yd8wnt/4FjaVYwLBnbN9USXSwIBGcyksQ==",
"dependencies": {
"@types/rbush": "^3.0.3",
"color-rgba": "^3.0.0",
"color-space": "^2.0.1",
"earcut": "^3.0.0",
"earcut": "^2.2.3",
"geotiff": "^2.0.7",
"pbf": "4.0.1",
"rbush": "^4.0.0"
"pbf": "3.2.1",
"rbush": "^3.0.1"
},
"funding": {
"type": "opencollective",
@ -535,9 +548,9 @@
}
},
"node_modules/ol-contextmenu": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/ol-contextmenu/-/ol-contextmenu-5.5.0.tgz",
"integrity": "sha512-IglB0OfzSmcP++dykqrQU62lJAn/4O61hxyD0s5V03HE70Efm6EgSaNq8YOlgEbnqfUL+7F3fS7VI3UV+0+NZg==",
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/ol-contextmenu/-/ol-contextmenu-5.4.0.tgz",
"integrity": "sha512-F2cIwCToMAYsddnrcRvCnWAH4bp9n9LNHrDTqU3mDJMiNUw1RB4Ovz5b2FwxasLpymtkzV8ME39u+mP3IvpT6g==",
"dependencies": {
"tiny-emitter": "^2.1.0"
},
@ -546,7 +559,7 @@
"npm": ">=8"
},
"peerDependencies": {
"ol": "> 7.x <= 10.x"
"ol": "> 7.x <= 9.x"
}
},
"node_modules/pako": {
@ -560,10 +573,11 @@
"integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA=="
},
"node_modules/pbf": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pbf/-/pbf-4.0.1.tgz",
"integrity": "sha512-SuLdBvS42z33m8ejRbInMapQe8n0D3vN/Xd5fmWM3tufNgRQFBpaW2YVJxQZV4iPNqb0vEFvssMEo5w9c6BTIA==",
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz",
"integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==",
"dependencies": {
"ieee754": "^1.1.12",
"resolve-protobuf-schema": "^2.1.0"
},
"bin": {
@ -571,15 +585,15 @@
}
},
"node_modules/picocolors": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz",
"integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==",
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
"dev": true
},
"node_modules/postcss": {
"version": "8.4.44",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.44.tgz",
"integrity": "sha512-Aweb9unOEpQ3ezu4Q00DPvvM2ZTUitJdNKeP/+uQgr1IBIqu574IaZoURId7BKtWMREwzKa9OgzPzezWGPWFQw==",
"version": "8.4.38",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz",
"integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==",
"dev": true,
"funding": [
{
@ -597,7 +611,7 @@
],
"dependencies": {
"nanoid": "^3.3.7",
"picocolors": "^1.0.1",
"picocolors": "^1.0.0",
"source-map-js": "^1.2.0"
},
"engines": {
@ -630,16 +644,16 @@
}
},
"node_modules/quickselect": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/quickselect/-/quickselect-3.0.0.tgz",
"integrity": "sha512-XdjUArbK4Bm5fLLvlm5KpTFOiOThgfWWI4axAZDWg4E/0mKdZyI9tNEfds27qCi1ze/vwTR16kvmmGhRra3c2g=="
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz",
"integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw=="
},
"node_modules/rbush": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/rbush/-/rbush-4.0.1.tgz",
"integrity": "sha512-IP0UpfeWQujYC8Jg162rMNc01Rf0gWMMAb2Uxus/Q0qOFw4lCcq6ZnQEZwUoJqWyUGJ9th7JjwI4yIWo+uvoAQ==",
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/rbush/-/rbush-3.0.1.tgz",
"integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==",
"dependencies": {
"quickselect": "^3.0.0"
"quickselect": "^2.0.0"
}
},
"node_modules/resolve-protobuf-schema": {
@ -746,9 +760,9 @@
"integrity": "sha512-ZnV3yH8/k58ZPACOXeiHaMuXIiaTk1t0hSUVisbO0t4RjA5wPpUytcxeyiN2h+LZRrmuHIh/1UlrR9e7DHDvTw=="
},
"node_modules/xml-utils": {
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/xml-utils/-/xml-utils-1.10.1.tgz",
"integrity": "sha512-Dn6vJ1Z9v1tepSjvnCpwk5QqwIPcEFKdgnjqfYOABv1ngSofuAhtlugcUC3ehS1OHdgDWSG6C5mvj+Qm15udTQ=="
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/xml-utils/-/xml-utils-1.8.0.tgz",
"integrity": "sha512-1TY5yLw8DApowZAUsWCniNr8HH6Ebt6O7UQvmIwziGKwUNsQx6e+4NkfOvCfnqmYIcPjCeoI6dh1JenPJ9a1hQ=="
},
"node_modules/zstddec": {
"version": "0.1.0",