mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

map.addInteraction not handle modelLayer

Open GeoDaoyu opened this issue 3 weeks ago • 2 comments

mapbox-gl-js version

v3.17.0

Browser and version

Chrome Version 142.0.7444.176 (Official Build) (arm64)

Expected behavior

map.addInteraction can handle both geojsonLayer & modelLayer

Actual behavior

map.addInteraction can handle geojsonLayer, but not handle modelLayer.

Link to the demonstration

https://jsbin.com/lobacez/edit?html,console,output

Steps to trigger the unexpected behavior

No response

Relevant log output


GeoDaoyu avatar Dec 04 '25 07:12 GeoDaoyu

not a feature, it's a bug. It worked in v3.16.0-beta.2, link to https://github.com/mapbox/mapbox-gl-js/issues/13596

GeoDaoyu avatar Dec 04 '25 10:12 GeoDaoyu

I found the source is GeoJsonSource and return {} in https://github.com/mapbox/mapbox-gl-js/blob/main/3d-style/style/style_layer/model_style_layer.ts#L94

GeoDaoyu avatar Dec 04 '25 10:12 GeoDaoyu

I am seeing the same issue. I cannot get features on click.

alienatorZ avatar Dec 12 '25 20:12 alienatorZ

Thanks for the report and the comments, we're investigating the issue — definitely a bug.

mourner avatar Dec 12 '25 21:12 mourner