Help talk:Extension:Kartographer

Jump to navigation Jump to search

About this board

Welcome to the Maps discussion. This is a place to provide overall maps feedback.

Previous discussion was archived at Help talk:Extension:Kartographer/Archive 0 and Help talk:Extension:Kartographer/Archive 1.

Sergio D Wiki (talkcontribs)

We have a fairly complex system that will have a lot of maps, and a lot of non-techie map-editors.  The maps need to be stored on our "commons" and displayed on multiple wikis, so we have ended up using .map files.  They show up nicely on the various wikis, and we are happy going to our personal commons wiki to do the editing. But it seems that the only editor to change those .map files is the text editor.  We have a programmer, and are interested in looking at the concept of perhaps modifying the GeoJson editor such that it can modify .map files too.  Is there someone who can talk us through what all this would entail, how to get started, and the like?

TheDJ (talkcontribs)

There is a gadget on the French wikipedia that provides a geojson editor. Its called KartoEditor

Using a general map in others wiki pages

Sergio D Wiki (talkcontribs)

Hello! I created a big general map with polygons. Could it be possible to show that general map in others pages inside my wiki project?

I need to do this:

- Create a worldwide map with polygons in different places around the world.

- Show that map on pages of my wiki project, zooming in to a particular place (polygon). But, the user should see all the others polygons if they zoom out to see all the world map.

Thanks a lot for your help! (Sorry for my bad English)

Sergio D.

Matroc (talkcontribs)

Yes you can put a map on different pages. You may need to put in the coordinates (lat,long) to center each mapframe. Kartographer has different implementations (Wikipedia, Wikivoyage etc.) that might be a factor in the way you would accomplish this. Also consider processing limits.

Sergio D Wiki (talkcontribs)

Thanks a lot for your response Matroc.

Is it possible to see a kartographer map did it as a profile page, on another subdomain of my wiki project?

I mean, if I do not want to use an external page as Wikimedia Commons.


Sergio D Wiki (talkcontribs)

Thanks, now I can do it.


VIGNERON (talkcontribs)


Thanks to @Ainali:, I noticed that the example in the section "#GeoShapes via Wikidata Query" is broken (again?), Washington and Oregon don't appear on the map.

I tried to find the origin of the problem but the query seem correct and so does the OSM relation. Does anyone see where the bug comes from?

Reply to "Broken example"

Using on my own Mediawiki installation

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)


A standard WMF tile has the format

With the following mapping:

  • $wgKartographerMapServer = ''
  • $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 = '';

$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{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. (talkcontribs)
Stuart from Paddleguide (talkcontribs)


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 = '';

$wgKartographerDfltStyle = 'osmfr';

Obviously it's in French.

Reply to "Using on my own Mediawiki installation"
Fokebox (talkcontribs)

Hello all! I have installed the extension, but when I try to use it at wiki page I see empty block with the map. Why does it happen?

Reply to "No map displayed"

Is it possible to map the coordinates from wikidata without OSM?

ScottDavis (talkcontribs)

Is there a way to draw a map on Wikipedia using markers for coordinates from Wikidata (without reference to OSM)? I can build a query in the Wikidata Query Service and display the results there as a map, but haven't worked out how to put it in a Wikipedia article. If this is possible, could an example please be added to the help page?

Sample query:

SELECT ?cave ?caveLabel ?coordinate_location WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  { ?cave wdt:P31 wd:Q35509. }
  { ?cave wdt:P31 wd:Q16817. }
  ?cave wdt:P131 wd:Q3224.
  OPTIONAL { ?cave wdt:P625 ?coordinate_location. }

Try it!

Thank you. ~~~~

Evad37 (talkcontribs)
Reply to "Is it possible to map the coordinates from wikidata without OSM?"

Kartographer on non-MediaWiki project site?

3 (talkcontribs)

Can this extension be used on any MediaWiki site other than Wikipedia, Wikivoyage etc., using for example Commons?

TheDJ (talkcontribs)

The extension is active on any of the Wikimedia sister websites, including Commons. (talkcontribs)

Ok, thanks for the info. Does this mean I can use the Kartographer extension on my own wiki by switching on InstantCommons to access the map tiles?

Reply to "Kartographer on non-MediaWiki project site?"

Can't make marker display

Summary by TheDJ

coordinate specification was incorrect

HLHJ (talkcontribs)

At Wikipedia:Ōnawe Peninsula, I can't display a marker, even if I directly copy the Exploratorium example and just edit its co-ordinates. AM I just doing something foolish? I'm trying to follow the directions. HLHJ (talk) 19:05, 7 March 2020 (UTC)

Matroc (talkcontribs)

I corrected it for you -- the marker did appear but somewhere near the top of the map.

Coordinates section should be "long,lat" and not "lat,long" --- ie. "coordinates": [ 172.9293, -43.7909] },

I also add a # sign on the hex color for the marker - "marker-color": "#0050d0" -- Not sure if that matters here as I work on a different wiki.

Hope that helps - Cheers! ~~~~

HLHJ (talkcontribs)

A belated thank you, @Matroc. I really had done something foolish! HLHJ (talk) 14:37, 2 August 2020 (UTC)

Matroc (talkcontribs)

@HLHJ You are welcome! Just a minor thing - you would be surprised how many people put coordinates as lat,long - not foolish - all the best!

Reply to "Can't make marker display"

Announcing ‘Map Improvements 2018’

JMatazzoni (WMF) (talkcontribs)

Over the next four months, the WMF Collaboration team will be making improvements to mapping software (Kartographer) and related functions. The team’s engagement with maps was prompted in part by the overwhelming support the maps community gave the 2017 Community Wishlist proposal for Kartographer Improvements. The project, which we’re calling Map Improvements 2018,  is currently in its very early research and planning stages. It has a limited term and is scheduled to conclude at the end of June.

The immediate goals of the Map Improvements project are:

  • To ensure that Kartographer and the associated maps technology stack are stable and can be easily maintained as maps gain a wider audience.
  • To accomplish the two “main wishes” named in the Community Wishlist proposal, along with as many of the other wishes as are possible in the time provided. The main wishes are  T112948, “All map location names should be shown in the user's language” (an extremely challenging but crucial job), and T180907, “Add zoom level 19.”

Goals that relate to extending maps to a wider audience—such as bringing mapframe functionality to English Wikipedia (as requested by RfC) and making sure that mapframe works properly on wikis that use Flagged Revisions—are also under serious consideration.

Please visit the project page on to learn more and share your ideas and questions.

Naveenpf (talkcontribs)


Reply to "Announcing ‘Map Improvements 2018’"
Ederporto (talkcontribs)

Hello, everybody,

I'm trying to discover what is going on with mapframe maps on this article: Lista de governadores das unidades federativas do Brasil (2015–2019). It's blank, no matter what I try to do to solve. The query is correct, it returns the right amount of items (27 states). Some time ago one person changed the P31 of all states of Brasil on Wikidata, but it was reverted to the original P31, I'm not sure if has influence or not. Can anyone give me some light on that? Thanks!

Matroc (talkcontribs)

I don't do queries but I would hazard a guess that you are not getting the OpenStreetMap coordinates to create the shapes... I am sure someone will provide an answer - best wishes - ~~~~ (talkcontribs)

This is because there is an error with the query, two governors from the same place, Alagoas, Q40885. Even before that the query wasn't correct, it contained a newline before the "select". There might be other errors.

MSantos (WMF) (talkcontribs)