浏览代码

Ajout provider geocoder

feature/export_comptable
Guillaume 4 年前
父节点
当前提交
b58903888c
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. +11
    -0
      ShopBundle/Services/Utils.php

+ 11
- 0
ShopBundle/Services/Utils.php 查看文件

@@ -7,6 +7,8 @@ use Doctrine\ORM\EntityManagerInterface;
use EasyCorp\Bundle\EasyAdminBundle\Configuration\ConfigManager;
use Geocoder\Model\Coordinates;
use Geocoder\Provider\Addok\Addok;
use Geocoder\Provider\GoogleMaps\GoogleMaps;
use Geocoder\Provider\Nominatim\Nominatim;
use Geocoder\Query\GeocodeQuery;
use Geocoder\Query\ReverseQuery;
use Lc\ShopBundle\Context\ImageInterface;
@@ -266,7 +268,16 @@ class Utils
public function getGeocoderProvider()
{
$symfonyClient = new HttplugClient();

/* API du gouvernement */
$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 ;
}


正在加载...
取消
保存