Get help from the marimo community

Updated 2 months ago

lonboard map display

At a glance
trying to display a map using lonboard. I don't get an error, but also don't get a map display. Does anyone have any experience with this? My understanding is that lonboard uses anywidget to output a jupyter widget, but I don't know.
M
b
6 comments
can you share a minimal example?
^ what is the best way for sharing an example?
if you have a code snippet or marimo notebook, thanks!
Here is a snippet:
Plain Text
ddb.sql("create or replace table ncmap as select County,FIPS,County_ID,ST_Transform(geom,'EPSG:2264','EPSG:4326') as geometry from ST_Read('map/NC_State_County_Boundary_NCGS_2017.shp')")

sql = "SELECT County,FIPS,County_ID,ST_FlipCoordinates(geometry) as geometry FROM ncmap;"
query = ddb.sql(sql)
layer = PolygonLayer.from_duckdb(
    query,
    crs='EPSG:4326',
    get_fill_color=[255, 255, 0],
)
m = Map(layer,_height=200)
type(layer)
mo.ui.anywidget(m)

This is what it looks like in VSCode
Attachment
image.png
Do you have a full runnable example?
Add a reply
Sign up and join the conversation on Discord