Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove leaflet-include.js #7776

Merged
merged 2 commits into from
Nov 25, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove not necessary leaflet-include.js & line ending
  • Loading branch information
Falke-Design committed Nov 13, 2021
commit 0e76ecc8e5e8a1871337d5d0acd9ff9a4a9bd466
78 changes: 39 additions & 39 deletions debug/hacks/jitter.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="../../dist/leaflet.css" />
<meta name="viewport" content="width=device-width,initial-scale=1 maximum-scale=1.0 user-scalable=0">
<link rel="stylesheet" href="../css/screen.css" />
<script src="../../dist/leaflet-src.js"></script>
</head>
<body>
<div id="map"></div>
<div >
<form method="get">Click in field then scroll map (in up/left direction) to see shift of map tiles.
<fieldset><label for="textField">Name</label>:
<input id="textField" name="textField" type="text" value="">
</fieldset>
</form>
Bug tested to occur on: Safari on Mac (Tested in 5.1.7), iPad/iPhone 5.1.1., Android 4 Browser. Hack is in L.Browser.chrome and TileLayer._addTile
</div>
<script>
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
osmAttrib = '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
//Disable the hack fix
L.Browser.chrome = true;
var map = L.map('map')
.setView([50.5, 30.51], 15)
.addLayer(osm);
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>

<link rel="stylesheet" href="../../dist/leaflet.css" />

<meta name="viewport" content="width=device-width,initial-scale=1 maximum-scale=1.0 user-scalable=0">
<link rel="stylesheet" href="../css/screen.css" />

<script src="../../dist/leaflet-src.js"></script>
</head>
<body>

<div id="map"></div>
<div >
<form method="get">Click in field then scroll map (in up/left direction) to see shift of map tiles.
<fieldset><label for="textField">Name</label>:
<input id="textField" name="textField" type="text" value="">
</fieldset>
</form>
Bug tested to occur on: Safari on Mac (Tested in 5.1.7), iPad/iPhone 5.1.1., Android 4 Browser. Hack is in L.Browser.chrome and TileLayer._addTile

</div>
<script>

var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
osmAttrib = '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});

//Disable the hack fix
L.Browser.chrome = true;

var map = L.map('map')
.setView([50.5, 30.51], 15)
.addLayer(osm);
</script>
</body>
</html>
100 changes: 50 additions & 50 deletions debug/map/control-layers.html
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="../../dist/leaflet.css" />
<link rel="stylesheet" href="../css/screen.css" />
<script src="../../dist/leaflet-src.js"></script>
</head>
<body>
<div id="map"></div>
<script>
var geojson = {
"type": "Polygon",
"coordinates": [[
[5.4931640625, 51.781435604431195],
[0.9008789062499999, 53.35710874569601],
[-2.30712890625, 51.795027225829145],
[2.8125, 49.109837790524416],
[5.4931640625, 51.781435604431195]
]]
};
var map = L.map('map').setView([50.5, 0], 5);
var OSM_Mapnik = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map);
var OSM_BlackAndWhite = L.tileLayer('http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
});
L.control.layers({
'OSM': OSM_Mapnik,
'OSM BW': OSM_BlackAndWhite
}, {
'Circle': L.circle([53, 4], 111111).addTo(map),
'Polygon': L.polygon([[48, -3], [50, -4], [52, 4]]),
'GeoJSON': L.geoJson(geojson),
}, {
collapsed: false
}).addTo(map);
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>

<link rel="stylesheet" href="../../dist/leaflet.css" />

<link rel="stylesheet" href="../css/screen.css" />

<script src="../../dist/leaflet-src.js"></script>
</head>
<body>
<div id="map"></div>

<script>
var geojson = {
"type": "Polygon",
"coordinates": [[
[5.4931640625, 51.781435604431195],
[0.9008789062499999, 53.35710874569601],
[-2.30712890625, 51.795027225829145],
[2.8125, 49.109837790524416],
[5.4931640625, 51.781435604431195]
]]
};

