Merge pull request #14062 from Firefishy/update-tile.openstreetmap.org-url

Use preferred tile.openstreetmap.org URL
This commit is contained in:
MoonE
2022-08-28 02:22:00 +02:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ new Map({
layers: [ layers: [
new TileLayer({ new TileLayer({
source: new XYZ({ source: new XYZ({
url: 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png' url: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png'
}) })
}) })
], ],
+2 -2
View File
@@ -37,7 +37,7 @@ export const ATTRIBUTION =
* ``` * ```
* @property {number} [transition=250] Duration of the opacity transition for rendering. * @property {number} [transition=250] Duration of the opacity transition for rendering.
* To disable the opacity transition, pass `transition: 0`. * To disable the opacity transition, pass `transition: 0`.
* @property {string} [url='https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png'] URL template. * @property {string} [url='https://tile.openstreetmap.org/{z}/{x}/{y}.png'] URL template.
* Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders. * Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally. * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
* @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0] * @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
@@ -70,7 +70,7 @@ class OSM extends XYZ {
const url = const url =
options.url !== undefined options.url !== undefined
? options.url ? options.url
: 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png'; : 'https://tile.openstreetmap.org/{z}/{x}/{y}.png';
super({ super({
attributions: attributions, attributions: attributions,