From d1c1df2aaef7e6581383ede88b4d70ba429cacf2 Mon Sep 17 00:00:00 2001 From: Wentao Kuang Date: Mon, 13 Nov 2023 11:19:08 +1300 Subject: [PATCH 1/3] Add Maplibre and leaflet examples into basemaps documents --- docs/examples/index.leaflet.xyz.3857.html | 40 ++++ .../examples/index.maplibre.compare.3857.html | 108 +++++++++ .../examples/index.maplibre.opacity.3857.html | 215 ++++++++++++++++++ docs/examples/index.maplibre.vector.3857.html | 45 ++++ docs/examples/leaflet.xyz.3857.md | 9 + docs/examples/maplibre.compare.3857.md | 9 + docs/examples/maplibre.opacity.3857.md | 9 + docs/examples/maplibre.vector.3857.md | 9 + mkdocs.yml | 6 + 9 files changed, 450 insertions(+) create mode 100644 docs/examples/index.leaflet.xyz.3857.html create mode 100644 docs/examples/index.maplibre.compare.3857.html create mode 100644 docs/examples/index.maplibre.opacity.3857.html create mode 100644 docs/examples/index.maplibre.vector.3857.html create mode 100644 docs/examples/leaflet.xyz.3857.md create mode 100644 docs/examples/maplibre.compare.3857.md create mode 100644 docs/examples/maplibre.opacity.3857.md create mode 100644 docs/examples/maplibre.vector.3857.md diff --git a/docs/examples/index.leaflet.xyz.3857.html b/docs/examples/index.leaflet.xyz.3857.html new file mode 100644 index 000000000..04ed34ec8 --- /dev/null +++ b/docs/examples/index.leaflet.xyz.3857.html @@ -0,0 +1,40 @@ + + + + + Leaflet WGS84 Basemaps Demo + + + + + + +
+ + + diff --git a/docs/examples/index.maplibre.compare.3857.html b/docs/examples/index.maplibre.compare.3857.html new file mode 100644 index 000000000..0fb8f010d --- /dev/null +++ b/docs/examples/index.maplibre.compare.3857.html @@ -0,0 +1,108 @@ + + + + + Maplibre WGS84 Swipe between raster and vector maps Demo + + + + + + + + + +
+
+
+ + + + diff --git a/docs/examples/index.maplibre.opacity.3857.html b/docs/examples/index.maplibre.opacity.3857.html new file mode 100644 index 000000000..4196f65c2 --- /dev/null +++ b/docs/examples/index.maplibre.opacity.3857.html @@ -0,0 +1,215 @@ + + + + + Adjust a layer's opacity + + + + + + +
+
+ +
+
+ + +
+
+ + + + diff --git a/docs/examples/index.maplibre.vector.3857.html b/docs/examples/index.maplibre.vector.3857.html new file mode 100644 index 000000000..3911859d1 --- /dev/null +++ b/docs/examples/index.maplibre.vector.3857.html @@ -0,0 +1,45 @@ + + + + + Maplibre WGS84 Topographic Vector Basemaps Demo + + + + + + +
+ + + diff --git a/docs/examples/leaflet.xyz.3857.md b/docs/examples/leaflet.xyz.3857.md new file mode 100644 index 000000000..6302427e6 --- /dev/null +++ b/docs/examples/leaflet.xyz.3857.md @@ -0,0 +1,9 @@ +# Leaflet Raster Map + +Use leaflet render raster map + + + +``` +--8<-- "examples/index.leaflet.xyz.3857.html" +``` \ No newline at end of file diff --git a/docs/examples/maplibre.compare.3857.md b/docs/examples/maplibre.compare.3857.md new file mode 100644 index 000000000..519b52492 --- /dev/null +++ b/docs/examples/maplibre.compare.3857.md @@ -0,0 +1,9 @@ +# Maplibre Compare Slider + +Use Maplibre compare map with slider + + + +``` +--8<-- "examples/index.maplibre.compare.3857.html" +``` \ No newline at end of file diff --git a/docs/examples/maplibre.opacity.3857.md b/docs/examples/maplibre.opacity.3857.md new file mode 100644 index 000000000..393c25a95 --- /dev/null +++ b/docs/examples/maplibre.opacity.3857.md @@ -0,0 +1,9 @@ +# Maplibre Opacity Slider + +Use Maplibre adjust opacity of the map + + + +``` +--8<-- "examples/index.maplibre.opacity.3857.html" +``` \ No newline at end of file diff --git a/docs/examples/maplibre.vector.3857.md b/docs/examples/maplibre.vector.3857.md new file mode 100644 index 000000000..f39d94c7f --- /dev/null +++ b/docs/examples/maplibre.vector.3857.md @@ -0,0 +1,9 @@ +# Maplibre Vector Map + +Use Maplibre to load vector tiles + + + +``` +--8<-- "examples/index.maplibre.vector.3857.html" +``` \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 27f550db7..419b1f797 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -35,6 +35,7 @@ theme: features: - navigation.indexes + - content.code.copy extra_css: - "index.css" @@ -71,3 +72,8 @@ extra: analytics: provider: google property: !ENV [GOOGLE_ANALYTICS] + +markdown_extensions: + - pymdownx.snippets: + base_path: 'docs' + check_paths: true \ No newline at end of file From b258603a00c22a918e0d6afe053b654a97c2941a Mon Sep 17 00:00:00 2001 From: Wentao Kuang Date: Tue, 14 Nov 2023 11:40:29 +1300 Subject: [PATCH 2/3] Add overview page, and update unpkg to latest versions. --- docs/examples/_overview.md | 14 +++ docs/examples/index.leaflet.xyz.3857.html | 8 +- .../examples/index.maplibre.compare.3857.html | 108 ------------------ .../examples/index.maplibre.opacity.3857.html | 14 +-- docs/examples/index.maplibre.vector.3857.html | 12 +- docs/examples/leaflet.xyz.3857.md | 2 +- docs/examples/maplibre.compare.3857.md | 9 -- docs/examples/maplibre.opacity.3857.md | 2 +- docs/examples/maplibre.vector.3857.md | 2 +- mkdocs.yml | 11 +- 10 files changed, 31 insertions(+), 151 deletions(-) create mode 100644 docs/examples/_overview.md delete mode 100644 docs/examples/index.maplibre.compare.3857.html delete mode 100644 docs/examples/maplibre.compare.3857.md diff --git a/docs/examples/_overview.md b/docs/examples/_overview.md new file mode 100644 index 000000000..a03bc6758 --- /dev/null +++ b/docs/examples/_overview.md @@ -0,0 +1,14 @@ +# Overview + +[Use leaflet render raster map](./leaflet.xyz.3857.md) + + + + +[Use Maplibre adjust opacity of the map](./maplibre.opacity.3857.md) + + + +[Use Maplibre to load vector tiles](./maplibre.vector.3857.md) + + diff --git a/docs/examples/index.leaflet.xyz.3857.html b/docs/examples/index.leaflet.xyz.3857.html index 04ed34ec8..b6ea2f5ae 100644 --- a/docs/examples/index.leaflet.xyz.3857.html +++ b/docs/examples/index.leaflet.xyz.3857.html @@ -5,9 +5,9 @@ Leaflet WGS84 Basemaps Demo - + - - -
-
-
- - - - diff --git a/docs/examples/index.maplibre.opacity.3857.html b/docs/examples/index.maplibre.opacity.3857.html index 4196f65c2..1ca9a7ae0 100644 --- a/docs/examples/index.maplibre.opacity.3857.html +++ b/docs/examples/index.maplibre.opacity.3857.html @@ -4,12 +4,8 @@ Adjust a layer's opacity - - + + - - -
- + + - const url = 'https://basemaps.linz.govt.nz/v1/tiles/aerial/WebMercatorQuad/{z}/{x}/{y}.webp?api=d01hep5551e30kxb7w85hck49tp'; + +
+ - - + + + + \ No newline at end of file diff --git a/docs/examples/index.maplibre.opacity.3857.html b/docs/examples/index.maplibre.opacity.3857.html index 1ca9a7ae0..a6f2b0c2c 100644 --- a/docs/examples/index.maplibre.opacity.3857.html +++ b/docs/examples/index.maplibre.opacity.3857.html @@ -1,209 +1,214 @@ - - - Adjust a layer's opacity - - - - - - -
-
- -
-
- - -
+ + + Adjust a layer's opacity + + + + + + + +
+
+ +
+
+ +
- - - - + on(); + return function () { + off(); + fns = []; + maps = []; + }; + } + + syncMaps(raster, vector); + + + + \ No newline at end of file diff --git a/docs/examples/index.maplibre.vector.3857.html b/docs/examples/index.maplibre.vector.3857.html index 3e366e2f7..4d8f5dbf7 100644 --- a/docs/examples/index.maplibre.vector.3857.html +++ b/docs/examples/index.maplibre.vector.3857.html @@ -1,39 +1,45 @@ - - - Maplibre WGS84 Topographic Vector Basemaps Demo - - - - - - -
- - - + + + Maplibre WGS84 Topographic Vector Basemaps Demo + + + + + + + +
+ + + + \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 322736c45..daced6bd9 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -49,7 +49,6 @@ markdown_extensions: pygments_lang_class: true # Additional syntax highlighting - pymdownx.inlinehilite - # Copy / paste to code blocks - pymdownx.snippets: base_path: 'docs' check_paths: true