|
|
|
|
|
|
|
|
use EasyCorp\Bundle\EasyAdminBundle\Configuration\ConfigManager; |
|
|
use EasyCorp\Bundle\EasyAdminBundle\Configuration\ConfigManager; |
|
|
use Geocoder\Model\Coordinates; |
|
|
use Geocoder\Model\Coordinates; |
|
|
use Geocoder\Provider\Addok\Addok; |
|
|
use Geocoder\Provider\Addok\Addok; |
|
|
|
|
|
use Geocoder\Provider\GoogleMaps\GoogleMaps; |
|
|
|
|
|
use Geocoder\Provider\Nominatim\Nominatim; |
|
|
use Geocoder\Query\GeocodeQuery; |
|
|
use Geocoder\Query\GeocodeQuery; |
|
|
use Geocoder\Query\ReverseQuery; |
|
|
use Geocoder\Query\ReverseQuery; |
|
|
use Lc\ShopBundle\Context\ImageInterface; |
|
|
use Lc\ShopBundle\Context\ImageInterface; |
|
|
|
|
|
|
|
|
public function getGeocoderProvider() |
|
|
public function getGeocoderProvider() |
|
|
{ |
|
|
{ |
|
|
$symfonyClient = new HttplugClient(); |
|
|
$symfonyClient = new HttplugClient(); |
|
|
|
|
|
|
|
|
|
|
|
/* API du gouvernement */ |
|
|
$provider = new Addok($symfonyClient, 'https://api-adresse.data.gouv.fr') ; |
|
|
$provider = new Addok($symfonyClient, 'https://api-adresse.data.gouv.fr') ; |
|
|
|
|
|
|
|
|
|
|
|
/* Google Maps */ |
|
|
|
|
|
//$provider = new GoogleMaps($symfonyClient, null, '') ; |
|
|
|
|
|
|
|
|
|
|
|
/* Nominatim : OpenStreetMap */ |
|
|
|
|
|
//$provider = Nominatim::withOpenStreetMapServer($symfonyClient, 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion'); |
|
|
|
|
|
|
|
|
return $provider ; |
|
|
return $provider ; |
|
|
} |
|
|
} |
|
|
|
|
|
|