Extension talk:Kartographer

Latest comment: 10 days ago by Momijisu in topic Simple Projection / Custom Source

Please leave your Kartographer feedback here

Mapping services used?Edit

Hi - it would be good if at least one of these two pages explained the mapping technologies being used by Kartographer. I see references to Leaflet and Mapbox within the code, so I assume it's those two, but I could be wrong. Ideally the documentation could answer the following questions:

  • What is the full set of mapping technologies used?
    See wikitech:Maps and here
  • Are there plans to expand this set in the future?
    I hope so - the current technology will not cover all the Maps/Future Plans, and I do hope to grow it.
  • Are the code, and the map data, both completely free/libre to use? (I'm assuming yes, but it would be good for the documentation to state it.)
    Of course - Kartotherian license apache 2.0, OSM data is under ODBL.
  • When a map is generated, which parts (of the code and data) come from the MediaWiki installation, and which parts come from outside services? (This is a privacy concern to some.)
    The tiles are generated by Kartotherian service that fully runs on WMF production servers. The data is downloaded every day from OSM. So there is no privacy issues on tile side.
    WikiVoyage currently uses wmflabs-generated layers on top of kartotherian-generated maps, plus NL-wikivoyage still uses wmflabs tiles (which violates our privacy policy). Since the new maps don't offer as much details as a more mature but less salable and stable service, some community members are understandably not very happy to migrate right away, despite the privacy issues. See this discussion.
  • How does OpenStreetMap fit into the whole thing, if at all?
    OSM is the main source of the data. Eventually I hope we will add more interesting data sources like Wikidata (for localization and linking to articles)
  • Do points of interest (POIs) come exclusively from OSM, or from within the wiki, or both, or somewhere else?
    Both. At this point, there are almost no POIs from OSM on our maps except a few transportation ones. WikiVoyage adds them directly from the articles.

-- Yaron Koren (talk) 12:38, 28 March 2016 (UTC)Reply[reply]

Yaron Koren, answered inline. --Yurik (talk) 11:10, 29 March 2016 (UTC)Reply[reply]
This is all very good to know, although really I would like to see all this information get added to the documentation; I'm sure many people will have these same questions. If you want, I can try adding it in - just let me know. Yaron Koren (talk) 13:12, 29 March 2016 (UTC)Reply[reply]
Yaron Koren, sure, any help would be great. It's hard to edit from a phone)) --Yurik (talk) 13:17, 29 March 2016 (UTC)Reply[reply]
Alright, I just added some of this information to the page; hopefully what I added is accurate. And I modified some of the rest as well. I still think the "Goals" section needs work - it's not clear which goals have been met already, and which haven't - but I don't know enough to feel comfortable changing it. Yaron Koren (talk) 20:31, 1 April 2016 (UTC)Reply[reply]


Uhm, how do you/we/I set up a translation page for this, i.e. Extension:Kartographer/sv? Riggwelter (talk) 00:12, 24 April 2016 (UTC)Reply[reply]

specifications for this projectEdit

Where can I find the specifications for this project? The help documentation is not easy to follow, would like to see what documents were used to base the development of this functionality on? --Traveler100 (talk) 18:55, 14 July 2016 (UTC)Reply[reply]

Traveler100, are you looking for technical documentation? Something like this? CKoerner (WMF) (talk) 19:59, 1 August 2016 (UTC)Reply[reply]
No, more a requirement specification or requested functional document or user need, user guide document. What should it do/deliver. --Traveler100 (talk) 21:37, 1 August 2016 (UTC)Reply[reply]

Auto-counter bugEdit

In it:voy:Pest#Cosa vedere the counter stops at 99 for all the last listings while it should proceed to 100, 101, etc. --Andyrom75 (talk) 14:29, 26 September 2016 (UTC)Reply[reply]

Andyrom75, this is by design - Maki icons do not support wide icons that would fit 3 digits. Also, having more than a 100 icons would probably be very confusing to the user, because they won't be able to locate it by number. I would recommend grouping icons by color, e.g. each region would have different color, and each would have an independent index 1..99. --Yurik (talk) 15:17, 26 September 2016 (UTC)Reply[reply]
Yurik, this is just an example page, but we have also other pages with the same issue. Considering that the old counting system works perfectly (over this topic) can the extension replicate the same behaviour extending the counting over 100 (well, not limiting it below 100)? Thanks for your support, --Andyrom75 (talk) 17:22, 26 September 2016 (UTC)Reply[reply]
A curiosity: since the counter is managed by CSS styles (at least in the old system), why you link this issue to the Maki icons? In case you are referring to the icons shown inside the map, well, the previous icons were much more intuitive and since they do not have this limitation, at this point they were also more flexible. So, why have been choosen the Maki icons? --Andyrom75 (talk) 17:27, 26 September 2016 (UTC)Reply[reply]
As explained in the Phabricator bug, the old map still works properly, showing the correct numbers (see it:voy:Pest#Come_orientarsi). The only things that we need now is to show the correct numbers in the article (see it:voy:Pest#Altri_parchi). Since this is not related to the Maki icons, it should be very easy to (temporary) patch it. --Andyrom75 (talk) 13:17, 4 October 2016 (UTC)Reply[reply]
Inside the Phabricator ticket I've inserted a patch, although I still don't understand why the listing numbering that can be naturally managed by a CSS style has been demanded to a server script. --Andyrom75 (talk) 21:26, 8 October 2016 (UTC)Reply[reply]

Map providerEdit

It is possible to change default map provider? f.e Google terrain viev? — Preceding unsigned comment added by Azot944 (talkcontribs)

No, with these maps, you can't change the default data provider. But, after opening the map (like this sample), you can click on 'map details' and then select a different provider to display a map. DTankersley (WMF) (talk) 16:16, 12 December 2016 (UTC)Reply[reply]

Auto Populating Maps with Wiki Page LinksEdit

Dear folks, in our wiki project we would like to have wiki pages auto populate a centralized Karto Map with pins and links to the wiki page. For example, a page about Rome is created, a coordinate or address is inserted into the wiki page as well, perhaps in an infobox, and the corresponding map pin is auto-populated in Rome on a Karto Map with the link in the pin. Is this a function of Karto Map? Thanks for your feedback.

Question regarding the Traffic Line Network layerEdit

Can anyone refer me to a detailed list of all the items in the Traffic Line Network map layer (that is available in the dynamic maps)?

(It should probably look something like this: Black Lines - routes of interurban bus lines, Red Lines - routes of urban bus lines, Pink Lines - routes of the light rail, etc.)

ויקיג'אנקי (talk) 18:22, 29 June 2017 (UTC)Reply[reply]

Stub Question regarding retrieving lat-lon from the mapEdit

Can I have a right click please?

In Wiki9shootMe! I can right click on the map and I get two options. The one that interests me is Show Coordinates. When one is working on stubs, or orphan images the need to add a{{coord|xxx|yyy|display=title}} or {{location is high priority, and wikishootme is reliable. Other versions of OSM on various wikis can allow or cannot allow you to do the same. In enwp the links on Geohack do allow you too but the map on the geohack landing page doesn't- yes that is only one more click but please multiply. However the Where Am I tool requires you to centre the map on your target first- that is a time waster. On images, you must avoid the direct OSM link- and click on the coordinates which brings you into Geohack and more timewasting. If Kartographer is going to replace Geohack can we have this essential rightclick option?

I have tried this on the example on the Extension page but alas it is not there yet.

Further, once right click is enabled, could we others link. The first that comes to mind is one that provides a filled out Kartographer template for the new spot- thus enabling me to add the co-ordinates to the stub, then a beautiful little map, to add to the Infobox I haven't yet written.( ping me on en please). --ClemRutter (talk) 18:35, 16 October 2017 (UTC)Reply[reply]

Nice suggestion, user:ClemRutter, I've added a Phabricator ticket for the work here: https://phabricator.wikimedia.org/T178338. Feel free to update it and/or add more information. The WMF Maps Team, as it exists right now, doesn't have the capability to do the work needed to create this new functionality, but maybe a community volunteer would be able to help out and code it. Thanks, DTankersley (WMF) (talk) 20:55, 16 October 2017 (UTC)Reply[reply]
Thanks for the response- I am willing to contribute but no-longer have the skills to do innovative coding. However I did try to copy the example from the documentation to my en:Sandbox (well I proved that didn't work) so tried to copy an example to my Mediawiki talk page- that did, I changed the lat/lon to London, previewed it and the map changed. I did another change, and previewed and right clicked on the point I wanted- and a pop-up box appeared with the Latitude/ Longitude and the Zoom. Excellent, I saved it, did a right-click and it had gone! I got the usual suspects instead. So it works when in edit preview mode, but not in normal display mode. At least that gives us a lead. I will dual post this to https://phabricator.wikimedia.org/T178338

I'm getting an error KartographerEdit

/var/www/html/extensions/Kartographer/includes/SimpleStyleParser.php: Class 'JsonSchema\Validator' not found --Enemyx (talk) 13:14, 11 December 2017 (UTC)Reply[reply]

Coordinates from variablesEdit

@Yaron Koren: If I set the coordinates with digits directly, so the function mapframe works correctly. If I set the coordinates inside of a infobox, with latitude={{{lat_deg|}}} longitude={{{lon_deg|}} so an error appears, but the values are correctly appearing. eg. https://regiowiki.at/index.php?title=Vorlage:Infobox_Feuerwehr&action=edit and https://regiowiki.at/wiki/Freiwillige_Feuerwehr_Gaaden what could be the error? -- thanks in advance --Karl Gruber (talk) 21:00, 3 July 2018 (UTC)Reply[reply]

Du musst mapframe über {{#tag:mapframe|...}} aufrufen. de:Hilfe:Vorlagenprogrammierung#Funktion_tag --Bglwiki (talk) 18:08, 29 October 2018 (UTC)Reply[reply]
Vielen Dank, das hilft weiter. lg ins Bgl --Karl Gruber (talk) 20:21, 29 October 2018 (UTC)Reply[reply]

How to activate marker cluster?Edit

From this page :

it seems possible to activate marker cluster.

Does anyone know how?

Thank you.

--Dieudo (talk) 23:12, 26 November 2018 (UTC)Reply[reply]

Dependency on JsonConfigEdit

magic interwikilinksEdit

[[wikipedia:Cumberland, Maryland|]]

It looks like there is a bug (duplicated here on mediawiki.org) where the Kartographer Extension will display magic interwikilinks in the TEXT attribute as NOWIKI, e.g. "[[wikipedia:Cumberland, Maryland|]]" will display in the caption instead of "Cumberland, Maryland" for text="[[wikipedia:Cumberland, Maryland|]]". Changing the TEXT attribute to not use a magic link renders correctly (text="[[wikipedia:Cumberland, Maryland|Cumberland, Maryland]]").

Nicole Sharp (talk) 17:30, 8 June 2019 (UTC)Reply[reply]

Not sure why the maps aren't rendering in the examples here. The given wikisyntax renders correctly in my local installation of MediaWiki, other than the bug with the interwikilink caption. Nicole Sharp (talk) 17:39, 8 June 2019 (UTC)Reply[reply]

Attribute "latitude" has an invalid valueEdit

In a Mediawiki 1.32 page (https://www.venciclopedia.org/index.php?title=La_Fría) extension Kartographer doesn't render. Instead throws this error Attribute "latitude" has an invalid value. Same for longitude. I'm assuming this is because I'm calling the attributes from a template...

<mapframe width=250 height=250 zoom=13 latitude={{{latitud}}} longitude={{{longitud}}} />

Any way to pass these values without pasting the coordinates directly into the page?


From within a template maplink has to be called using a #tag instead, ie {{#tag:maplink|...}}. If you are including any geojson, this goes next, and the parameter list follows that, with each parameter separated by pipes. (there is a bit more information at Help:Magic_words). RobinLeicester (talk) 23:50, 10 October 2019 (UTC)Reply[reply]


Hi, how to configure the extension to work with the VisualEditor?

--hollosch (talk) 18:15, 19 August 2019 (UTC)Reply[reply]

Third party installations should use non-Wikimedia tile servers...Edit

On the main page it is written that : "Third party installations should use non-Wikimedia tile servers listed on https://wiki.openstreetmap.org/wiki/Tile_servers".

How to configure that?

--Dieudo (talk) 18:31, 10 February 2020 (UTC)Reply[reply]

Long overdue OSM database synchronisationEdit

Hi An update of all WIWOSM data that make use of a copy of OpenStreetmap is long overdue, all updates in OpenStreetmap are not visible in all wikiprojects. Hans Erren (talk) 16:53, 30 June 2020 (UTC)Reply[reply]

Indeed @Hans Erren: see phab:T243609. Before that, the synchronization with OSM was hourly (see phab:T137939). The RedBurn (talk) 15:00, 12 August 2020 (UTC)Reply[reply]

@The RedBurn: Hello. I have been updating names and things on OSM and it seems to be taking months (if I am not mistaken) for them to be represented in infoboxes or the location (coordinate) view on respective Wikidata items. Do we have any information as to what replication time is now, and when that may be fixed? As a bureaucrat I am kind of expected to know about this issue and do something about it. Regards, --B. Jankuloski (talk) 11:54, 4 June 2022 (UTC)Reply[reply]

As far as I know, the synchronization is enabled again every hour. But some new osm features are sometimes missing, see phab:T218097. The RedBurn (talk) 10:35, 5 June 2022 (UTC)Reply[reply]

Localized namesEdit

I am wondering where Kartographer pulls its localized names from. This article implies that it only pulls from the OSM tags but I am wondering whether it could also Wikidata translations if a wikidata= tag is present. Does it currently do that? --Hannes Röst (talk) 21:22, 10 October 2020 (UTC)Reply[reply]

I came here with exactly the same question. I note that maptiler.com are doing exactly this and getting good results. It also matters in certain cases where OSM isn't keen on non-observed data - Latin and Sanskrit spring to mind. JimKillock (talk) 22:59, 9 January 2021 (UTC)Reply[reply]
@Hannes Röst: I've added a phabricator.wikimedia.org/T271627 Phabricator ticket in case that's helpful.

Not WorkingEdit

  • I can't get Kartographer working in MediaWiki 1.35.1 LTS, though it was previously working in MediaWiki 1.31. All I get is an empty/blank mapbox with no map inside. I tried setting "$wgKartographerMapServer = "https://tile.openstreetmap.org";" in LocalSettings.php but that did not help. Any suggestions? Nicole Sharp (talk) 21:17, 15 March 2021 (UTC)Reply[reply]
    • maplink doesn't work either, and just opens a blank map (though the map pin icon shows in text correctly). Nicole Sharp (talk) 21:37, 15 March 2021 (UTC)Reply[reply]

Actually it is working with this setting with this setting in LocalSettings.php
$wgKartographerMapServer = 'https://tile.openstreetmap.fr';
$wgKartographerDfltStyle = 'osmfr';
For this example, it's in French.
Does anyone know how to set it for 'osm-int' ?
--Dieudo (talk) 21:34, 30 March 2021 (UTC)Reply[reply]
Hi! Have you solved the issue with empty mapbox? Fokebox (talk) 09:40, 31 July 2021 (UTC)Reply[reply]
It used to work, but now, not anymore :\
Instead this configuration works so far:
:::::$wgKartographerMapServer = 'https://tiles.wmflabs.org';
:::::$wgKartographerDfltStyle = 'hikebike';
:::::$wgKartographerSrcsetScales = []; /* Because no support for HiDPI tiles */
A problem remains: the markers are not accessible any more :\ Dieudo (talk) 17:52, 20 January 2022 (UTC)Reply[reply]
  • I just installed the Kartographer extension and it is not working for me. Here is my LocalSettings.php:
wfLoadExtension( 'JsonConfig' );
wfLoadExtension( 'Kartographer' );

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

Then I created a test page with just this simple entry:

<mapframe text="San Francisco" width=600 height=600 zoom=10 longitude=-122.3988 latitude=37.8013 />

but the only thing I get is a blank box.

Empty mapbox after installing the extensionEdit


I have just added extension to my wiki v.1.35. When I add map to the page I see empty mapbox. Do you have any ideas how to resolve the issue? Fokebox (talk) 08:54, 23 July 2021 (UTC)Reply[reply]

I just posted about the same issue in the section right above (i.e., Not Working). I am using v1.37. Did you ever resolve your problem? Aluminum ice (talk) 18:27, 6 February 2022 (UTC)Reply[reply]

Using Kartographer on a local serverEdit

The maps do not appear when I use this extension on a local server without an internet connection. Is there a way to download and host map data which could then be used by the extension to display the maps?

Kartographer broken on Wikimedia projectsEdit

Hi all

Yesterday Kartographer maps stopped displaying properly on Wikimedia projects, here's a Phabricator ticket for it https://phabricator.wikimedia.org/T302853


John Cummings (talk) 12:19, 2 March 2022 (UTC)Reply[reply]

Simple Projection / Custom SourceEdit

I'm trying to use a simple projection similar to what would be done in Leaflet.js - I've made an external leaflet.js with simple projection tile layers from a custom source, with an error-tile URL for outside the 'game world', but trying to achieve something similar in a wiki environment.

I've figured out the custom tilemap source - by simply pointing to my existing leaflet.js map files - but it's using the OSRS projection - and attribution etc.

I saw that the Runescape Wiki has achieved something similar to what I'm trying to build, but looking for pointers on where to start with Kartographer. Momijisu (talk) 00:27, 30 January 2023 (UTC)Reply[reply]

Return to "Kartographer" page.