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

Supporting runtime style #26

Open
zmofei opened this issue Dec 18, 2018 · 1 comment
Open

Supporting runtime style #26

zmofei opened this issue Dec 18, 2018 · 1 comment

Comments

@zmofei
Copy link
Member

zmofei commented Dec 18, 2018

Even though vtshaver is not designing for runtime style, we still want to make efforts to make things better.

Now we have two experimental ideas. This ticket is to track the process of support runtime style.

  1. Style specific retain, we want to make some special marks in style specific, to mark which properties in a particular layer we want to use, then the vtshaver will keep the certain properties.

  2. Query properties, vtshaver well accept a param to determine which properties the user want to use, then return the shaved tiles+the certain properties. For the client side, every time user wants to change the style, the client can access tile with the certain properties in query(like vector.pbf?styl=<path to style>&keep={"country_label" : ["name_ru", "name_de", "name_es"]}).

cc w/ @springmeyer

zmofei added a commit that referenced this issue Dec 18, 2018
@zmofei
Copy link
Member Author

zmofei commented Dec 18, 2018

In b4a610f :

  1. Add supprot to read retain form style's metadata
// style.json
{
    "metadata": {
        "mapbox:retain": {
            "landuse": ["p6"],
            "water": ["all properties will already be kept so this value does not matter"],
            "test": [true]
        }
    }
}
  1. Support pass a param with properties to styleToFilters to determine with properties to keep
const style = ****
const options = {properties: {road: ['name_en']}};
var filters = shaver.styleToFilters(style, options);
  • More unit test need to add
  • Update up/down stream

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

No branches or pull requests

1 participant