hasadna/open-bus-map-search

feature | velocity page zoom levels

オープン

#1,312 opened on 2025/10/10

 (6 件のコメント) (0 件のリアクション) (1 人の担当者)TypeScript (125 件のフォーク)auto 404
frontendgood first issuehacktoberfestvelocities page

Repository metrics

Stars
 (95 個のスター)
PR merge metrics
 (平均マージ 6d 5h) (30d で 42 merged PRs)

説明

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.

コントリビューターガイド