thomasbandit/locationiq-nominatim-provider

Geocoder Nominatim adapter

5.1.1 2019-08-14 07:26 UTC

This package is auto-updated.

Last update: 2022-01-26 00:11:28 UTC


README

(Based on Nominatim Geocoder provider)

Build Status Latest Stable Version Total Downloads Monthly Downloads Code Coverage Quality Score Software License

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 via withType or getType functions whereas the LocationIQ Geocode Provider doesn't. I went an extra step further and also provided the extraDetails and nameDetails 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 and nameDetails 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
        ],
    ],