add bus directions to map

This commit is contained in:
Jack Merrill 2024-01-29 17:27:32 -05:00
parent 944a4e95d8
commit e7132b6009
No known key found for this signature in database

View File

@ -145,13 +145,17 @@ func (c *PVTA) Exec(ctx shireikan.Context) error {
return err
}
mapCtx.AddObject(
sm.NewMarker(
marker := sm.NewMarker(
s2.LatLngFromDegrees(vehicle.Latitude, vehicle.Longitude),
color.RGBA{R: rgb.Red, G: rgb.Green, B: rgb.Blue, A: 255},
16.0,
),
)
marker.Label = fmt.Sprintf("%s (%s)", vehicle.Destination, vehicle.Direction)
marker.LabelColor = color.RGBA{R: 0, G: 0, B: 0, A: 255}
marker.LabelYOffset = 3
mapCtx.AddObject(marker)
}
img, err := mapCtx.Render()