Describe the bug
In the WorkBench, clicking the "GEOLocate" button opens the GEOLocate dialog, but all fields (locality string, country, state, county) are empty — even when those columns are mapped and contain values. The dialog only populates with data when the latitude1 and longitude1 columns have non-empty values.
This can somewhat defeat the purpose of GEOLocate since users typically want to use GEOLocate to obtain coordinates from a locality description, not to refine existing coordinates.
To Reproduce
Steps to reproduce the behavior:
- In the Workbench, upload a dataset that has columns mapped to
locality.latitude1, locality.longitude1, locality.localityname, and geography ranks (locality.geography.$Country.name, etc.)
- Leave the
latitude1 and longitude1 cells empty, but fill in the locality and geography cells with real values
- Select one or more rows and click the "GEOLocate" button in the toolbar
- Observe that the GEOLocate dialog opens with all fields (country, state, county, locality) empty
Expected behavior
The GEOLocate dialog should receive the available locality description data (country, state, county, locality name) even when latitude/longitude are empty. The form-based GEOLocate plugin (FormPlugins/GeoLocate.tsx) already behaves correctly. It sends geography and locality data without requiring coordinates.
Additional context
Root cause: In helpers.ts, getLocalityData() checks requiredLocalityColumns (['locality.latitude1', 'locality.longitude1']) and returns false if either is empty. In WbToolkit/GeoLocate.tsx, getGeoLocateData() uses getLocalityCoordinate(...) || {} — the false || {} fallback produces an empty object, discarding all country/state/county/locality data.
The form-based plugin version does not have this issue — its getGeoLocateData() in FormPlugins/GeoLocate.tsx correctly sends geography data independently of coordinates.
Describe the bug
In the WorkBench, clicking the "GEOLocate" button opens the GEOLocate dialog, but all fields (locality string, country, state, county) are empty — even when those columns are mapped and contain values. The dialog only populates with data when the
latitude1andlongitude1columns have non-empty values.This can somewhat defeat the purpose of GEOLocate since users typically want to use GEOLocate to obtain coordinates from a locality description, not to refine existing coordinates.
To Reproduce
Steps to reproduce the behavior:
locality.latitude1,locality.longitude1,locality.localityname, and geography ranks (locality.geography.$Country.name, etc.)latitude1andlongitude1cells empty, but fill in the locality and geography cells with real valuesExpected behavior
The GEOLocate dialog should receive the available locality description data (country, state, county, locality name) even when latitude/longitude are empty. The form-based GEOLocate plugin (
FormPlugins/GeoLocate.tsx) already behaves correctly. It sends geography and locality data without requiring coordinates.Additional context
Root cause: In helpers.ts,
getLocalityData()checksrequiredLocalityColumns(['locality.latitude1', 'locality.longitude1']) and returnsfalseif either is empty. InWbToolkit/GeoLocate.tsx,getGeoLocateData()usesgetLocalityCoordinate(...) || {}— thefalse || {}fallback produces an empty object, discarding all country/state/county/locality data.The form-based plugin version does not have this issue — its
getGeoLocateData()inFormPlugins/GeoLocate.tsxcorrectly sends geography data independently of coordinates.