hasadna/open-bus-map-search

feature | velocity page zoom levels

Aperta

#1312 aperta il 10 ott 2025

 (6 commenti) (0 reazioni) (1 assegnatario)TypeScript (125 fork)auto 404
frontendgood first issuehacktoberfestvelocities page

Metriche repository

Star
 (95 stelle)
Metriche merge PR
 (Merge medio 6g 5h) (42 PR mergiate in 30 g)

Descrizione

In the velocity heatmap page, we always load the velocities with the same precision / zoom level rounding_precision=2: https://open-bus-stride-api.hasadna.org.il/siri_velocity_aggregation/siri_velocity_aggregation?recorded_from=2025-01-01T00%3A00%3A00&lon_min=34.25&lon_max=35.7&lat_min=29.5&lat_max=33.33&rounding_precision=2

2 means we have two decimal places.

when the user zoom in / out, we would like (ideally) to show different zoom level, having higher rounding_precision when the user zoom in and lower when the user zooms out.

Note - zooming in and out in the map makes the map 2 times bigger / smaller in each axis, so the change in precision would be around log_10(2). Also, rounding_precision has to be rounded because it supports integers only.

We can discuss with backend if we want to change things, but that would cause some friction so it's up to us.

Guida contributor