-
|
I tried to get around the max zoom 15 limitation (on client-side at least, 15 still includes all data) by adding different zoom level POIs to different layers in order to use maplibre layer However it seems that one handler can only add features to single layer. // - if minZoom <=15, layer will be `poi15`
// - if >15, layer will be either `poi16`, `poi17`, etc
String layer = Utils.getLayerName("poi", minZoom);
var feat = features.point(layer);However only |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
|
Can you share a full standalone example using something like https://github.com/onthegomap/planetiler-examples/blob/main/Toilets.java as a starting point? Then it is much easier to debug... |
Beta Was this translation helpful? Give feedback.
-
|
As Oliver mentioned it would help to see a minimal example. Based on what you showed though, each call to features.point or features.line creates a feature in whatever layer you specify. You can call that multiple times in a handler method too, or do shared setup on each feature in a separate method or loop. Also what zoom are you hoping to generate? It's possible to support z16 or higher, just haven't prioritized it |
Beta Was this translation helpful? Give feedback.
-
|
Sure thing: https://gist.github.com/adjourn/4ea3b00650eba6921891adbf39cc522f Just ran this minimal example within my project and I get layer @msbarry Haven't been able to test it out but I'd say 18 for trivial details like benches, trash cans, etc, maybe 19 but it might be too much. I'm not generating a whole planet, I know that it would be very impractical time and file size wise, I generate limited areas. Unfortunately I'm not advanced enough in Java yet to go start hacking or contributing to |
Beta Was this translation helpful? Give feedback.
-
|
Figured it out on second (or third) round, dumb mistake as they usually are. Cause and fix in last comment: if (sf.hasTag("barrier", "lift_gate")) { // some feature that has >15 zoom level
minZoom = 16;
}
// - if minZoom <=15, layer will be "poi15"
// - if >15, layer will be either "poi16", "poi17", etc
String layer = Utils.getLayerName("poi", minZoom);
var feat = features
.point(layer)
.setZoomRange(minZoom, 15); // <- since minZoom was 16, this feature was culled, fix: Math.min(minZoom, 15) |
Beta Was this translation helpful? Give feedback.
Figured it out on second (or third) round, dumb mistake as they usually are. Cause and fix in last comment: