Skip to content
This repository has been archived by the owner on Apr 10, 2018. It is now read-only.

icon-rotate and feature field #320

Closed
wheredoesyourmindgo opened this issue Jul 22, 2015 · 4 comments
Closed

icon-rotate and feature field #320

wheredoesyourmindgo opened this issue Jul 22, 2015 · 4 comments

Comments

@wheredoesyourmindgo
Copy link

Is there a way to use a numerical value via a field property to rotate a symbol using "icon-rotate"? Maybe something similar to "text-field": "{MY_FIELD}" to populate text values for icons.

@jfirebaugh
Copy link
Contributor

Not currently. This falls into the category of "data-driven styling" -- see #249.

@wheredoesyourmindgo
Copy link
Author

Thanks @jfirebaugh. If anyone is looking for a whacky work-around for this I've been just using imagemagick to generate 360 rotated versions of the same symbol, and stuffing those into a sprite sheet using gl-style-spritify from mapbox-gl-style-spec. At that point you can simply use icon-image in the layer definition, suffixed with the relevant token.

@jiggy1com
Copy link

@wheredoesyourmindgo I think for now I'm going to have to use your solution

@EwenH
Copy link

EwenH commented Jan 15, 2017

Thanks @wheredoesyourmindgo - This is so much work for a small item (I want to show the wind direction) however your process sounds logical.

I shall be some time...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants