Skip to content

Commit 7576758

Browse files
author
Stefan Kuethe
committed
v0.3.2
1 parent 38bea9e commit 7576758

File tree

8 files changed

+23
-17
lines changed

8 files changed

+23
-17
lines changed

docs/api/basemaps.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@
1010
options:
1111
docstring_section_style: list
1212

13-
::: maplibre.basemaps.construct_basemap_style
13+
::: maplibre.basemaps.BasemapStyle
14+
15+
::: maplibre.sky.Sky
16+
17+
::: maplibre.light.Light
18+
19+
::: maplibre.terrain.Terrain

docs/api/controls.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818

1919
::: maplibre.controls.GeolocateControl
2020

21+
::: maplibre.controls.GlobeControl
22+
23+
::: maplibre.controls.TerrainControl
24+
2125
::: maplibre.controls.InfoBoxControl
2226

2327
::: maplibre.controls.LayerSwitcherControl

maplibre/basemaps.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
class BasemapStyle(BaseModel):
2020
"""Basemap style
2121
22-
See also https://maplibre.org/maplibre-style-spec/root/.
22+
Note:
23+
See [maplibre-style-spec/root](https://maplibre.org/maplibre-style-spec/root/) for more details.
2324
"""
2425

2526
_version = 8
@@ -37,16 +38,6 @@ class BasemapStyle(BaseModel):
3738
bearing: int | float | None = None
3839
pitch: int | float | None = None
3940

40-
# Obsolete because now alias is used
41-
"""
42-
@field_validator("sky")
43-
def validate_sky(cls, v):
44-
if isinstance(v, Sky):
45-
return v.to_dict()
46-
47-
return v
48-
"""
49-
5041
@computed_field
5142
def version(self) -> int:
5243
return self._version

maplibre/light.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
class Light(MapLibreBaseModel):
1010
"""Light configuration
1111
12-
See also https://maplibre.org/maplibre-style-spec/light/.
12+
Note:
13+
See [maplibre-style-spec/light](https://maplibre.org/maplibre-style-spec/light/) for more details.
1314
"""
1415

1516
anchor: Literal["map", "viewport"] = "map"

maplibre/sky.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
class Sky(MapLibreBaseModel):
99
"""Sky configuration
1010
11-
See also https://maplibre.org/maplibre-style-spec/sky/.
11+
Note:
12+
See [maplibre-style-spec/sky](https://maplibre.org/maplibre-style-spec/sky/) for more details.
1213
"""
1314

1415
sky_color: str | list | None = Field("#88C6FC", serialization_alias="sky-color")

maplibre/sources.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ class RasterSource(RasterTileSource): ...
9797

9898

9999
class RasterDEMSource(Source):
100+
"""Raster DEM Source"""
101+
100102
url: str = None
101103
tiles: list = None
102104
bounds: Union[tuple, list] = None

maplibre/terrain.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
class Terrain(MapLibreBaseModel):
77
"""Terrain configuration
88
9-
See also https://maplibre.org/maplibre-style-spec/terrain/.
9+
Note:
10+
See [maplibre-style-spec/terrain](https://maplibre.org/maplibre-style-spec/terrain/) for more details.
1011
"""
1112

1213
source: str
13-
exaggeration: int | float = 1
14+
exaggeration: int | float | None = 1

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "maplibre"
3-
version = "0.3.1.9000"
3+
version = "0.3.2"
44
description = "Python bindings for MapLibre GL JS"
55
authors = ["Stefan Kuethe <stefan.kuethe@eoda.de>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)