Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kuethe committed Feb 6, 2024
1 parent 7c7106e commit 9d9bd3b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .examples/circle_layer/app.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from maplibre import Layer, Map, output_maplibregl, render_maplibregl
from maplibre import Layer, Map, MapOptions, output_maplibregl, render_maplibregl
from maplibre.basemaps import Carto
from maplibre.shiny import render_maplibre
from shiny import App, reactive, render, ui

circle_layer = Layer(
"circle",
id_="counties",
type="circle",
id="counties",
source={
"type": "geojson",
"data": "https://raw.githubusercontent.com/visgl/deck.gl-data/master/examples/arc/counties.json",
Expand All @@ -27,9 +28,9 @@


def server(input, output, session):
@render_maplibregl
@render_maplibre
async def map():
map_ = Map(style=Carto.POSITRON, center=center, zoom=7)
map_ = Map(MapOptions(style=Carto.POSITRON, center=center, zoom=7))
map_.add_layer(circle_layer)
return map_

Expand Down

0 comments on commit 9d9bd3b

Please sign in to comment.