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

derive width and height from feature property

Open andrewharvey opened this issue 7 years ago • 3 comments
trafficstars

The accessible elements currently have a fixed width and height given in the plugin options. It would be nice to set from an expression evaluated per feature.

For example if you had a circle layer with variable circle-radius you could ensure the accessible element had the same width/height as the circle, so the focus style would match what's on the screen.

andrewharvey avatar Apr 29 '18 01:04 andrewharvey

It looks like this has been fixed already https://github.com/mapbox/mapbox-gl-accessibility/blob/495365359af4870c5feb6b234b7ddaeb4d874177/index.js#L55-L68

orangemug avatar May 16 '18 17:05 orangemug

It looks like this has been fixed already

That's for the source geometry only, it doesn't take into account the paint/layout properties on the layer which create a rendered feature which has a different box to the source geometry.

andrewharvey avatar May 17 '18 00:05 andrewharvey