@@ -46,7 +46,7 @@ def _(mlb):
4646
4747@app .cell
4848def _ (m , source ):
49- # m.add_call("setCenterFromPMTiles", "https://pmtiles.io/protomaps(vector)ODbL_firenze.pmtiles")
49+ # m.add_call("setCenterFromPMTiles", "https://pmtiles.io/protomaps(vector)ODbL_firenze.pmtiles", 6 )
5050 m .add_source ("pmtiles" , source )
5151 return
5252
@@ -60,7 +60,8 @@ def _(l, m):
6060@app .cell
6161def _ (m ):
6262 # m.add_call("setCenterFromPMTiles", "https://pmtiles.io/protomaps(vector)ODbL_firenze.pmtiles")
63- m .fit_bounds ((11.154026 , 43.7270125 , 11.3289395 , 43.8325455 ))
63+ # m.fit_bounds((11.154026, 43.7270125, 11.3289395, 43.8325455))
64+ m .add_call ("fitBoundsFromPMTiles" , "https://pmtiles.io/protomaps(vector)ODbL_firenze.pmtiles" )
6465 return
6566
6667
@@ -95,6 +96,37 @@ def _(m):
9596 return
9697
9798
99+ @app .cell
100+ def _ (m ):
101+ m .add_call ("fitBoundsFromPMTiles" , "https://pmtiles.io/protomaps(vector)ODbL_firenze.pmtiles" )
102+ return
103+
104+
105+ @app .cell
106+ def _ ():
107+ s = {
108+ "id" : "gl-draw-line" ,
109+ "type" : "line" ,
110+ "filter" : ["all" , ["==" , "$type" , "LineString" ]],
111+ "layout" : {
112+ "line-cap" : "round" ,
113+ "line-join" : "round"
114+ },
115+ "paint" : {
116+ "line-color" : "#D20C0C" ,
117+ # "line-dasharray": [0.2, 2],
118+ "line-width" : 2
119+ }
120+ }
121+ return (s ,)
122+
123+
124+ @app .cell
125+ def _ (m , s ):
126+ m .add_call ("addControl" , "MapboxDraw" , dict (displayControlsDefault = True , styles = [s ]), "top-left" )
127+ return
128+
129+
98130@app .cell
99131def _ ():
100132 return
0 commit comments