Skip to main content

Lonboard

overture

1. Create UDF in Workbench

Create a UDF in Workbench that works as a Tile, and generate a Tile HTTP endpoint for the UDF.

2. Create a Lonboard map

Render the CDLs Tile Example UDF as a Lonboard BitmapTileLayer.

import lonboard

crop_type = "almond"
url = f"https://www.fused.io/server/v1/realtime-shared/8110ef6e0c66f07f0c73f39843db27ece3960f98f268f38ef2f79f3623faae01/run/tiles/{{z}}/{{x}}/{{y}}?crop_type={crop_type}"
layer = lonboard.BitmapTileLayer(
data=url, tile_size=256, max_requests=-1, min_zoom=0, max_zoom=19
)
map = lonboard.Map(
layers=[layer],
view_state={"longitude": -121.4, "latitude": 37.7, "zoom": 10},
basemap_style=lonboard.basemap.CartoBasemap.Voyager,
show_tooltip=True,
)
map