|
@@ -1,5 +1,5 @@
|
|
|
from dataclasses import dataclass, field
|
|
|
-from typing import Dict, Tuple
|
|
|
+from typing import Any, Dict, Tuple
|
|
|
|
|
|
from typing_extensions import Self
|
|
|
|
|
@@ -7,6 +7,18 @@ from ..dataclasses import KWONLY_SLOTS
|
|
|
from .leaflet_layer import Layer
|
|
|
|
|
|
|
|
|
+@dataclass(**KWONLY_SLOTS)
|
|
|
+class GenericLayer(Layer):
|
|
|
+ name: str
|
|
|
+ args: list[Any] = field(default_factory=list)
|
|
|
+
|
|
|
+ def to_dict(self) -> Dict:
|
|
|
+ return {
|
|
|
+ 'type': self.name,
|
|
|
+ 'args': self.args,
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@dataclass(**KWONLY_SLOTS)
|
|
|
class TileLayer(Layer):
|
|
|
url_template: str
|