var map = L.map('map').setView([50.5, 0], 5);

var OSM_Mapnik = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map);
var OSM_BlackAndWhite = L.tileLayer('http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
});

L.control.layers({
'OSM': OSM_Mapnik,
'OSM BW': OSM_BlackAndWhite
}, {
'Circle': L.circle([53, 4], 111111).addTo(map),
'Polygon': L.polygon([[48, -3], [50, -4], [52, 4]]),
'GeoJSON': L.geoJson(geojson),
}, {
collapsed: false
}).addTo(map);
</script>
</body>
</html>
66 changes: 33 additions & 33 deletions debug/map/geolocation.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet geolocation debug page</title>
<link rel="stylesheet" href="../../dist/leaflet.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../css/screen.css" />
<script src="../../dist/leaflet-src.js"></script>
</head>
<body>
<div id="map"></div>
<script>
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
osmAttrib = '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
var map = new L.Map('map', {zoom: 15, layers: [osm]});
function logEvent(e) { console.log(e.type); }
map.on('locationerror', logEvent);
map.on('locationfound', logEvent);
map.locate({setView: true});
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Leaflet geolocation debug page</title>

<link rel="stylesheet" href="../../dist/leaflet.css" />

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="stylesheet" href="../css/screen.css" />
<script src="../../dist/leaflet-src.js"></script>
</head>
<body>

<div id="map"></div>

<script>

var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
osmAttrib = '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});

var map = new L.Map('map', {zoom: 15, layers: [osm]});

function logEvent(e) { console.log(e.type); }
map.on('locationerror', logEvent);
map.on('locationfound', logEvent);

map.locate({setView: true});

</script>
</body>
</html>
112 changes: 56 additions & 56 deletions debug/map/map-popup.html
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>
<link rel="stylesheet" href="../../dist/leaflet.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../css/screen.css" />
<script src="../../dist/leaflet-src.js"></script>
</head>
<body>
<div id="map"></div>
<script>
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
osmAttrib = '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
var map = L.map('map')
.setView([51.505, -0.09], 13)
.addLayer(osm);
L.marker([51.5, -0.09]).addTo(map)
.bindPopup("<b>Hello world!</b><br />I am a popup.").openPopup();
L.circle([51.508, -0.11], 500, {
color: 'red',
fillColor: '#f03',
fillOpacity: 0.5
}).addTo(map).bindPopup("I am a circle.");
L.polygon([
[51.509, -0.08],
[51.503, -0.06],
[51.51, -0.047]
]).addTo(map).bindPopup("I am a polygon.");
var popup = L.popup();
function onMapClick(e) {
popup
.setLatLng(e.latlng)
.setContent("You clicked the map at " + e.latlng.toString())
.openOn(map);
}
map.on('click', onMapClick);
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>

<link rel="stylesheet" href="../../dist/leaflet.css" />

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="stylesheet" href="../css/screen.css" />

<script src="../../dist/leaflet-src.js"></script>
</head>
<body>

<div id="map"></div>

<script>

var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
osmAttrib = '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});

var map = L.map('map')
.setView([51.505, -0.09], 13)
.addLayer(osm);

L.marker([51.5, -0.09]).addTo(map)
.bindPopup("<b>Hello world!</b><br />I am a popup.").openPopup();

L.circle([51.508, -0.11], 500, {
color: 'red',
fillColor: '#f03',
fillOpacity: 0.5
}).addTo(map).bindPopup("I am a circle.");

L.polygon([
[51.509, -0.08],
[51.503, -0.06],
[51.51, -0.047]
]).addTo(map).bindPopup("I am a polygon.");

var popup = L.popup();

function onMapClick(e) {
popup
.setLatLng(e.latlng)
.setContent("You clicked the map at " + e.latlng.toString())
.openOn(map);
}

map.on('click', onMapClick);

</script>
</body>
</html>
Loading