This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alexshalamov
force-pushed
the
alexshalamov_images_in_labels
branch
6 times, most recently
from
November 18, 2019 12:17
9382da7
to
fa76f9a
Compare
alexshalamov
force-pushed
the
alexshalamov_images_in_labels
branch
2 times, most recently
from
November 18, 2019 13:50
f9a2f06
to
9951eba
Compare
alexshalamov
added
the
⚠️ DO NOT MERGE
Work in progress, proof of concept, or on hold
label
Nov 18, 2019
alexshalamov
force-pushed
the
alexshalamov_images_in_labels
branch
2 times, most recently
from
November 20, 2019 13:13
7c5e0a4
to
d9790a5
Compare
alexshalamov
removed
the
⚠️ DO NOT MERGE
Work in progress, proof of concept, or on hold
label
Nov 20, 2019
tmpsantos
reviewed
Nov 20, 2019
chloekraw
added
the
needs changelog
Indicates PR needs a changelog entry prior to merging.
label
Nov 20, 2019
alexshalamov
force-pushed
the
alexshalamov_images_in_labels
branch
3 times, most recently
from
November 25, 2019 09:38
3dcd06c
to
2032a10
Compare
alexshalamov
removed
the
needs changelog
Indicates PR needs a changelog entry prior to merging.
label
Nov 25, 2019
tmpsantos
approved these changes
Nov 26, 2019
pozdnyakov
reviewed
Nov 27, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great overall!
Changelog entry
|
alexshalamov
force-pushed
the
alexshalamov_images_in_labels
branch
from
November 28, 2019 09:14
2032a10
to
acf1013
Compare
@tmpsantos
|
alexshalamov
force-pushed
the
alexshalamov_images_in_labels
branch
4 times, most recently
from
November 28, 2019 20:24
c3fdec2
to
dfeb7d7
Compare
pozdnyakov
approved these changes
Nov 29, 2019
alexshalamov
force-pushed
the
alexshalamov_images_in_labels
branch
from
December 2, 2019 10:09
dfeb7d7
to
caee9ce
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Images in labels (text-field)
This PR is an implementation of a proposal in mapbox/mapbox-gl-js#8604.
Style interface
Images could be added to a label via
image
expression. For example:Implementation details
Possible follow-up improvements
layoutTextSize
that was used during layout and pass it as a uniform when label is rendered. Then, image could be scaled according to the size that is interpolated in a shader.image-scale
option might be added to a formatted image section, so that designers can have more control over the size of an image.Tests
Expression and render tests are in mapbox/mapbox-gl-js#8904, unit tests are in this PR.