-
-
Notifications
You must be signed in to change notification settings - Fork 200
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
Added option to override the output layer name #97
Conversation
@thomersch thanks for the PR. I have been looking through it and I have a few comments:
Let me know what you think. |
Though the PR looks good overall, I agree with @ARolek that we don't need to change the Also, the |
Thanks for the valuable feedback :) Totally agree with you that that MVTLayer shouldn't get too bloated. Nevertheless I think the one of the problems is that there is no separation of concerns: The MVTLayer implementation handles database functionality and output in one method. Though I am not sure how to solve this nicely.
I've looked into it, but as far as I see, What I would suggest is decoupling this and handling the layer name outside, after the layer assembly step. I will push some changes shortly.
This is already reflected and rather clear in the capabilities call: "layers": [
{
"maxzoom": 14,
"minzoom": 11,
"name": "roads",
"provider_layer": "roads",
"tiles": [
"http://localhost:6768/maps/foobar/roads/{z}/{x}/{y}.pbf"
]
},
{
"maxzoom": 10,
"minzoom": 8,
"name": "roads",
"provider_layer": "roads_gen0",
"tiles": [
"http://localhost:6768/maps/foobar/roads/{z}/{x}/{y}.pbf"
]
}
] @gdey Do you think we need to make this more explicit?
@ARolek I don't think I quite understand: Do you mean inside |
@thomersch enjoying the discussion here. It's nice to get some feedback and review on the design thus far.
Data providers are passed a Regarding the The newest solution you have proposed does look pretty good. We would need some additional error checking during the config parsing to make sure that no two layers with the same name have overlapping zoom. This check would also address #81. |
I checked Maputnik, but it doesn't even call
Good idea, will try to find some time in the next days. |
Adding a tegola source to Maputnik requires a link to a TopoJSON endpoint describing the map. Since tegola can support multiple maps we have a server level http://tegola.cfapps.io/capabilities/bonn_osm.json I just want to make sure that if we were to return two layers with the same name but different zoom levels this would not break Maputnik (or any other client side renderer). I'm also still considering combining layers with the same name and combining their min / max zoom levels. For example: name: roads name: roads would become: name: roads Note the gap at zoom level 6. |
@thomersch This has been implemented in the v0.4.0 branch. I leveraged a lot of your ideas and implemented a bunch of our discussion. Thanks for the help on this feature. |
An attempt on building the issue discussed in #94.
What I did here is adding the possibility to specify an additional
name
for eachmaps.layer
. If none is specified, it is ignored and generated fromprovider_layer
as it was. Existing configurations are unaffected this way.Because the data source name was also used as the output name in the tile, I changed the
MVTLayer
method to have to be able to take distinct strings.I tried to make the changes as simple as possible, I hope this is acceptable for you. If you have any feedback, I'd love to hear it.