Skip to content
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

Implement format options for images in labels #9403

Open
strech345 opened this issue Mar 11, 2020 · 4 comments
Open

Implement format options for images in labels #9403

strech345 opened this issue Mar 11, 2020 · 4 comments

Comments

@strech345
Copy link

I dont find any documentation about the format expression for the text-field.
It is possible to change parameters for text. But is it also possible to edit image parameters like scale or color?
for example:
"text-field": ["format", ["image", "/station.png"], { "image-scale": 1.2 }]

@sgolbabaei
Copy link
Contributor

@strech345 Thanks for reaching out. As of now, it is not possible to format images and edit the image parameters.
This sounds like a good addition. Do you want to take a first stab at it? If you are a first-time contributor, you can get started with our Contributing guidelines.

@strech345
Copy link
Author

@sgolbabaei thanks for your response.
but whats about this feature? I thought someone is working on it or it was also merged into master?
#8604

@ryanhamley
Copy link
Contributor

Hi @strech345 as of now, the only options available to the format expression are font-scale, text-font and font-color.

As noted in #8904, we may add an image-scale option in the future. The font-scale option won't affect images in labels. As for changing image colors, that would probably require SDF images which are not currently supported by the the images in labels feature. These features are not on our roadmap so we have no timeline to implement them and it's not certain we even will. There's discussion in #8904 and #8604 about some of the difficulties around implementing these features.

That said, I think it's reasonable to re-open this ticket and use it as a feature request for image formatting options.

@ryanhamley ryanhamley reopened this Mar 11, 2020
@ryanhamley ryanhamley changed the title Question: Change Format Parameter of Icon Label Implement format options for images in labels Mar 11, 2020
@yuanyuan-xy
Copy link

Is it settled now?

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

No branches or pull requests

4 participants