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

Own parameter #67

Open
weatherc opened this issue Nov 28, 2016 · 2 comments
Open

Own parameter #67

weatherc opened this issue Nov 28, 2016 · 2 comments

Comments

@weatherc
Copy link

Are there a way to "send" an own parameter to tessera?
In my case do i run weathermaps with multiple layers of same variable with different hour-number, like temperature_2. So i'm looking for a way to have only one definition for temperature in the config file instead of needing to define it say 72 times where the only difference would be only that hour-number (and same for all other variables).
Something like:

"/temperature":{
"source": "mapnik:///home/node/temperature_{{hour}}.xml",
"cors": true
}

In Leaflet could it then be setup like:
/tilelive/temperature/2/{z}/{x}/{y}.png

@mojodna
Copy link
Owner

mojodna commented Nov 28, 2016

That's a great idea. My first instinct would be to implement a custom (but very simple) tilelive module to handle the dynamic configuration files, but there's no way to handle prefixes (the hour number). My second would be to build a custom tile server similar to either https://github.com/stamen/sm2 or https://github.com/fieldpapers/fp-tiler.

However, this is straightforward and flexible enough that I think it does belong in core.

Slightly refined proposed syntax (so it's clear where hour could come from):

"/temperature/:hour": {
  "source": "mapnik:///home/node/temperature_{{hour}}.xml",
  "cors": true
}

@weatherc
Copy link
Author

That sounds great. The refined syntax looks just fine.

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

2 participants