-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Placeholder areas #4173
Comments
From @1ec5 on January 20, 2017 16:37 Annotations are specific to the native SDKs are aren't mentioned in this specification. Could the native SDKs (or mbgl) address the problem of inserting layers above annotations (but not the broader idea of placeholder areas) by keeping track of the bottommost annotation layer and always inserting before it? |
From @1ec5 on January 20, 2017 16:40 Note that the automatically added point annotation layer is already used as a placeholder of sorts for view-backed annotations that are (due to platform limitations) always rendered atop the entire map, regardless of any layers that may sit above the point annotation layer in the style. |
From @andrewharvey on January 25, 2017 4:30 This could be useful in the GL JS context as well to put client side layers (such as annotations; basically extra layers in the application code not from the Studio Style) below the labels from the Style. With the default Mapbox styles, this usually means for Streets a beforeLayer of What about a "placeholder" layer type. So you could for example add an |
From @1ec5 on January 25, 2017 6:44 Since a style JSON file is expected to be platform-agnostic, it shouldn’t assume support for a platform-specific feature – annotations in this case, but the A no-op “divider” layer could be useful for a developer to cede control over the exact z-ordering of a runtime-inserted layer to their style designer. At runtime, the developer would insert above or below the divider (doesn’t matter which) without replacing the divider. However, I don’t think the SDK could rely on the designer to add a dedicated placeholder or divider layer for something like annotations that has to work in every style (even a barren style with no layers or sources). |
From @jfirebaugh on January 26, 2017 21:34 Previously: mapbox/mapbox-gl-styles#34, mapbox/mapbox-gl-styles#258. |
This is a very nice thing to have and we need something like this on the Qt SDK. When adding native views to a style, specially route lines, you often want it to be under the labels. The SDK could query for a specific mark and if it exists, add the layer before it, otherwise on top of the topmost layer. Having a standard Studio could implement the groups with a
|
Noting that "nested styles" is an alternative design that addresses partially overlapping concerns. |
From @kkaefer on January 20, 2017 15:1
I'm proposing to introduce placeholder areas: Annotations are currently located in a layer that is above all other layers, meaning that annotations will always cover existing features, such as labels. Similarly, when adding new layers, you'll have to explicitly name an existing layer as the beforeLayerID parameter to have the layer inserted below that layer.
Placeholder areas would be named regions within a style that can be referenced when inserting new layers, or adding annotations (i.e. every placeholder area would have its own annotation layer). An example JSON excerpt would look like this:
We'd have to establish some convention for style authors to follow, but it'll help the common case of a user inserting some annotations that cover up the labels.
There might be some way we could reuse Studio metadata (which has layer groups) to accomplish this as well.
/cc @lucaswoj @kronick @jfirebaugh @1ec5 @tmcw
Copied from original issue: mapbox/mapbox-gl-style-spec#658
The text was updated successfully, but these errors were encountered: