bazinga_geocoder:
  providers:
    addok:
      factory: App\Geography\ProviderFactory\AddokFactory
      # cache: 'app.simple_cache'
      # cache_lifetime: 3600
      locale: 'fr'
      aliases:
        - Addok
      options:
        uri: '%env(SIG_GEOCODER_MAIN_URI)%'
      plugins:
        - "Georouter.query_data_plugin"
        
    gmaps:
      factory: App\Geography\ProviderFactory\GoogleMapsFactory
      # cache: 'app.simple_cache'
      # cache_lifetime: 3600
      aliases:
        - GMaps
      options:
        api_key: '%env(GEOCOMPLETE_API_KEY_GMAPS)%'

    locationiq:
      factory: App\Geography\ProviderFactory\LocationIQFactory
      # cache: 'app.simple_cache'
      # cache_lifetime: 3600
      locale: 'fr'
      aliases:
        - LocationIQ
      options:
        api_key: '%env(GEOCOMPLETE_API_KEY_LOCATION_IQ)%'
      plugins:
        - "Georouter.query_data_plugin"
    
    pelias_autocomplete:
      factory: App\Geography\ProviderFactory\PeliasAutocompleteFactory
      # cache: 'app.simple_cache'
      # cache_lifetime: 3600
      locale: 'fr'
      aliases:
        - PeliasAutocomplete
      options:
        uri: '%env(SIG_GEOCODER_SECONDARY_URI)%'
      plugins:
        - "Georouter.query_data_plugin"

    pelias_search:
      factory: App\Geography\ProviderFactory\PeliasSearchFactory
      # cache: 'app.simple_cache'
      # cache_lifetime: 3600
      locale: 'fr'
      aliases:
        - PeliasSearch
      options:
        uri: '%env(SIG_GEOCODER_SECONDARY_URI)%'
      plugins:
        - "Georouter.query_data_plugin"

    # List of providers
    chain:
      factory: Bazinga\GeocoderBundle\ProviderFactory\ChainFactory
      options:
        # This is the order in which Providers will be called. Note that it stops its iteration when a provider returns a result.
        services: ['@Addok','@PeliasAutocomplete','@PeliasSearch','@GMaps']
        # services: ['@Addok','@PeliasAutocomplete','@PeliasSearch','@LocationIQ','@GMaps']
        # services: ['@LocationIQ','@PeliasAutocomplete','@PeliasSearch','@GMaps']
        