codehub-rony / map-styler

A simple and esay UI for creating map box styles for feature layers
7 stars 0 forks source link

Option to export OSM source as basemap #5

Open codehub-rony opened 1 year ago

codehub-rony commented 1 year ago

With a basemap as export, a complete webmap will be available as JSON.

Required development:

codehub-rony commented 3 months ago

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" : "&copy; 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 2 months ago

Ideas for UI.

Create a new sheet under the layers panel. Include title a toggle for osm basemap and a download button