Feature: choose the geocoder provider by config (Google stays the default)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start by reading config/geocoder.php, Geocoding::makeGeocoder(), and the Place helpers that the issue identifies. The proposal also points to reverse lookups in driver track and POST /v1/places; inspect their existing tests and add Pest coverage for provider selection and failed lookups. Done means the maintainers resolve the two API/design questions and the proposed provider behavior is verified.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Fleet-Ops geocodes only through Google Maps. config/geocoder.php chains only GoogleMaps, Geocoding::makeGeocoder() builds it directly, and the Place::...GoogleAddress helpers are typed to GoogleAddress.
Without a Google key, self-hosted installs get no address lookups, places created from an address stay at POINT(0 0), POST /v1/places with only coordinates returns 500, and each reverse lookup from driver track logs an ALERT. #337 is the same missing-key situation on the map settings.
Proposal
GEOCODER_PROVIDERpicks an entry from a small registry of geocoder-php providers inconfig/geocoder.php. The default staysgoogle, so existing installs don't change. First entries:google,pelias(PELIAS_URL) andnominatim(NOMINATIM_URL).- Google follows the selected provider in the chain only when a key is set.
GEOCODER_TIMEOUT(2 s) for non-Google providers, and a failed reverse lookup keeps the coordinates instead of throwing.- The
Placehelpers acceptGeocoder\Locationand use the Google-only fields only when the result has them.
This runs on our v0.7.68 install (fleetops 0.6.71) with Pelias and no Google key, with Pest tests.
Questions before we send a PR
- The registry with provider packages in
suggest, Pelias inrequire, or Pelias only as a first step? - For the
Placehelpers: widen theGoogleAddresstypes in place (a subclass override with the old type would then fail), or add generic methods and keep the Google-named ones as deprecated wrappers?
Why
Self-hosters could run Fleet-Ops without a Google account or with their own geocoder, and a missing key would stop causing 500s.
- Ngôn ngữ chính
- PHP
- Star
- 40
- Fork
- 72
- Merge trung bình
- 19 giờ
- Pull request đã merge (30 ngày)
- 66
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của fleetbase/fleetops
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
fleetbase/fleetops#337 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
fleetbase/fleetops#334 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ST_MakeEnvelope breaks MariaDB and fails on MySQL with SRID 4326 spatial columnsCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của fleetbase/fleetops
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
grokability/snipe-it#19857 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Authentication / Authorization Feature: Volunteer
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
bagisto/bagisto-api#51 ·