Update changelog and readme

This commit is contained in:
2024-09-26 10:41:56 +01:00
parent 412c4eb579
commit 9246f74117
2 changed files with 9 additions and 1 deletions

View File

@@ -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.