mapbox / mapbox/mapbox-gl-geocoder

Geocoder does not show marker and fly to result location when it is added to HTMLElement.

Open
#426 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged docs improvement
Dominant language
JavaScript
Stars
388
Forks
181
PR merge metrics
No merged PRs in 30d

Description

**mapbox-gl-geocoder version**: v4.7.0
**mapbox-gl-js version**: v2.3.1

**browser**: Chrome, Firefox and Edge

### Steps to Trigger Behavior

1. Create geocoder and add to the map.
2. Search location and click a result.
3. Maker is added at the result location and fly to the location.
4. Add the geocoder to HTMLElement.
5. Search location and click a result.
6. Nothing happens. No marker, no fly to.

### Link to Demonstration

[https://jsbin.com/pokuhabayo/edit?html,output](https://jsbin.com/pokuhabayo/edit?html,output)

### Expected Behavior

Show marker at the result location and fly to the location.

### Actual Behavior

No marker, no fly to.

If this behavior is intended, I request to provide option to enable marker and fly to function.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using the linked JSBin and the documented steps, comparing geocoder behavior when added to the map versus an HTMLElement. Trace the result-selection handling for the HTMLElement case and verify that completion shows a marker and flies to the result location, or that an explicit option is provided if this behavior is intentional.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.