-
Notifications
You must be signed in to change notification settings - Fork 117
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
Handling duplicately named vtile source layers / Ability to filter features on source #20
Comments
Could something like this work? #buildings {
polygon-opacity:0.5;
}
#data-virginia.buildings {
polygon-fill:red;
}
#data-DC.buildings {
polygon-fill:blue;
} To me this is more logical. Just seems backwards specifying source inside layer. Of course I'm looking at this with very ignorant eyes so feel free to tell me why this is an idiotic suggestion :) |
@ccarse I'd prefer avoiding repurposing labels like that. If @springmeyer yes, since layer names are (typically) not under the cartographers control, there's going to be conflicts. If there's another magic attribute keyword then we need to be careful about confusions with attributes of that layer (e.g. if the layer has name,population,source attributes) Is there some CSS-ish way to approach it, using descendant selectors? For example, something like this:
could become
It's of course stretching things slightly, since ids are supposed to be unique and don't need such scoping, but it could also open up more complex behaviour like attaching classes to sources. |
Here's the scenario we ran into with kartotherian - we pre-generate vector tiles as PBFZs, but sometimes our map designer changes one or two layers (SQL queries), so instead of re-running ~15 SQL queries for all layers, we want to run just the changed ones, merge them with the existing tile -- overriding the changed layers, or deleting them if there was no result), and saving the new tile. The result tile source (unfinished, not tested) uses the method I described in the GIS stackexchange post -- copying one layer at a time via JSON to a new tile:
|
This has been changed as part of the v2 specification (https://github.com/mapbox/vector-tile-spec/). It is now no longer valid to have two layers of the same name within a vector tile. |
Compositing vtiles requires a decision on how to handle layer names within and across vtiles that might clash or be duplicates. The current plan is to allow duplicate names / render everything, but allow calling applications to differentiate (say for styling) the features that come from
mapnik::vector::tile_datasource
.So, two vtiles composted together that both have a
buildings
layer but come from difference tile sources could be differentiated like:Where
source
or some other magic attribute keyword would report the name of the vtile as originally passed to the compositing code:The text was updated successfully, but these errors were encountered: