-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stefan Kuethe
committed
Jan 29, 2024
1 parent
6f09cf9
commit 7c7106e
Showing
7 changed files
with
47 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from maplibre import Map | ||
from maplibre.shiny import render_maplibre | ||
from shiny.express import ui | ||
|
||
ui.h1("Hello world!") | ||
|
||
|
||
@render_maplibre | ||
def mapylibre(): | ||
return Map() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
### DEPRECATED: see 'shiny.py' | ||
|
||
from __future__ import annotations | ||
|
||
from shiny.render.transformer import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from htmltools import Tag | ||
|
||
from shiny.render.renderer import Renderer | ||
|
||
from .map import Map | ||
from .ui import output_maplibregl | ||
|
||
|
||
class render_maplibre(Renderer[Map]): | ||
def auto_output_ui(self) -> Tag: | ||
return output_maplibregl(self.output_id, height=600) | ||
|
||
async def transform(self, value: Map) -> dict: | ||
return {"mapData": value.to_dict()} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters