I’ve been using geolocation 8.x-1.12 for a while now. I have a REST route that gets a view with my exposed form and returns the results.
Previously I did:
$plugin = Drupal::service('plugin.manager.geolocation.geocoder');
$geocoder = $plugin->getGeocoder('google_geocoding_api');
$geocode = $geocoder->geocode($zip_code);
$view = Views::getView('local_pharmacies');
$view->setDisplay('block_1');
$exposed = [
'field_geolocation_proximity-lat' => $geocode['location']['lat'], // No longer exists in 3.x
'field_geolocation_proximity-lng' => $geocode['location']['lng'], // No longer exists in 3.x
'field_geolocation_proximity' => "50",
];
$view->setExposedInput($exposed);
$view->preExecute();
$view->execute();
I updated to 8.x-3.7 because I plan to upgrade to D9 soon. The above is no longer working. I think because field_geolocation_proximity-lat and field_geolocation_proximity-lng no longer exist. I tried diving into the source as well as kinting form alters to figure out how to properly set the coordinates but I cannot figure it out. Any ideas?