hasadna/open-bus-map-search

feature | velocity page zoom levels

Open

#1,312 opened on Oct 10, 2025

View on GitHub
 (6 comments) (0 reactions) (1 assignee)TypeScript (125 forks)auto 404
frontendgood first issuehacktoberfestvelocities page

Repository metrics

Stars
 (95 stars)
PR merge metrics
 (PR metrics pending)

Description

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.

Contributor guide