Option to export OSM source as basemap
Opened this issue · 2 comments
codehub-rony commented
With a basemap as export, a complete webmap will be available as JSON.
Required development:
- Frontend component for enabling basemap export
- enhancement of
styleObject
with an extra source for the basemap - Setting the center of the map in the styleJSON
codehub-rony commented
Example config
{
"version": 8,
"name": "outline",
"zoom" : 9,
"center" : [4.7734, 52.3917],
"sources": {
"tma": {
"type": "vector",
"tiles": [
"<url>"
]
},
"osm_background": {
"type" : "raster",
"tiles" : [ "https://tile.openstreetmap.org/{z}/{x}/{y}.png" ],
"scheme" : "xyz",
"tileSize" : 256,
"maxzoom" : 19,
"attribution" : "© basemap.de / BKG"
}
},
"layers": [
{
"id" : "osm_background",
"type" : "raster",
"source" : "osm_background",
"layout" : {
"visibility" : "visible"
}
},
{
"id": "hkrVMcWFaD",
"source": "tma",
"type": "fill",
"paint": {
"fill-color": "rgb(255, 255, 255)",
"fill-opacity": 0.00390625
},
"layout": {
"visibility": "visible"
},
"source-layer": "tma"
},
{
"id": "uWjYTmfBKA",
"source": "tma",
"type": "line",
"paint": {
"line-color": "rgb(69, 90, 100)",
"line-opacity": 1,
"line-width": 3
},
"layout": {
"visibility": "visible"
},
"source-layer": "tma"
}
]
}
codehub-rony commented
Ideas for UI.
Create a new sheet under the layers panel. Include title a toggle for osm basemap and a download button