Mapbox-gl-js: feature request: adding {"rotation-alignment": "map"} option to mapboxgl.Marker()

Created on 10 Jan 2017  路  5Comments  路  Source: mapbox/mapbox-gl-js

Hello.
For drawing arrowhead markers, I believe that mapboxgl.Marker() should have {"rotation-alignment": "map"} option. See the following examples:

https://gist.github.com/kkdd/928c67088c2debae4204bef55c170106

apboxgl marker

feature

Most helpful comment

We still need the ability to set marker's direction.

All 5 comments

@mourner
This feature make sense.

Maybe worth implementing in the core. However this would be easy enough to do on the application side 鈥斅爏ubscribing to the move event and rotating the marker element with a CSS transform.

But if you don't have "icon-rotation-alignment": "map" then when rotate map's camera, the marker always face to camera like billboard, and rotate the marker then won't work correctly, no ?

We still need the ability to set marker's direction.

any update of this?

Was this page helpful?
0 / 5 - 0 ratings