Skip to content

Conversation

@hvwaldow
Copy link
Contributor

@hvwaldow hvwaldow commented Jan 6, 2016

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

@amercader
Copy link
Member

@hvwaldow That looks useful. I get 403s on the Swiss tiles, but that's probably because I need an API key or something.
Feel free to add tests and docs
Thanks!

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

Successfully merging this pull request may close these issues.

2 participants