-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layer event handlers are not being triggered as expected when using type raster #782
Comments
Hello, I have the same issue, no event handlers trigger when using Layer component of type "raster"
|
Same here, Mouse enter/leave and click are not triggered: <Source id="source_id" tileJsonSource={Image_SOURCE_OPTIONS} />
<Layer type="raster" id="layer_id" sourceId="source_id"
onMouseEnter={(map) => console.log('mouse enter', map)}
onMouseLeave ={(map) => console.log('mouse leave', map)}
onClick ={(map) => console.log('onclick', map)}
/> |
I got the same problem with Layer and Feature when using heatmap type. I use: |
Here is a workaround I used to avoid this bug by using a transparent GeoJSONLayer over my raster with the same size:
|
Hello everybody,
I'm trying to use the OnClick,OnMouseEnter,OnMouseLeave event handlers within the Layer component and they are not doing anything, i'm rendering images on the map using a source of type image and a layer of type raster and want to be able to click the image but when I click nothing happens! Here is how i'm implementing it:
I'm using the onClick method in the Map component as well, can this be causing the above issue?
I'm using the following versions:
react-mapbox-gl: "4.6.0"
react: "16.9.0",
The text was updated successfully, but these errors were encountered: