Skip to content

Comments

support PMTiles protocol#1496

Merged
CarlSchwan merged 2 commits intonextcloud:masterfrom
benstonezhang:maplibre_gl_pmtiles
Feb 21, 2026
Merged

support PMTiles protocol#1496
CarlSchwan merged 2 commits intonextcloud:masterfrom
benstonezhang:maplibre_gl_pmtiles

Conversation

@benstonezhang
Copy link
Contributor

support maps vector tiles from PMTiles file: url starts with string "pmtiles://"

below is a sample style file:

{
  "version": 8,
  "sources": {
    "example_maps": {
      "type": "vector",
      "url": "pmtiles://https://example.com/maps/pmtiles/region.pmtiles"
    }
  },
  "sprite": "/maps/style/protomaps_v4_light",
  "glyphs": "/maps/fonts/{fontstack}/{range}.pbf",
  "layers": [
    {
      "id": "bg",
      "type": "background",
      "paint": {
        "background-color": "#F2EFE9"
      }
    },
    {
      "id": "ocean",
      "type": "fill",
      "source": "example_maps",
      "source-layer": "ocean",
      "paint": {
        "fill-color": "#AAD3DF"
      }
    },
    {
      "id": "water_polygons",
      "type": "fill",
      "source": "example_maps",
      "source-layer": "water_polygons",
      "paint": {
        "fill-color": "#AAD3DF"
      }
    },
    {
      "id": "boundaries",
      "type": "line",
      "source": "example_maps",
      "source-layer": "boundaries",
      "paint": {
        "line-color": "#8D618B"
      }
    },
    {
      "id": "streets",
      "type": "line",
      "source": "example_maps",
      "source-layer": "streets",
      "layout": {
        "visibility": "visible"
      },
      "paint": {
        "line-color": [
          "match",
          [
            "get",
            "kind"
          ],
          "motorway",
          "#e66e89",
          [
            "trunk",
            "primary",
            "secondary"
          ],
          "#f4c37d",
          "#ccccca"
        ]
      }
    },
    {
      "id": "places",
      "type": "symbol",
      "source": "example_maps",
      "source-layer": "place_labels",
      "layout": {
        "text-field": [
          "get",
          "name"
        ],
        "text-font": [
          "Open Sans Semibold"
        ],
        "text-size": 16
      },
      "paint": {
        "text-halo-width": 1,
        "text-halo-color": "rgba(255, 255, 255, 1)"
      }
    },
    {
      "id": "buildings",
      "type": "fill",
      "source": "example_maps",
      "source-layer": "buildings",
      "paint": {
        "fill-color": "#D9D0C9"
      }
    }
  ],
  "id": "example_maps-demo-maplibre"
}

@benstonezhang benstonezhang force-pushed the maplibre_gl_pmtiles branch 4 times, most recently from db73c3d to b6412d2 Compare February 11, 2026 15:06
@CarlSchwan
Copy link
Member

Need a rebase

Signed-off-by: Benstone Zhang <benstonezhang@gmail.com>
@benstonezhang
Copy link
Contributor Author

Rebase done.

@CarlSchwan CarlSchwan enabled auto-merge February 21, 2026 09:57
@CarlSchwan CarlSchwan merged commit c8aa3e6 into nextcloud:master Feb 21, 2026
31 checks passed
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