Skip to content
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

Multiple layers #138

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Multiple layers #138

wants to merge 6 commits into from

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