bmlt-enabled / bmlt-workflow

supports automation of meeting adds/changes/deletes
Other
4 stars 3 forks source link

Feature Request: Allow geocode disabling #103

Closed paulnagle closed 2 years ago

paulnagle commented 2 years ago

The google maps geocoding doesnt work very well in Ireland, so we have it disabled on our BMLT Server using the setting

$auto_geocoding_enabled = false;

in our auto_config.inc.php file. It actually causes a lot of issues when enabled as all of the meetings get incorrect co-ordinates assigned to them.

It would be great if we could also disable geocoding in the bmlt-workflow plugin as well, as it is proving to be a barrier to implementation for us. Every meeting change gets the error message

{
  "code":"bmltwf",
  "message":"Could not geolocate meeting address. Please try amending the address with additional\/correct details.",
  "data":null
}

I tried enabling geocoding on our BMLT, but I still got the same errors.

The request is either to allow/disallow auto_geocoding based on the BMLT $auto_geocoding_enabled setting, or to make it configurable in the plugin settings page.

This is the (I think) the final issue before we can go live with https://updates.nasouth.ie

nigel-bmlt commented 2 years ago

I should be able to fix this by making it optional in the plugin. It will also be something I can try and get updated in the new admin api so I can tell if that setting is enabled or not remotely. Fix coming shortly.

nigel-bmlt commented 2 years ago

@paulnagle when I switch off auto geocoding, we're still able to save meetings with no lat/long, which then makes them invalid and not show up in crouton. I can make them always save with the search_spec_map_center lat/long which appears to be the way the admin console handles it. Is this the desired behaviour and does that mean you don't use map location features in your region?

paulnagle commented 2 years ago

Thanks @nigel-bmlt Setting the default lat/long to be the search_spec_map_center lat/long for a new meeting would be perfect. For an update to an existing meeting, the lat/long should be left unchanged.

We can then manually correct the map position if needed in the regular BMLT admin interface after the update from bmlt-workflow-plugin is applied.

jbraswell commented 2 years ago

@nigel-bmlt in the new API you can use the http PATCH method for partial updates. If you exclude the latitude and longitude fields from the payload, they won't be updated.

nigel-bmlt commented 2 years ago

fixed in 1.0.9