public function GeocoderController::geocoderAutocomplete in Geocoder autocomplete 8
Callback Method for Route geocoder_autocomplete.autocomplete.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The Request sent.
Return value
mixed|string Json output of the found strings.
1 string reference to 'GeocoderController::geocoderAutocomplete'
File
- src/
Controller/ GeocoderController.php, line 51
Class
- GeocoderController
- Default controller for the geocoder_autocomplete module.
Namespace
Drupal\geocoder_autocomplete\ControllerCode
public function geocoderAutocomplete(Request $request) {
$matches = $this->geocoderService
->getAddress($request->query
->get('q'));
return new JsonResponse($matches);
}