Replies: 2 comments 4 replies
|
I would add a geojson or geopackage source containing what you need. |
0 replies
|
If you want to go with in-code, use minzoom and maxzoom: // in source handler
if (sourceFeature.getTag("name").toString().equals("Some Major River")) {
var line = Utils.createLineString(new double[] { /* ... */ }; // <- uses GeoUtils.JTS_FACTORY.createLineString
feat = features.geometry(this.name(), line);
feat.maxzoom(6);
} else {
feat = features.line(this.name());
feat.minzoom(7);
} |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi, sorry for the wonky title, so many new terms, I find it hard to express myself.
I'm trying to figure out how I could give a personal touch to maps. The holy grain seems to be manually added feature/geometry.
Let's take a simple example:
At some low zoom level, let's say 6, river
(Multi)LineStringare not added since it's too far away. However there are some very major rivers and their(Multi)Polygonare added. Example goal is to show river name on them. I could just write anifto match river name and allowLineStringfor specific rivers for specific zoom but from that distance OSM lines are too detailed, too many tiny bends, etc to render text on them. I tried line simplification but most rivers are still unworkable, literally tried different settings for 4 hours straight.My conclusion: draw my own very simple
LineSringwith manual coordinates and incude it only for zoom level 6.This does replace the geomentry but for all zoom levels:
I have 2 questions, technically only one of them is needed to solve my example and I would be happy with that answer but I feel like both would be very powerful tools in my arsenal, I would gladly get an answer to both:
I'm not even sure if I can properly express the first question.. If clarification is needed, I'll gladly comply.
All reactions