Topic on Help talk:Extension:Kartographer

Using on my own Mediawiki installation

13
Odoxo (talkcontribs)

Is it possible to use the Kartographer extension on my own mediawiki site? I can install the extension but can't see anywhere to input an API key?

Jackmcbarn (talkcontribs)

An API key for what?

Odoxo (talkcontribs)

The majority of tiles don't load when i'm exploring the map on my own Wiki - Failed to load resource: the server responded with a status of 429 () - presumed this was OSM requiring an API key to authenticate requests but it could be a different configuration error on my side?

TheDJ (talkcontribs)

No, Wikimedia does not provide free or paid hosting for your tiles. Clients from domains other than WMF domains are severely rate limited. Unfortunately this was required, due to some ppl making excessive use of the WMF tiles.

You can configure another tile server using the wgKartographerMapServer configuration variable.

Odoxo (talkcontribs)

Ok that makes sense, i'm struggling to find how to configure the tile server using the current documentation. You'll have to forgive my obvious questions as i'm still fairly new to Mediwiki administration. Is it therefore just a case of adding $wgKartographerMapServer = 'a_new_tileserver'; to the localsettings.php file?

TheDJ (talkcontribs)

Correct:

A standard WMF tile has the format https://maps.wikimedia.org/osm-intl/4/5/3@2x.png

With the following mapping:

  • $wgKartographerMapServer = 'https://maps.wikimedia.org'
  • $wgKartographerDfltStyle = 'osm-intl'
  • $wgKartographerStyles = an array of all available variants of a map: ["osm-intl", "osm"]

It should be noted that Kartographer map service also provides geoshapes etc, which most other services cannot provide btw.

Odoxo (talkcontribs)

Thanks for this, i'm starting to get my head around how it works and have been able to get a map to display using your advice. Currently I've set two tags

$wgKartographerMapServer = 'https://tile.thunderforest.com';

$wgKartographerDfltStyle = 'landscape';

Which is now displaying the map but with an 'API Key required' watermark. I've signed up for a free key at thunderforest but now need to inject this into the URL path at the end (e.g https://tile.thunderforest.com/landscape/{z}/{x}/{y}.png?apikey=<insert-your-apikey-here>) . Is there another mapping command to do this?

TheDJ (talkcontribs)

Ii don't think so. You will have to adapt the code.

TheDJ (talkcontribs)

P.S. this is one of the reasons why I have been meaning to change the configuration setup of this extension for tile sources. The current config variables are completely useless for more general usage outside of Wikimedia.

Odoxo (talkcontribs)

Ok, thanks for your time and replies on my questions. That clears things up for me, I'll probably look at using the 'maps' extension instead until this is more configurable. I think it would be useful to include the information around domains other than WMF being limited and the configuration limitations on the main extension page, I can't imagine i'm the first person who's stumbled along with this but perhaps I am!

Either way you've explained the current situation really clearly to me and I appreciate that.

46.193.6.67 (talkcontribs)
Stuart from Paddleguide (talkcontribs)

Hello,

I think the above conversation happened before the latest MediaWiki release. (1.35.1) Does this latest update include any changes to the configuration settings or is this still an open issue? I seem to be facing similar issues as above. Many thanks. :-) Stuart

Dieudo (talkcontribs)

This did the trick. Add theses lines in LocalSettings.php

$wgKartographerMapServer = 'https://tile.openstreetmap.fr';

$wgKartographerDfltStyle = 'osmfr';

Obviously it's in French.

Reply to "Using on my own Mediawiki installation"