Feature: choose the geocoder provider by config (Google stays the default)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- PHP
- Stelle
- 40
- Fork
- 72
- Merge medio
- 19h
- PR unite (30g)
- 66
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di fleetbase/fleetops
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
fleetbase/fleetops#337 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
fleetbase/fleetops#334 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
ST_MakeEnvelope breaks MariaDB and fails on MySQL with SRID 4326 spatial columnsForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di fleetbase/fleetops
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
grokability/snipe-it#19857 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
I maintainer di solito rispondono entro 1 giorno
-
Authentication / Authorization Feature: Volunteer
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bagisto/bagisto-api#51 ·