Skip to content

Commit

Permalink
chore(example): updated WMS tile source & updated web config (#1963)
Browse files Browse the repository at this point in the history
  • Loading branch information
JaffaKetchup authored Sep 12, 2024
1 parent cb6d6a0 commit 93e51e7
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 55 deletions.
12 changes: 6 additions & 6 deletions example/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "0b591f2c82e9f59276ed68c7d4cbd63196f7c865"
revision: "7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30"
channel: "beta"

project_type: app
Expand All @@ -13,11 +13,11 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865
base_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865
- platform: android
create_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865
base_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865
create_revision: 7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30
base_revision: 7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30
- platform: web
create_revision: 7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30
base_revision: 7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30

# User provided section

Expand Down
87 changes: 81 additions & 6 deletions example/lib/pages/wms_tile_layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class WMSLayerPage extends StatelessWidget {
children: [
TileLayer(
wmsOptions: WMSTileLayerOptions(
baseUrl: 'https://{s}.s2maps-tiles.eu/wms/?',
baseUrl: 'https://tiles.maps.eox.at/wms?',
layers: const ['s2cloudless-2021_3857'],
),
subdomains: const ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'],
Expand All @@ -32,15 +32,90 @@ class WMSLayerPage extends StatelessWidget {
popupInitialDisplayDuration: const Duration(seconds: 5),
attributions: [
TextSourceAttribution(
'Sentinel-2 cloudless - https://s2maps.eu by EOX IT Services GmbH',
onTap: () => launchUrl(Uri.parse('https://s2maps.eu')),
'Sentinel-2 provided by the European Commission (free, full '
'and open access) [Sentinel-2 cloudless 2016, 2018, 2019, '
'2020, 2021, 2022 & 2023]',
onTap: () => launchUrl(Uri.parse(
'https://sentinel.esa.int/documents/247904/690755/Sentinel_Data_Legal_Notice',
)),
prependCopyright: false,
),
TextSourceAttribution(
'OpenStreetMap © OpenStreetMap contributors [Terrain Light, '
'Terrain, OpenStreetMap, Overlay]',
onTap: () => launchUrl(Uri.parse(
'http://www.openstreetmap.org/copyright',
)),
prependCopyright: false,
),
TextSourceAttribution(
'NaturalEarth public domain [Terrain Light, Terrain, Overlay]',
onTap: () => launchUrl(Uri.parse(
'http://www.naturalearthdata.com/about/terms-of-use/',
)),
prependCopyright: false,
),
const TextSourceAttribution(
'EUDEM © Produced using Copernicus data and information funded '
'by the European Union [Terrain]',
prependCopyright: false,
),
TextSourceAttribution(
'ASTER GDEM is a product of METI and NASA [Terrain Light]',
onTap: () => launchUrl(Uri.parse(
'https://lpdaac.usgs.gov/products/aster_policies',
)),
prependCopyright: false,
),
TextSourceAttribution(
'SRTM © NASA [Terrain]',
onTap: () => launchUrl(Uri.parse('http://www.nasa.gov/')),
prependCopyright: false,
),
TextSourceAttribution(
'GTOPO30 Data available from the U.S. Geological Survey '
'[Terrain Light, Terrain]',
onTap: () => launchUrl(Uri.parse(
'https://lta.cr.usgs.gov/GTOPO30',
)),
prependCopyright: false,
),
const TextSourceAttribution(
'Modified Copernicus Sentinel data 2021',
'CleanTOPO2 public domain [Terrain]',
prependCopyright: false,
),
TextSourceAttribution(
'GEBCO © GEBCO [Terrain Light]',
onTap: () => launchUrl(Uri.parse('http://www.gebco.net/')),
prependCopyright: false,
),
TextSourceAttribution(
'GlobCover © ESA [Terrain]',
onTap: () => launchUrl(Uri.parse(
'http://due.esrin.esa.int/page_globcover.php',
)),
prependCopyright: false,
),
const TextSourceAttribution(
"Blue Marble © NASA's Earth Observatory [Blue Marble]",
prependCopyright: false,
),
const TextSourceAttribution(
"Black Marble © NASA's Earth Observatory [Black Marble]",
prependCopyright: false,
),
TextSourceAttribution(
'Rendering: © EOX [Terrain Light, Terrain, OpenStreetMap, '
'Overlay]',
onTap: () => launchUrl(Uri.parse('http://eox.at/')),
prependCopyright: false,
),
TextSourceAttribution(
'Rendering: EOX::Maps',
onTap: () => launchUrl(Uri.parse('https://maps.eox.at/')),
'Rendering: © MapServer [OpenStreetMap, Overlay]',
onTap: () => launchUrl(Uri.parse(
'https://github.com/mapserver/basemaps',
)),
prependCopyright: false,
),
],
),
Expand Down
61 changes: 20 additions & 41 deletions example/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>

<head>
<!--
<!--
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
Expand All @@ -15,49 +15,28 @@
This is a placeholder for base href that will be replaced by the value of
the `--base-href` argument provided to `flutter build`.
-->
<base href="$FLUTTER_BASE_HREF">

<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description"
content="A versatile mapping package for Flutter, based off leaflet.js, that's simple and easy to learn, yet completely customizable and configurable.">

<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="flutter_map Demo">
<link rel="apple-touch-icon" href="icons/Icon-192.png">

<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png" />

<title>flutter_map Demo</title>
<link rel="manifest" href="manifest.json">

<script>
// The value below is injected by flutter build, do not touch.
var serviceWorkerVersion = null;
</script>
<!-- This script adds the flutter initialization JS code -->
<script src="flutter.js" defer></script>
<base href="$FLUTTER_BASE_HREF">

<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description"
content="A versatile mapping package for Flutter, based off leaflet.js, that's simple and easy to learn, yet completely customizable and configurable.">

<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="flutter_map Demo">
<link rel="apple-touch-icon" href="icons/Icon-192.png">

<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png" />

<title>flutter_map Demo</title>
<link rel="manifest" href="manifest.json">
</head>

<body>
<script>
window.addEventListener('load', function (ev) {
// Download main.dart.js
_flutter.loader.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
},
onEntrypointLoaded: function (engineInitializer) {
engineInitializer.initializeEngine().then(function (appRunner) {
appRunner.runApp();
});
}
});
});
</script>
<script src="flutter_bootstrap.js" async></script>
</body>

</html>
4 changes: 2 additions & 2 deletions example/web/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"short_name": "flutter_map",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"background_color": "#8EEA88",
"theme_color": "#8EEA88",
"description": "A versatile mapping package for Flutter, based off leaflet.js, that's simple and easy to learn, yet completely customizable and configurable.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
Expand Down

0 comments on commit 93e51e7

Please sign in to comment.