Skip to content

fix: geocoder coordinate search results not showing (#2245) - #3322

Merged
igorDykhta merged 1 commit into
keplergl:masterfrom
pierreeurope:fix/geocoder-coordinate-search-2245
Apr 4, 2026
Merged

fix: geocoder coordinate search results not showing (#2245)#3322
igorDykhta merged 1 commit into
keplergl:masterfrom
pierreeurope:fix/geocoder-coordinate-search-2245

Conversation

@pierreeurope

Copy link
Copy Markdown
Contributor

Summary

Fixes #2245

When entering coordinates directly in the geocoder search box (e.g., 3.5260, 98.6736), the marker might not appear because:

  1. Pending geocoder API call could overwrite results: If the user types a partial string that triggers the debounced mapbox geocoder, then modifies it to valid coordinates, the pending API call could overwrite the coordinate results when it resolves.

  2. Results dropdown might not be visible: The showResults state was not explicitly set to true in the coordinate path, relying on the focus handler which might not have fired.

Changes

In the coordinate detection branch of the onChange handler in geocoder.tsx:

  • Clear any pending geocoder debounce timeout to prevent stale API results
  • Explicitly set showResults to true to ensure the dropdown is visible

Testing

  1. Enable geocoder in kepler.gl
  2. Enter coordinates like 3.5260, 98.6736
  3. Verify the result appears in the dropdown
  4. Press Enter or click the result
  5. Verify the marker appears on the map at the correct location

When entering coordinates in the geocoder search box, the results
dropdown might not appear or could be overwritten by a pending
geocoder API call.

Fix by:
1. Clearing any pending geocoder debounce timeout when valid
   coordinates are detected, preventing stale API results from
   overwriting the coordinate result.
2. Explicitly setting showResults to true to ensure the dropdown
   is visible.

Signed-off-by: pierreeurope <pierre.europe@pm.me>
@igorDykhta
igorDykhta merged commit e2cc341 into keplergl:master Apr 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Geocorder Search Box in Kepler.gl Demo App - marker do not appear when searching using coordinate

2 participants