Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I amended
common_map.js
to allow for a new type of map:common_map.type = multilayer
.If this is set, new configfile - options
common_map.layer_{n}.{attribute}
are parsed, where {n} is a string of digits and {attribute} is an arbitrary
option that will be passed to
L.TileLayer()
for the construction of layer number {n}.Layers with higher {n} are above those with lower {n}.
The user has to take care by himself that all necessary options are provided but for the same reason gains more flexibility compared to
common_map.type = custom
.I am using that to provide a more detailed map over an area where I get highres tiles from a national geodata service and still keep the OSM layer in places that are not covered by the highres tiles.
You can try it out by putting the snippet in the attachment into your
development.ini
. If you zoom in over Switzerland, the OSM background will be replaced by the National Map from swisstopo. It's not terribly impressive, no zoom-levels and bad resolution, but that is what they give you for free ...In case you find that feature interesting to merge, I'd go about writing docu and tests.
Best,
Harald
multilayer_config.txt