Background information
Currently, we have
$wgKartographerMapServer = 'https://maps.wikimedia.org'
$wgKartographerDfltStyle = 'osm-intl'
$wgKartographerStyles = ["osm-intl", "osm"]
$wgKartographerSrcsetScales = [1.3, 1.5, 2, 2.6, 3]
And then we manually build a url up internally to the formats:
https://maps.wikimedia.org/osm-intl/4/5/3.png
https://maps.wikimedia.org/osm-intl/4/5/3@2x.png
https://maps.wikimedia.org/osm-intl/4/5/3.pbf etc
What
This has the following problems:
- It is hard to adapt your tile server for non-wikimedia. It is for instance impossible to append query parameters.
- You cannot specify multiple map baselayers (a very common use case)
- You cannot specify any overlay layers
How
Don't see why we ever did it like this. Much easier to separate out concerns.
- Add new array config variable to defined map base layers
- Each layer specified in the common OSM style of //[a|b|c].tiles.org/${z}/${x}/${y}{r}.png See https://leafletjs.com/reference-1.6.0.html#tilelayer
- Add a separate config variable for geoshapes etc url, which really is a completely independent technology service that most 3rd parties will not have access to or use for
- Add yet another separate config variable for the map POI icon api.
Then we have separation of concerns, which makes it much easier to maintain, upgrade individual parts of the services and use for 3rd parties.
Open questions
...
Acceptance criteria
- geoshapes and snapshot services are disabled by default but also configurable
- Users are able to define another tile server as the source layer
- User are able to define other endpoints for static images in case it's different from the tile server URL