Skip to content

feat: sync camera coordinates and VietMap addresses - #7

Merged
hoangsvit merged 7 commits into
developfrom
feat/camera-location-sync
Oct 6, 2026
Merged

hoangsvit merged 7 commits into
developfrom
feat/camera-location-sync

Conversation

@hoangsvit

Copy link
Copy Markdown
Member

Mục tiêu

Bổ sung tọa độ gốc cho camera và tự động reverse-geocode địa chỉ bằng VietMap mà không lộ API key ra frontend.

Thay đổi

  • Backfill Latitude / Longitude từ Location.Shape cho 796/797 camera hiện có.
  • Giữ TTH 190 không có tọa độ vì camera này không còn xuất hiện trong response nguồn hiện tại.
  • Thêm scripts/sync-cameras.mjs:
    • gọi SearchQuery Publish:true
    • parse AjaxPro DataTable
    • thêm camera mới
    • cập nhật tọa độ nguồn
    • giữ camera stale để review thủ công
    • reverse-geocode VietMap Reverse v4 với display_type=6
    • chỉ gọi VietMap cho camera thiếu address hoặc có tọa độ thay đổi
  • Thêm workflow Sync camera data chạy mỗi 6 giờ và hỗ trợ chạy tay / force geocode.
  • Workflow chỉ tạo hoặc update PR data/auto-sync-cameras khi dataset thực sự thay đổi.
  • Secret dùng: VIETMAP_API_KEY; HCM_TRAFFIC_COOKIE là tùy chọn nếu nguồn yêu cầu session.
  • CI kiểm tra syntax sync script và validate cặp tọa độ.
  • Search homepage tìm được theo address/ward/district/province.
  • Camera detail hiển thị address và thêm GeoCoordinates vào Schema.org khi có tọa độ.

Lưu ý API key

Không commit API key vào repository. Thêm tại:

Settings → Secrets and variables → Actions → VIETMAP_API_KEY

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bb646e59-7adb-4944-b702-f4fa9dbc9a7b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hoangsvit
hoangsvit merged commit 838d481 into develop Oct 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant