Skip to content

Commit

Permalink
Fix examples, use https, update leaflet to 1.7.1 (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeDuncko authored Oct 9, 2021
1 parent 9878c1e commit 88eb66e
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Leaflet.Sync
============

Synchronized view of two maps. Tested with Leaflet 1.0.3, 1.1.0, 1.2.0 and 1.5.1.
Synchronized view of two maps. Tested with Leaflet 1.0.3, 1.1.0, 1.2.0, 1.5.1, and 1.7.1.

[More information in original blog post by @turban](http://blog.thematicmapping.org/2013/06/creating-synchronized-view-of-two-maps.html)

Expand Down
12 changes: 6 additions & 6 deletions examples/dual.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<title>Leaflet Sync Demo</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.5.1/dist/leaflet-src.js" crossorigin=""></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet-src.js" crossorigin=""></script>

<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
Expand All @@ -24,12 +24,12 @@

var layer1 = L.tileLayer('https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png', {
maxZoom: 17,
attribution: 'Map data: &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: &copy; <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
attribution: 'Map data: &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: &copy; <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
});

var layer2 = L.tileLayer('https://{s}.tile.openstreetmap.se/hydda/full/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: 'Tiles courtesy of <a href="http://openstreetmap.se/" target="_blank">OpenStreetMap Sweden</a> &mdash; Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
var layer2 = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 17,
attribution: '&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors',
});

var map1 = L.map('map1', {
Expand Down
14 changes: 7 additions & 7 deletions examples/multiple.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<title>Leaflet Sync Demo - with three maps listening</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.5.1/dist/leaflet-src.js" crossorigin=""></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet-src.js" crossorigin=""></script>

<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
Expand All @@ -29,17 +29,17 @@

var stamenOptions = {
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' +
'<a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; ' +
'Map tiles by <a href="https://stamen.com">Stamen Design</a>, ' +
'<a href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; ' +
'Map data OpenStreetmap',
subdomains: 'abcd',
minZoom: 0,
maxZoom: 20
};

var toner = L.tileLayer('http://{s}.tile.stamen.com/toner/{z}/{x}/{y}.png', stamenOptions);
var tonerLite = L.tileLayer('http://{s}.tile.stamen.com/toner-lite/{z}/{x}/{y}.png', stamenOptions);
var watercolor = L.tileLayer('http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.jpg', stamenOptions);
var toner = L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png', stamenOptions);
var tonerLite = L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png', stamenOptions);
var watercolor = L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg', stamenOptions);

var map = L.map('map', {
layers: [toner],
Expand Down
12 changes: 6 additions & 6 deletions examples/multiple_offset.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<title>Leaflet Sync Demo - with three maps listening</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.5.1/dist/leaflet-src.js" crossorigin=""></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet-src.js" crossorigin=""></script>

<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
Expand All @@ -28,15 +28,15 @@
var center = [52.517, 13.388];

var options = {
attribution: '<a href="http://openstreetmap.org/copyright">&copy; OpenStreetmap and Contributors</a>',
attribution: '<a href="https://openstreetmap.org/copyright">&copy; OpenStreetmap and Contributors</a>',
subdomains: 'abc',
minZoom: 0,
maxZoom: 20
};

var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', options);
var osmfr = L.tileLayer('http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', options);
var osmbw = L.tileLayer('http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', options);
var osm = L.tileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png', options);
var osmfr = L.tileLayer('https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', options);
var osmbw = L.tileLayer('https://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', options);

var mapA = L.map('mapA', {
layers: [osmfr],
Expand Down
10 changes: 5 additions & 5 deletions examples/nowrap.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<title>Leaflet Sync Demo (nowrap + maxbounds)</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.5.1/dist/leaflet-src.js" crossorigin=""></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet-src.js" crossorigin=""></script>

<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
Expand Down Expand Up @@ -33,15 +33,15 @@
zoomControl: false
}).setView(center, zoom);

L.tileLayer('http://{s}.tile.stamen.com/toner/{z}/{x}/{y}.png', {
L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png', {
subdomains: 'abcd',
minZoom: 0,
maxZoom: 20,
noWrap: true
}).addTo(map1);

L.tileLayer('http://{s}.tile.stamen.com/toner-lite/{z}/{x}/{y}.png', {
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png', {
attribution: 'Map tiles by <a href="https://stamen.com">Stamen Design</a>, <a href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
subdomains: 'abcd',
minZoom: 0,
maxZoom: 20,
Expand Down
6 changes: 3 additions & 3 deletions examples/select_syncs.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<title>Leaflet Sync Demo - with three maps listening. Select what to sync</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.5.1/dist/leaflet-src.js" crossorigin=""></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet-src.js" crossorigin=""></script>

<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
Expand Down Expand Up @@ -38,7 +38,7 @@

var options = {
attribution:
'<a href="http://openstreetmap.org/copyright">' +
'<a href="https://openstreetmap.org/copyright">' +
'&copy; OpenStreetmap and Contributors</a>',
subdomains: 'abc',
minZoom: 0,
Expand Down
8 changes: 4 additions & 4 deletions examples/syncCursor_dual.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<title>Leaflet Sync Demo</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.5.1/dist/leaflet-src.js" crossorigin=""></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet-src.js" crossorigin=""></script>

<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
Expand All @@ -22,9 +22,9 @@
<script type="text/javascript">
var center = [59.336, 5.967];

var layer1 = L.tileLayer('http://opencache.statkart.no/gatekeeper/gk/gk.open_gmaps?layers=norges_grunnkart&zoom={z}&x={x}&y={y}');
var layer1 = L.tileLayer('https://opencache.statkart.no/gatekeeper/gk/gk.open_gmaps?layers=norges_grunnkart&zoom={z}&x={x}&y={y}');

var layer2 = L.tileLayer('http://opencache.statkart.no/gatekeeper/gk/gk.open_gmaps?layers=topo2&zoom={z}&x={x}&y={y}', {
var layer2 = L.tileLayer('https://opencache.statkart.no/gatekeeper/gk/gk.open_gmaps?layers=topo4&zoom={z}&x={x}&y={y}', {
attribution: '© Kartverket'
});

Expand Down
14 changes: 7 additions & 7 deletions examples/syncCursor_multiple.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<title>Leaflet Sync Demo - with three maps listening</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.5.1/dist/leaflet-src.js" crossorigin=""></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet-src.js" crossorigin=""></script>

<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
Expand All @@ -29,17 +29,17 @@

var stamenOptions = {
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' +
'<a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; ' +
'Map tiles by <a href="https://stamen.com">Stamen Design</a>, ' +
'<a href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; ' +
'Map data OpenStreetmap',
subdomains: 'abcd',
minZoom: 0,
maxZoom: 20
};

var toner = L.tileLayer('http://{s}.tile.stamen.com/toner/{z}/{x}/{y}.png', stamenOptions);
var tonerLite = L.tileLayer('http://{s}.tile.stamen.com/toner-lite/{z}/{x}/{y}.png', stamenOptions);
var watercolor = L.tileLayer('http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.jpg', stamenOptions);
var toner = L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png', stamenOptions);
var tonerLite = L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png', stamenOptions);
var watercolor = L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg', stamenOptions);

var map = L.map('map', {
layers: [toner],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"chai-leaflet": "0.0.13",
"eslint": "^6.0.0",
"eslint-plugin-html": "^6.0.0",
"leaflet": "^1.5.1",
"leaflet": "^1.7.1",
"mocha": "^5.2.0",
"mocha-chrome": "^1.1.0",
"mversion": "^2.0.0"
Expand Down

0 comments on commit 88eb66e

Please sign in to comment.