Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blank page when rendering MapLibre maps using command line #866

Open
giswqs opened this issue Nov 19, 2024 · 0 comments
Open

Blank page when rendering MapLibre maps using command line #866

giswqs opened this issue Nov 19, 2024 · 0 comments

Comments

@giswqs
Copy link
Contributor

giswqs commented Nov 19, 2024

Solara successfully renders MapLibre maps in a Jupyter notebook. However, when attempting to render the map using the command solara run script.py, the output is a blank page.

# pip install "leafmap[maplibre]"

import leafmap.maplibregl as leafmap
import solara

class Map(leafmap.Map):
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.add_basemap("OpenTopoMap")
        self.add_layer_control()

@solara.component
def Page():
    with solara.Column(style={"min-width": "500px"}):
        Map.element()
Page()

image

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

No branches or pull requests

1 participant