Page MenuHomePhabricator

Tool "commons-coverage" loads map tiles from OSM
Closed, ResolvedPublic


Loading from external providers are discouraged. Please see parent tasks and J65.
In your case replacements could be:


I'm not extremely familiar with the maps project. You might want to refer to

Event Timeline

I have changed this in my code:

var osmUrl='http://{s}{z}/{x}/{y}.png';

to this:

var osmUrl='{z}/{x}/{y}.png';

It works fine, but in the previous variable, there was a {s} that I don't know if it is possible to add for wikimedia tiles mirror.

I'm not very familiar with OSM tiles. What's {s} for?

Placeholder {s} should be for subdomains:

Generally several subdomains (server names) are provided to get around browser limitations on the number of simultaneous HTTP connections to each host. Browser-based applications can thus request multiple tiles from multiple subdomains faster than from one subdomain.

With HTTP/2, domain sharding may not be necessary anymore.

@Ricordisamoa Thanks. Then I think I don't have to use it in my code anymore.