From 9246f74117d1ff167f01009a7840a31ad125719b Mon Sep 17 00:00:00 2001 From: Bradley Date: Thu, 26 Sep 2024 10:41:56 +0100 Subject: [PATCH] Update changelog and readme --- CHANGELOG.md | 2 ++ README.md | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88ec09c..5766f29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## [x.x.x] xxxx-xx-xx +- Adjust how error messages are formatted +- Add getGeocodeData method to GeocodeInterface to allow for more abstraction in services - Coordinates set to 0, 0 will cause isGeocoded to return false ## [1.0.0] 2024-08-05 diff --git a/README.md b/README.md index 8f85ae7..69a3651 100644 --- a/README.md +++ b/README.md @@ -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.