Skip to content
Snippets Groups Projects

Issue #3406303 by ekes, progga, itamair: Pass additional parameters to geocoders

Merged Issue #3406303 by ekes, progga, itamair: Pass additional parameters to geocoders
2 unresolved threads
2 unresolved threads
Files
13
@@ -11,6 +11,9 @@ use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\Plugin\PluginFormInterface;
use Drupal\geocoder\Traits\ConfigurableProviderTrait;
use Geocoder\Collection;
use Geocoder\Query\GeocodeQuery;
use Geocoder\Query\ReverseQuery;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException;
use Psr\Http\Client\ClientInterface;
@@ -106,4 +109,20 @@ abstract class ConfigurableProviderUsingHandlerWithAdapterBase extends ProviderU
return parent::doReverse($latitude, $longitude);
}
/**
* {@inheritdoc}
*/
protected function doGeocodeQuery(GeocodeQuery $query): Collection {
$this->throttle->waitForAvailability($this->pluginId, $this->configuration['throttle'] ?? []);
return parent::doGeocodeQuery($query);
}
/**
* {@inheritdoc}
*/
protected function doReverseQuery(ReverseQuery $query): Collection {
$this->throttle->waitForAvailability($this->pluginId, $this->configuration['throttle'] ?? []);
return parent::doReverseQuery($query);
}
}
Loading