Skip to content

Visualize point PMTiles layer #605

Answered by giswqs
jinha asked this question in Q&A
Nov 13, 2023 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

Try this one. The style can be a mapbox style.

import leafmap.foliumap as leafmap

m = leafmap.Map()

style = {
    "version": 8,
    "sources": {
        "example_source": {
            "type": "vector",
            "url": "pmtiles://" + url,
            "attribution": 'PMTiles',
        }
    },
    "layers": [
        {
            "id": "in2022_address_points",
            "source": "example_source",
            "source-layer": "in2022_address_points",
            "type": "circle",
            'paint': {
                'circle-radius': 3,
                'circle-color': '#0000ff'
            }
        },
    ],
}

m.add_pmtiles(
    url, name='PMTiles', style=style, overlay=True, show=

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@jinha
Comment options

Comment options

You must be logged in to vote
2 replies
@giswqs
Comment options

@jinha
Comment options

Answer selected by giswqs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants