diff --git a/layers/chandler/layer.js b/layers/chandler/layer.js
index a2ad7d7..28a1600 100644
--- a/layers/chandler/layer.js
+++ b/layers/chandler/layer.js
@@ -13,11 +13,13 @@ const res = await fetch("https://whereis.chandlerswift.com/api/0/last");
const locs = await res.json();
const loc = locs[0];
+let geometry = new Point(fromLonLat([loc.lon, loc.lat]));
+
const vectorLayer = new VectorLayer({
source: new VectorSource({
features: [
new Feature({
- geometry: new Point(fromLonLat([loc.lon, loc.lat])),
+ geometry: geometry,
})
]
}),
@@ -29,4 +31,11 @@ const vectorLayer = new VectorLayer({
}),
});
+setInterval(async function(){
+ const res = await fetch("https://whereis.chandlerswift.com/api/0/last");
+ const locs = await res.json();
+ const loc = locs[0];
+ geometry.setCoordinates(fromLonLat([loc.lon, loc.lat]));
+}, 10 * 1000);
+
export default vectorLayer;
diff --git a/layers/light_pollution.js b/layers/light_pollution.js
index 21a5a3d..5f9b91e 100644
--- a/layers/light_pollution.js
+++ b/layers/light_pollution.js
@@ -25,4 +25,5 @@ let layers = [];
export default {
name: "Light Pollution",
layers: layers,
+ details: "For legend and more information, see cleardarksky.com.",
};
diff --git a/main.js b/main.js
index b44d4d9..d333838 100644
--- a/main.js
+++ b/main.js
@@ -28,6 +28,7 @@ for (let category of layerCategories) {
catDiv.innerHTML = `
l.enabled).length > 0 ? "open" : ""}>
${category.name}
+ ${category.details ? "" + category.details + "
" : ""}
`;