Revamp map page layout and compass while removing GPS demo

This commit is contained in:
2026-03-23 12:59:51 +08:00
parent 51740761f5
commit 277121fd51
11 changed files with 1053 additions and 373 deletions

View File

@@ -23,7 +23,7 @@ export interface MapScene {
previewOriginX: number
previewOriginY: number
track: LonLatPoint[]
gpsPoint: LonLatPoint
gpsPoint: LonLatPoint | null
gpsCalibration: MapCalibration
gpsCalibrationOrigin: LonLatPoint
osmReferenceEnabled: boolean

View File

@@ -137,9 +137,15 @@ export class WebGLVectorRenderer {
this.pushCircle(positions, colors, point.x, point.y, 6.5, [0.97, 0.98, 0.95, 1], scene)
}
this.pushCircle(positions, colors, gpsPoint.x, gpsPoint.y, this.gpsLayer.getPulseRadius(pulseFrame), [0.13, 0.62, 0.74, 0.22], scene)
this.pushCircle(positions, colors, gpsPoint.x, gpsPoint.y, 13, [1, 1, 1, 0.95], scene)
this.pushCircle(positions, colors, gpsPoint.x, gpsPoint.y, 9, [0.13, 0.63, 0.74, 1], scene)
if (gpsPoint) {
this.pushCircle(positions, colors, gpsPoint.x, gpsPoint.y, this.gpsLayer.getPulseRadius(pulseFrame), [0.13, 0.62, 0.74, 0.22], scene)
this.pushCircle(positions, colors, gpsPoint.x, gpsPoint.y, 13, [1, 1, 1, 0.95], scene)
this.pushCircle(positions, colors, gpsPoint.x, gpsPoint.y, 9, [0.13, 0.63, 0.74, 1], scene)
}
if (!positions.length) {
return
}
gl.viewport(0, 0, this.canvas.width, this.canvas.height)
gl.useProgram(this.program)
@@ -231,4 +237,3 @@ export class WebGLVectorRenderer {
}
}
}