Page MenuHomePhabricator

Make it easier to configure map layers for 3rd party users
Open, Needs TriagePublic


Background information

Currently, we have

$wgKartographerMapServer = ''
$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: etc


This has the following problems:

  1. It is hard to adapt your tile server for non-wikimedia. It is for instance impossible to append query parameters.
  2. You cannot specify multiple map baselayers (a very common use case)
  3. You cannot specify any overlay layers


Don't see why we ever did it like this. Much easier to separate out concerns.

  1. Add new array config variable to defined map base layers
  2. Each layer specified in the common OSM style of //[a|b|c]${z}/${x}/${y}{r}.png See
  3. 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
  4. 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

Event Timeline

TheDJ renamed this task from Make it easier to configure mapplayers for 3rd party users to Make it easier to configure map layers for 3rd party users.Aug 7 2020, 9:18 AM