mapbox / mapbox/mapbox-gl-leaflet

Click,Mousemove and other event doesn't work

Open
#163 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
546
Forks
148
PR merge metrics
No merged PRs in 30d

Description

I want to display all the landmarks on a spherical map and display some information I want to display after clicking, but the click event on mapboxMap does not work, only the click event on L.map is useful, but I can't get the spherical landmark information on this layout. I hope to get help to get the click event of mapboxMap.

I did see some closed threads but none of them helped me, I put the original mapbox-gl-leaflet.js in a fiddle for your convenience

Fiddle:https://jsfiddle.net/xnathanh/cbnoteLs/104/

other event in line: 458
click event in line: 545

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 behavior in the linked JSFiddle, then inspect mapbox-gl-leaflet.js around lines 458 and 545 where the other event handling and click event are referenced. Compare click and mousemove propagation between mapboxMap and L.map; done means clicks expose the spherical landmark information through mapboxMap as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.