thomasbandit / locationiq-nominatim-provider
Geocoder Nominatim adapter
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 8
pkg:composer/thomasbandit/locationiq-nominatim-provider
Requires
- php: ^7.0
 - geocoder-php/common-http: ^4.1
 - willdurand/geocoder: ^4.0
 
Requires (Dev)
- geocoder-php/provider-integration-tests: ^1.0
 - php-http/curl-client: ^1.7
 - php-http/message: ^1.0
 - phpunit/phpunit: ^6.5 || ^7.5
 
Provides
README
(Based on Nominatim Geocoder provider)
This is a quick fork of the Nominatim Geocode Provider to use the LocationIQ service and append the type, extraDetails and nameDetails properties to the default Address data.
Install
composer require thomasbandit/locationiq-nominatim-provider:dev-master
Why not use the LocationIQ Geocode Provider?
- The Nominatim Geocode Provider enables use of the 
typeproperty viawithTypeorgetTypefunctions whereas the LocationIQ Geocode Provider doesn't. I went an extra step further and also provided theextraDetailsandnameDetailsproperties; both can be separately disabled.. 
Differences to the LocationIQ Geocode Provider
- This calls the LocationIQ requesting a JSON response than XML.
 - The 
type,extraDetailsandnameDetailsproperties have been added to the Address model. - There are two extra arguments in the Laravel config, both are 
falseby default: 
    'providers' => [
        LocationIqNominatim::class => [
            env('LOCATION_IQ_API_KEY'),
            true, // Include extraDetails
            true, // Include nameDetails
        ],
    ],