Skip to content

Instantly share code, notes, and snippets.

@HarelM
Created September 27, 2023 13:39

Revisions

  1. HarelM revised this gist Sep 27, 2023. 1 changed file with 7 additions and 8 deletions.
    15 changes: 7 additions & 8 deletions pmtiles-style.json
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,14 @@
    {
    version:8,
    sources: {
    "version": 8,
    "sources": {
    "example_source": {
    type: "vector",
    tiles: ["pmtiles://my.pmtiles/{z}/{x}/{y}.pbf"],
    minzoom: 0,
    maxzoom: 14
    attribution: '© <a href="https://openstreetmap.org">OpenStreetMap</a>'
    "type": "vector",
    "tiles": ["pmtiles://my.pmtiles/{z}/{x}/{y}.pbf"],
    "minzoom": 0,
    "maxzoom": 14
    }
    },
    layers: [
    "layers": [
    {
    "id":"buildings",
    "source": "example_source",
  2. HarelM created this gist Sep 27, 2023.
    41 changes: 41 additions & 0 deletions pmtiles-style.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    {
    version:8,
    sources: {
    "example_source": {
    type: "vector",
    tiles: ["pmtiles://my.pmtiles/{z}/{x}/{y}.pbf"],
    minzoom: 0,
    maxzoom: 14
    attribution: '© <a href="https://openstreetmap.org">OpenStreetMap</a>'
    }
    },
    layers: [
    {
    "id":"buildings",
    "source": "example_source",
    "source-layer":"landuse",
    "type": "fill",
    "paint": {
    "fill-color": "steelblue"
    }
    },
    {
    "id":"roads",
    "source": "example_source",
    "source-layer":"roads",
    "type": "line",
    "paint": {
    "line-color": "black"
    }
    },
    {
    "id":"mask",
    "source": "example_source",
    "source-layer":"mask",
    "type": "fill",
    "paint": {
    "fill-color": "white"
    }
    }
    ]
    }