-
Notifications
You must be signed in to change notification settings - Fork 685
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
base Maps and overlay #296
Comments
As this would be really usefull in my WP Plugin I hereby volunteer to craft a PR. I would simply add a Like this: [...],
OpenSeaMap: {
url: 'https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png',
layerType: 'overlay',
options: {
attribution: 'Map data: © <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'
}
},
[...],
HikeBike: {
url: 'https://tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png',
layerType: 'base',
options: {
maxZoom: 19,
attribution: '{attribution.OpenStreetMap}',
variant: 'hikebike'
},
variants: {
HikeBike: {},
HillShading: {
layerType: 'overlay',
options: {
maxZoom: 15,
variant: 'hillshading'
}
}
}
},
[...],
Wikimedia: {
url: 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png',
layerType: 'overlay',
options: {
attribution: '<a href="https://wikimediafoundation.org/wiki/Maps_Terms_of_Use">Wikimedia</a>',
minZoom: 1,
maxZoom: 19
}
}, Any reason why this might be a bad Idea? |
This info would indeed come in very handy! @mcguffin's proposal looks good to me. Since the data structure is meant to be consumed by the internal I have one remark concerning the data type of the property: With two layerTypes |
Anyone here can push a PR for that ? |
I could squeeze it in at some point, but will let @mcguffin take point - since he already volunteered. |
Any news about this ? |
hi
leaflet-providers uses some providers defined in L.TileLayer.Provider.providers{} object.
but this doesn't define if the provider is a base map or an overlay.
and in your preview, you add a function to filter provider that are overlay (https://github.com/leaflet-extras/leaflet-providers/blob/master/preview/preview.js).
Is there a way to specify an attribute "base map or overlay" in providers definition?
It would be more consitant and may be used to easily choose/display providers as they are (base map or overlay) in control layer of leaflet (https://leafletjs.com/examples/layers-control/)
The text was updated successfully, but these errors were encountered: