-
Notifications
You must be signed in to change notification settings - Fork 1
Ordnance Survey Places geocoder plugin #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is a plugin for Drupal's Geocoder module. Useful for address lookup. The actual PHP Geocoder for the OS Places API is provided by the localgovdrupal/localgov_os_places_geocoder_provider package. This plugin is a Drupal specific wrapper over the OS Places PHP Geocoder. API details: https://osdatahub.os.uk/docs/places/overview
Drupal schema definition for our OS Places Drupal plugin configuration.
|
I'm just trying this, but it wont appear. |
Updated the PHP Geocoder class name to match the latest.
|
Hi Andy, |
|
Thanks @Adnan-cds however this is still not working becuase the geocoder gets installed in localgov_os_places_geocoder_provider not OsPlacesGeocoder. Even with localgov_geo enabled and this branch checked out and localgovdrupal/localgov_os_places_geocoder_provider intalled via composer require, I am not seeing Localgov OS Places as a provider in the drop down menu to add a geocoder provider at /admin/config/system/geocoder/geocoder-provider |
That's worrying Andy. Good morning by the way.
This should be taken care of by composer's autoloader declaration. In any case, try
Assuming you have already cleared the Drupal cache after fetching the latest code, may I ask if this is happening in a fresh LocalGov site or an existing site? |
|
@Adnan-cds So I did this on a fresh install and that worked ok. |
|
Update, using the example code that is included in the module I get this error So its the class itself that is not being found. |
Thanks for persisting with this Andy. Could you please check the vendor/composer/autoload_psr4.php file for mentions of LocalgovDrupal. In my local development site, I can see two mentions: |
|
Thanks @Adnan-cds Yes I have both those entries. I think this may have been a Lando issue. |
|
The plugin was detected, but not found, that'd be new. But (and iirc lando does have apcu enabled):- https://www.drupal.org/project/geocoder/issues/3153678#comment-14203727 |
|
OK so this is good for me I think. |
ekes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending confirmation about issues about namespace / plugin appearing - good.
|
Yes this is solved, might need some documentation update though. I had to do a Lando rebuild to get it to apply. |
Adding basic description and pitfalls of using the OS Places geocoder plugin.
|
Hi Andy, I have added a new section in the README about this new OS places geocoder plugin. Please let me know if this will do. |
|
Merging as per December 13th Merge Monday. |
|
Hi Andy, Ekes, thanks for getting this in :) |
This is a plugin for Drupal's Geocoder module. Useful for UK address lookup.
I am bringing these files from the localgov_forms module. This one is blocked by another pull request for the newly created localgovdrupal/localgov_os_places_geocoder_provider composer package.
Test steps (for now)
Now add the Localgov OS Places Geocoder plugin from /admin/config/system/geocoder/geocoder-provider. This step, unfortunately, asks for an API key.
I am marking this pull request as Draft until localgovdrupal/localgov_os_places_geocoder_provider is ready.