Skip to content

Commit 15a0173

Browse files
author
Stefan Kuethe
committed
Styles
1 parent 3b3f932 commit 15a0173

File tree

8 files changed

+24
-17
lines changed

8 files changed

+24
-17
lines changed

src/openlayers/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
from . import controls, layers
1010
from .controls import *
1111
from .layers import *
12+
from .map import Map
1213
from .models import formats
1314
from .sources import *
14-
from .map import Map
1515
from .styles import FlatStyle
1616
from .view import View
1717

src/openlayers/controls.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
from .models.controls import (
44
Control,
55
ControlT,
6+
DrawControl,
67
FullScreenControl,
78
InfoBox,
9+
MapTilerGeocodingControl,
810
MousePositionControl,
911
OverviewMapControl,
12+
RotateControl,
1013
ScaleLineControl,
11-
ZoomSliderControl,
1214
ZoomControl,
13-
RotateControl,
15+
ZoomSliderControl,
1416
ZoomToExtentControl,
15-
MapTilerGeocodingControl,
16-
DrawControl,
1717
)
1818

1919
__all__ = [

src/openlayers/express.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
from .abstracts import LayerLike
99
from .anywidget import MapWidget
1010
from .map import Map
11+
from .models.formats import GPX, KML, Format, GeoJSON
1112
from .models.layers import TileLayer, VectorLayer, WebGLTileLayer, WebGLVectorLayer
1213
from .models.sources import GeoTIFFSource, VectorSource
1314
from .models.view import View
1415
from .styles import FlatStyle, default_style
15-
from .models.formats import Format, GeoJSON, KML, GPX
1616

1717

1818
class GeoTIFFTileLayer(LayerLike):

src/openlayers/layers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
Layer,
66
LayerT,
77
TileLayer,
8+
VectorImageLayer,
89
VectorLayer,
10+
VectorTileLayer,
911
WebGLTileLayer,
1012
WebGLVectorLayer,
11-
VectorTileLayer,
1213
WebGLVectorTileLayer,
13-
VectorImageLayer,
1414
)
1515

1616
__all__ = [

src/openlayers/map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
from .abstracts import LayerLike
88
from .export import HTMLTemplate, write_file
99
from .models.controls import ControlT
10+
from .models.formats import GPX, KML, FormatT, GeoJSON, TopoJSON
1011
from .models.layers import LayerT, TileLayer
1112
from .models.map_options import MapOptions
1213
from .models.sources import OSM, SourceT
1314
from .models.view import View
1415
from .styles import FlatStyle
15-
from .models.formats import FormatT, GeoJSON, GPX, TopoJSON, KML
1616

1717

1818
class Map(object):

src/openlayers/models/controls.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
from __future__ import annotations
22

33
import os
4-
54
from typing import Literal, Union
65
from uuid import uuid4
76

8-
from pydantic import Field, field_validator, ConfigDict
7+
from pydantic import ConfigDict, Field, field_validator
98

109
from .core import OLBaseModel
1110
from .layers import LayerT, TileLayer
@@ -64,11 +63,19 @@ class ZoomToExtentControl(Control):
6463

6564
# --- MapTiler
6665
class MapTilerGeocodingControl(Control):
67-
api_key: str = Field(os.getenv("MAPTILER_API_TOKEN"), serialization_alias="apiKey", validate_default=True)
66+
"""MapTiler geocoding control"""
67+
68+
api_key: str = Field(
69+
os.getenv("MAPTILER_API_TOKEN"),
70+
serialization_alias="apiKey",
71+
validate_default=True,
72+
)
6873
collapsed: bool | None = False
6974
country: str | None = None
7075
limit: int | None = 5
71-
marker_on_selected: bool | None = Field(True, serialization_alias="markerOnSelected")
76+
marker_on_selected: bool | None = Field(
77+
True, serialization_alias="markerOnSelected"
78+
)
7279
placeholder: str | None = "Search"
7380

7481

src/openlayers/sources.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
OSM,
55
GeoTIFFSource,
66
ImageTileSource,
7+
PMTilesRasterSource,
8+
PMTilesVectorSource,
79
Source,
810
SourceT,
11+
TileJSONSource,
912
VectorSource,
1013
VectorTileSource,
11-
TileJSONSource,
12-
PMTilesVectorSource,
13-
PMTilesRasterSource,
1414
)
1515

1616
__all__ = [

src/openlayers/styles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from __future__ import annotations
22

33
import os
4-
54
from pathlib import Path
5+
66
from pydantic import BaseModel, ConfigDict, Field, field_validator
77

88
from .utils import create_icon_src_from_file

0 commit comments

Comments
 (0)