diff --git a/Mapbox.php b/Mapbox.php index 3c25b61..143e368 100644 --- a/Mapbox.php +++ b/Mapbox.php @@ -199,6 +199,11 @@ public function geocodeQuery(GeocodeQuery $query): Collection $urlParameters['fuzzyMatch'] = $fuzzyMatch ? 'true' : 'false'; } + // example: "52.5123,21.2312" + if (null !== $proximity = $query->getData('proximity')) { + $urlParameters['proximity'] = $proximity; + } + if ($urlParameters) { $url .= '?'.http_build_query($urlParameters); }