Skip to content

Commit bd16b3f

Browse files
author
Stefan Kuethe
committed
Fix style
1 parent ddb323c commit bd16b3f

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

marimo/airport-icons.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,26 @@ def _():
2727

2828
@app.cell
2929
def _(icon, ol):
30-
style = ol.FlatStyle(icon_src=icon, icon_scale=0.03)
30+
style = ol.FlatStyle(
31+
icon_src=icon,
32+
icon_scale=["match", ["get", "type"], "major", 0.05, 0.03],
33+
# text_value=["get", "name"],
34+
# text_fill_color="steelblue"
35+
)
3136
return (style,)
3237

3338

3439
@app.cell
3540
def _(data, ol, style):
36-
vector = ol.VectorLayer(
37-
source=ol.VectorSource(url=data),
38-
style=style
39-
)
41+
vector = ol.VectorLayer(source=ol.VectorSource(url=data), style=style)
4042
return (vector,)
4143

4244

4345
@app.cell
4446
def _(ol, vector):
4547
m = ol.MapWidget(
4648
ol.View(center=(16.62662018, 49.2125578), zoom=5),
47-
layers=[ol.BasemapLayer(), vector]
49+
layers=[ol.BasemapLayer(), vector],
4850
)
4951
m.add_tooltip()
5052
return (m,)

src/openlayers/styles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class FlatStyle(BaseModel):
3737
circle_stroke_color: str | list | None = None
3838

3939
icon_src: str | Path | list | None = None
40-
icon_scale: float | int | None = None
40+
icon_scale: float | int | list | None = None
4141
icon_color: str | list | None = None
4242
icon_opacity: float | int | None = Field(None, gt=0, le=1)
4343

0 commit comments

Comments
 (0)