refactor: clean up logs
Some checks failed
TrafficCue CI / check (push) Successful in 1m35s
TrafficCue CI / build-android (push) Has been cancelled
TrafficCue CI / build (push) Has been cancelled

This commit is contained in:
2025-10-25 20:09:46 +02:00
parent 678e52ddd5
commit 729cc22b37
2 changed files with 0 additions and 8 deletions

View File

@ -71,7 +71,6 @@ export function getSnappedLocation() {
function snapLocation() {
const feature = roadFeature.current;
console.log("Snapping location to road feature:", feature);
if (!feature) return;
if (!rawLocation.current) return;
if (feature.geometry.type === "LineString") {

View File

@ -59,24 +59,18 @@ export async function getFeature(
let distA = getFeatureDistance(a, [coord.lon, coord.lat]);
let distB = getFeatureDistance(b, [coord.lon, coord.lat]);
console.log("lastId:", lastId, "a.id:", a.id, "b.id:", b.id);
const STAY_BIAS = getBias();
// TODO: don't bias if feature is continuing straight (split ways vs turn)
if (lastId && String(a.id) == lastId) {
console.log("Applying stay bias to B");
distB += STAY_BIAS;
}
if (lastId && String(b.id) == lastId) {
console.log("Applying stay bias to A");
distA += STAY_BIAS;
}
console.log("Distances:", distA, distB);
return distA < distB ? a : b;
});
console.log("ID: ", nearest.id);
return nearest;
}
@ -168,7 +162,6 @@ export async function fetchTile(z: number, x: number, y: number) {
: new PMTiles("https://trafficcue-tiles.picoscratch.de/germany.pmtiles");
const tile = await pmtiles.getZxy(z, x, y);
if (!tile) {
console.log(tile);
throw new Error(`Tile not found: z${z} x${x} y${y}`);
}
const data = tile.data;