Skip to content

Commit 93e51e7

Browse files
authored
chore(example): updated WMS tile source & updated web config (#1963)
1 parent cb6d6a0 commit 93e51e7

File tree

4 files changed

+109
-55
lines changed

4 files changed

+109
-55
lines changed

example/.metadata

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: "0b591f2c82e9f59276ed68c7d4cbd63196f7c865"
7+
revision: "7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30"
88
channel: "beta"
99

1010
project_type: app
@@ -13,11 +13,11 @@ project_type: app
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865
17-
base_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865
18-
- platform: android
19-
create_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865
20-
base_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865
16+
create_revision: 7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30
17+
base_revision: 7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30
18+
- platform: web
19+
create_revision: 7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30
20+
base_revision: 7c6b7e9ca485f7eaaed913c6bb50f4be6da47e30
2121

2222
# User provided section
2323

example/lib/pages/wms_tile_layer.dart

Lines changed: 81 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class WMSLayerPage extends StatelessWidget {
2222
children: [
2323
TileLayer(
2424
wmsOptions: WMSTileLayerOptions(
25-
baseUrl: 'https://{s}.s2maps-tiles.eu/wms/?',
25+
baseUrl: 'https://tiles.maps.eox.at/wms?',
2626
layers: const ['s2cloudless-2021_3857'],
2727
),
2828
subdomains: const ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'],
@@ -32,15 +32,90 @@ class WMSLayerPage extends StatelessWidget {
3232
popupInitialDisplayDuration: const Duration(seconds: 5),
3333
attributions: [
3434
TextSourceAttribution(
35-
'Sentinel-2 cloudless - https://s2maps.eu by EOX IT Services GmbH',
36-
onTap: () => launchUrl(Uri.parse('https://s2maps.eu')),
35+
'Sentinel-2 provided by the European Commission (free, full '
36+
'and open access) [Sentinel-2 cloudless 2016, 2018, 2019, '
37+
'2020, 2021, 2022 & 2023]',
38+
onTap: () => launchUrl(Uri.parse(
39+
'https://sentinel.esa.int/documents/247904/690755/Sentinel_Data_Legal_Notice',
40+
)),
41+
prependCopyright: false,
42+
),
43+
TextSourceAttribution(
44+
'OpenStreetMap © OpenStreetMap contributors [Terrain Light, '
45+
'Terrain, OpenStreetMap, Overlay]',
46+
onTap: () => launchUrl(Uri.parse(
47+
'http://www.openstreetmap.org/copyright',
48+
)),
49+
prependCopyright: false,
50+
),
51+
TextSourceAttribution(
52+
'NaturalEarth public domain [Terrain Light, Terrain, Overlay]',
53+
onTap: () => launchUrl(Uri.parse(
54+
'http://www.naturalearthdata.com/about/terms-of-use/',
55+
)),
56+
prependCopyright: false,
57+
),
58+
const TextSourceAttribution(
59+
'EUDEM © Produced using Copernicus data and information funded '
60+
'by the European Union [Terrain]',
61+
prependCopyright: false,
62+
),
63+
TextSourceAttribution(
64+
'ASTER GDEM is a product of METI and NASA [Terrain Light]',
65+
onTap: () => launchUrl(Uri.parse(
66+
'https://lpdaac.usgs.gov/products/aster_policies',
67+
)),
68+
prependCopyright: false,
69+
),
70+
TextSourceAttribution(
71+
'SRTM © NASA [Terrain]',
72+
onTap: () => launchUrl(Uri.parse('http://www.nasa.gov/')),
73+
prependCopyright: false,
74+
),
75+
TextSourceAttribution(
76+
'GTOPO30 Data available from the U.S. Geological Survey '
77+
'[Terrain Light, Terrain]',
78+
onTap: () => launchUrl(Uri.parse(
79+
'https://lta.cr.usgs.gov/GTOPO30',
80+
)),
81+
prependCopyright: false,
3782
),
3883
const TextSourceAttribution(
39-
'Modified Copernicus Sentinel data 2021',
84+
'CleanTOPO2 public domain [Terrain]',
85+
prependCopyright: false,
86+
),
87+
TextSourceAttribution(
88+
'GEBCO © GEBCO [Terrain Light]',
89+
onTap: () => launchUrl(Uri.parse('http://www.gebco.net/')),
90+
prependCopyright: false,
91+
),
92+
TextSourceAttribution(
93+
'GlobCover © ESA [Terrain]',
94+
onTap: () => launchUrl(Uri.parse(
95+
'http://due.esrin.esa.int/page_globcover.php',
96+
)),
97+
prependCopyright: false,
98+
),
99+
const TextSourceAttribution(
100+
"Blue Marble © NASA's Earth Observatory [Blue Marble]",
101+
prependCopyright: false,
102+
),
103+
const TextSourceAttribution(
104+
"Black Marble © NASA's Earth Observatory [Black Marble]",
105+
prependCopyright: false,
106+
),
107+
TextSourceAttribution(
108+
'Rendering: © EOX [Terrain Light, Terrain, OpenStreetMap, '
109+
'Overlay]',
110+
onTap: () => launchUrl(Uri.parse('http://eox.at/')),
111+
prependCopyright: false,
40112
),
41113
TextSourceAttribution(
42-
'Rendering: EOX::Maps',
43-
onTap: () => launchUrl(Uri.parse('https://maps.eox.at/')),
114+
'Rendering: © MapServer [OpenStreetMap, Overlay]',
115+
onTap: () => launchUrl(Uri.parse(
116+
'https://github.com/mapserver/basemaps',
117+
)),
118+
prependCopyright: false,
44119
),
45120
],
46121
),

example/web/index.html

Lines changed: 20 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33

44
<head>
5-
<!--
5+
<!--
66
If you are serving your web app in a path other than the root, change the
77
href value below to reflect the base path you are serving from.
88
@@ -15,49 +15,28 @@
1515
This is a placeholder for base href that will be replaced by the value of
1616
the `--base-href` argument provided to `flutter build`.
1717
-->
18-
<base href="$FLUTTER_BASE_HREF">
19-
20-
<meta charset="UTF-8">
21-
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
22-
<meta name="description"
23-
content="A versatile mapping package for Flutter, based off leaflet.js, that's simple and easy to learn, yet completely customizable and configurable.">
24-
25-
<!-- iOS meta tags & icons -->
26-
<meta name="apple-mobile-web-app-capable" content="yes">
27-
<meta name="apple-mobile-web-app-status-bar-style" content="black">
28-
<meta name="apple-mobile-web-app-title" content="flutter_map Demo">
29-
<link rel="apple-touch-icon" href="icons/Icon-192.png">
30-
31-
<!-- Favicon -->
32-
<link rel="icon" type="image/png" href="favicon.png" />
33-
34-
<title>flutter_map Demo</title>
35-
<link rel="manifest" href="manifest.json">
36-
37-
<script>
38-
// The value below is injected by flutter build, do not touch.
39-
var serviceWorkerVersion = null;
40-
</script>
41-
<!-- This script adds the flutter initialization JS code -->
42-
<script src="flutter.js" defer></script>
18+
<base href="$FLUTTER_BASE_HREF">
19+
20+
<meta charset="UTF-8">
21+
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
22+
<meta name="description"
23+
content="A versatile mapping package for Flutter, based off leaflet.js, that's simple and easy to learn, yet completely customizable and configurable.">
24+
25+
<!-- iOS meta tags & icons -->
26+
<meta name="apple-mobile-web-app-capable" content="yes">
27+
<meta name="apple-mobile-web-app-status-bar-style" content="black">
28+
<meta name="apple-mobile-web-app-title" content="flutter_map Demo">
29+
<link rel="apple-touch-icon" href="icons/Icon-192.png">
30+
31+
<!-- Favicon -->
32+
<link rel="icon" type="image/png" href="favicon.png" />
33+
34+
<title>flutter_map Demo</title>
35+
<link rel="manifest" href="manifest.json">
4336
</head>
4437

4538
<body>
46-
<script>
47-
window.addEventListener('load', function (ev) {
48-
// Download main.dart.js
49-
_flutter.loader.loadEntrypoint({
50-
serviceWorker: {
51-
serviceWorkerVersion: serviceWorkerVersion,
52-
},
53-
onEntrypointLoaded: function (engineInitializer) {
54-
engineInitializer.initializeEngine().then(function (appRunner) {
55-
appRunner.runApp();
56-
});
57-
}
58-
});
59-
});
60-
</script>
39+
<script src="flutter_bootstrap.js" async></script>
6140
</body>
6241

6342
</html>

example/web/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"short_name": "flutter_map",
44
"start_url": ".",
55
"display": "standalone",
6-
"background_color": "#0175C2",
7-
"theme_color": "#0175C2",
6+
"background_color": "#8EEA88",
7+
"theme_color": "#8EEA88",
88
"description": "A versatile mapping package for Flutter, based off leaflet.js, that's simple and easy to learn, yet completely customizable and configurable.",
99
"orientation": "portrait-primary",
1010
"prefer_related_applications": false,

0 commit comments

Comments
 (0)