Add 2025 Texas Trahan Thanksgiving trip
This commit is contained in:
parent
66205965ce
commit
2faf722f03
3 changed files with 40 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
import ncAug2023 from './trahan-north-carolina-august-2023/layer.js'
|
import ncAug2023 from './trahan-north-carolina-august-2023/layer.js'
|
||||||
|
import texas2025 from './trahan-texas-thanksgiving-2025/layer.js';
|
||||||
|
|
||||||
const trips = {
|
const trips = {
|
||||||
name: "Trips",
|
name: "Trips",
|
||||||
|
|
@ -7,6 +8,10 @@ const trips = {
|
||||||
name: "North Carolina 2023-08 with Trahans",
|
name: "North Carolina 2023-08 with Trahans",
|
||||||
layer: ncAug2023,
|
layer: ncAug2023,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Texas Thanksgiving 2025 with Trahans",
|
||||||
|
layer: texas2025,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
9
layers/trips/trahan-texas-thanksgiving-2025/get_data.sh
Executable file
9
layers/trips/trahan-texas-thanksgiving-2025/get_data.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
FROM="2025-11-22T13:00:00.000Z"
|
||||||
|
TO="2025-11-28T19:30:00.000Z"
|
||||||
|
URL="https://whereis.chandlerswift.com/api/0/locations?from=$FROM&to=$TO&format=geojson&user=chandler&device=oneplus9"
|
||||||
|
|
||||||
|
curl --silent "$URL" \
|
||||||
|
| python "$(dirname $0)/../../../util/process_owntracks_geojson_to_line.py" \
|
||||||
|
> data.geojson
|
||||||
26
layers/trips/trahan-texas-thanksgiving-2025/layer.js
Normal file
26
layers/trips/trahan-texas-thanksgiving-2025/layer.js
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
import VectorLayer from 'ol/layer/Vector';
|
||||||
|
import {Vector as VectorSource} from 'ol/source.js';
|
||||||
|
import GeoJSON from 'ol/format/GeoJSON.js';
|
||||||
|
|
||||||
|
import {Style, Stroke} from 'ol/style.js';
|
||||||
|
|
||||||
|
import url from './data.geojson?url'; // TODO: remove `?url`?
|
||||||
|
|
||||||
|
const colors = '204, 85, 0'; // Käthe says burnt orange
|
||||||
|
|
||||||
|
const vectorLayer = new VectorLayer({
|
||||||
|
source: new VectorSource({
|
||||||
|
url: url,
|
||||||
|
format: new GeoJSON,
|
||||||
|
}),
|
||||||
|
style: function(feature, resolution){
|
||||||
|
return new Style({
|
||||||
|
stroke: new Stroke({
|
||||||
|
color: `rgba(${colors},${Math.min(1, Math.pow(resolution/10, 1/4))})`,
|
||||||
|
width: 10/Math.pow(resolution, 1/4),
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default vectorLayer;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue