thomasbandit / locationiq-nominatim-provider
Geocoder Nominatim adapter
5.1.1
2019-08-14 07:26 UTC
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
type
property viawithType
orgetType
functions whereas the LocationIQ Geocode Provider doesn't. I went an extra step further and also provided theextraDetails
andnameDetails
properties; both can be separately disabled..
Differences to the LocationIQ Geocode Provider
- This calls the LocationIQ requesting a JSON response than XML.
- The
type
,extraDetails
andnameDetails
properties have been added to the Address model. - There are two extra arguments in the Laravel config, both are
false
by default:
'providers' => [
LocationIqNominatim::class => [
env('LOCATION_IQ_API_KEY'),
true, // Include extraDetails
true, // Include nameDetails
],
],