Skip to content

Commit 0a40fbb

Browse files
committed
Use preferred tile.openstreetmap.org URL
openstreetmap/operations#737
1 parent 7646763 commit 0a40fbb

File tree

9 files changed

+33
-23
lines changed

9 files changed

+33
-23
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ Add the control to a map instance:
5252

5353
```javascript
5454
const map = new L.Map('map').setView([0, 0], 2);
55-
new L.TileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png', {
56-
attribution: '&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'
55+
new L.TileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
56+
attribution:
57+
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
5758
}).addTo(map);
5859
new L.Control.Geocoder().addTo(map);
5960
```
@@ -71,7 +72,7 @@ For example:
7172
var geocoder = L.Control.geocoder({
7273
defaultMarkGeocode: false
7374
})
74-
.on('markgeocode', function(e) {
75+
.on('markgeocode', function (e) {
7576
var bbox = e.geocode.bbox;
7677
var poly = new L.Polygon([
7778
bbox.getSouthEast(),

demo-esbuild/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import 'leaflet/dist/leaflet.css';
55
import 'leaflet-control-geocoder/dist/Control.Geocoder.css';
66

77
const map = new L.Map('map').setView([0, 0], 2);
8-
new L.TileLayer('https://tile.osm.org/{z}/{x}/{y}.png', {
9-
attribution: '&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'
8+
new L.TileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
9+
attribution:
10+
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
1011
}).addTo(map);
1112

1213
new L.Control.Geocoder({

demo-rollup/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import L from 'leaflet';
22
import 'leaflet-control-geocoder';
33

44
const map = new L.Map('map').setView([0, 0], 2);
5-
new L.TileLayer('https://tile.osm.org/{z}/{x}/{y}.png', {
6-
attribution: '&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'
5+
new L.TileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
6+
attribution:
7+
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
78
}).addTo(map);
89

910
new L.Control.Geocoder({

demo-unpkg/index.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<title>Leaflet Control Geocoder</title>
@@ -10,13 +10,14 @@
1010
/>
1111
</head>
1212
<body>
13-
<div id="map" style="width: 600px; height: 400px;"></div>
13+
<div id="map" style="width: 600px; height: 400px"></div>
1414
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
1515
<script src="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js"></script>
1616
<script>
1717
const map = new L.Map('map').setView([0, 0], 2);
18-
new L.TileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png', {
19-
attribution: '&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'
18+
new L.TileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
19+
attribution:
20+
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
2021
}).addTo(map);
2122

2223
new L.Control.Geocoder({

demo-webpack/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import 'leaflet/dist/leaflet.css';
55
import 'leaflet-control-geocoder/dist/Control.Geocoder.css';
66

77
const map = new L.Map('map').setView([0, 0], 2);
8-
new L.TileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png', {
9-
attribution: '&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'
8+
new L.TileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
9+
attribution:
10+
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
1011
}).addTo(map);
1112

1213
new L.Control.Geocoder({

demo/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@
5252
control.setQuery('Earth');
5353
}, 12000);
5454

55-
new L.TileLayer('https://tile.osm.org/{z}/{x}/{y}.png', {
56-
attribution: '&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'
55+
new L.TileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
56+
attribution:
57+
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
5758
}).addTo(map);
5859

5960
let marker;

index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@
5252
control.setQuery('Earth');
5353
}, 12000);
5454

55-
new L.TileLayer('https://tile.osm.org/{z}/{x}/{y}.png', {
56-
attribution: '&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'
55+
new L.TileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
56+
attribution:
57+
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
5758
}).addTo(map);
5859

5960
let marker;

spec/__snapshots__/nominatim.spec.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ exports[`L.Control.Geocoder.Nominatim > geocodes Innsbruck 1`] = `
4242
"icon": "https://nominatim.openstreetmap.org/images/mapicons/poi_boundary_administrative.p.20.png",
4343
"importance": 0.763909048330467,
4444
"lat": "47.26951525",
45-
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
45+
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright",
4646
"lon": "11.3971372042211",
4747
"osm_id": 8182617,
4848
"osm_type": "relation",
@@ -97,7 +97,7 @@ exports[`L.Control.Geocoder.Nominatim > geocodes Innsbruck using a custom htmlTe
9797
"icon": "https://nominatim.openstreetmap.org/images/mapicons/poi_boundary_administrative.p.20.png",
9898
"importance": 0.763909048330467,
9999
"lat": "47.26951525",
100-
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
100+
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright",
101101
"lon": "11.3971372042211",
102102
"osm_id": 8182617,
103103
"osm_type": "relation",
@@ -146,7 +146,7 @@ exports[`L.Control.Geocoder.Nominatim > reverse geocodes 47.3/11.3 1`] = `
146146
],
147147
"display_name": "Innsbruck-Land, Tyrol, Austria",
148148
"lat": "47.2065094",
149-
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
149+
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright",
150150
"lon": "11.3836945900354",
151151
"osm_id": 78251,
152152
"osm_type": "relation",

spec/nominatim.spec.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ describe('L.Control.Geocoder.Nominatim', () => {
1212
[
1313
{
1414
place_id: 199282228,
15-
licence: 'Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright',
15+
licence:
16+
'Data © OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright',
1617
osm_type: 'relation',
1718
osm_id: 8182617,
1819
boundingbox: ['47.2583715', '47.2808566', '11.3811871', '11.418183'],
@@ -64,7 +65,8 @@ describe('L.Control.Geocoder.Nominatim', () => {
6465
[
6566
{
6667
place_id: 199282228,
67-
licence: 'Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright',
68+
licence:
69+
'Data © OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright',
6870
osm_type: 'relation',
6971
osm_id: 8182617,
7072
boundingbox: ['47.2583715', '47.2808566', '11.3811871', '11.418183'],
@@ -99,7 +101,8 @@ describe('L.Control.Geocoder.Nominatim', () => {
99101
'https://nominatim.openstreetmap.org/reverse?lat=47.3&lon=11.3&zoom=9&addressdetails=1&format=json',
100102
{
101103
place_id: 197718025,
102-
licence: 'Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright',
104+
licence:
105+
'Data © OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright',
103106
osm_type: 'relation',
104107
osm_id: 78251,
105108
lat: '47.2065094',

0 commit comments

Comments
 (0)