Update changelog and readme
This commit is contained in:
@@ -2,5 +2,11 @@
|
||||
|
||||
Provides an interface/trait combo to add latitude and longitude fields to an entity.
|
||||
|
||||
Also included is a `Geocoder` service which accepts a postcode and attempts to return a `GeoCoordinates` object which contains the latitude and longitude of the postcode.
|
||||
Also included is a `Geocoder` service which accepts an instance of GeocodeInterface and attempts to return a `GeoCoordinates` object which contains the object's latitude and longitude.
|
||||
|
||||
# Usage
|
||||
|
||||
Use the `GeocodeTrait` an an entity to give it latitude and longitude fields.
|
||||
|
||||
If you wish to geocode an entity you must implement the `GeocodeInterface` interface, the trait will get you most of the way there but you must manually add a `getGeocodeData()` method. The simplest implementation is to return a postcode, but you can return a string of any data if it can be used to find a location.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user