Repository navigation
Image expression - #8684
Image expression#8684
Conversation
|
cc @mapbox/map-design-team @mapbox/studio @kkaefer |
There was a problem hiding this comment.
@ryanhamley Just a few minor comments.
Question, do you plan to add support for default image that is not in a sprite sheet? Or, would it be handled via onStyleImageMissing callback?
Another question is that, what happens when developer removes image from a sprite sheet while worker is parsing tile? It looks like availableImages and images that are in sprite sheet could be out-of-sync and image operator would not fall-back to default value (e.g., when used in coalesce).
8a1401a to
0b5daae
Compare
|
|
||
| register('ImagePosition', ImagePosition); | ||
| register('ImageAtlas', ImageAtlas); | ||
|
|
There was a problem hiding this comment.
nit: no change needed
There was a problem hiding this comment.
This was automatically added by my editor. It's pretty standard to end files with a new line isn't it? Most of our other files have a trailing new line.
@alexshalamov I'm adding an additional step in a follow-up PR to determine the first requested image in an expression (reading from left to right and assuming that the first image requested is the "most desirable" option) which evaluates to
I think this is analogous to what happens if you asynchronously load an image with |
Launch Checklist
This PR implements a new
Imageexpression type andimageoperator as discussed in #8052 particularly #8052 (comment)imageexpression operator to allow for determining an image's availability before requesting it@mapbox/studioand/or@mapbox/maps-designif this PR includes style spec changes@mapbox/gl-nativeif this PR includes shader changes or needs a native portChangelog
Add
imageexpression operator which determines if a requested image is available in the map's style or not