Help talk:Extension:Kartographer

Jump to: navigation, search

Link title[edit]

The page says:

The link text can be set with the text attribute. Without the text attribute, the word "map" will be shown.

Will this word be shown in all languages?

Or can it be translated?

As far as I can see, there is not relevant translatable message in, but I might be wrong.

Tagging User:CKoerner (WMF), user:MaxSem, User:Yurik.

Thanks. --Amir E. Aharoni (talk) 10:02, 22 May 2016 (UTC)

Yup, that's not true, I've fixed it. Thanks! Max Semenik (talk) 19:58, 23 May 2016 (UTC)


Hello! Is there a function to specify the map language (e.g. "name:de") or are just common "name"-tags to be used? --J budissin (talk) 07:54, 17 June 2016 (UTC)

Hello, J budissin. At the moment the map shows location names in the language of the particular location. There is a task (task T112948) that looks to address allowing the language to be the user's preference. Is that what you're looking for? CKoerner (WMF) (talk) 20:42, 20 June 2016 (UTC)

Decimals vs. DMS[edit]

Despite being created using decimals (<maplink zoom="13" longitude="-122.3995" latitude="37.8103" />) the map displays with a DMS caption. Is the latter configurable, please? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 18:59, 9 September 2016 (UTC)

Not 'alt'[edit]

I'm very concerned at the suggestion:

Use alt for the link hint text.

This is likely to cause confusion with the "alt" attribute on images, which is for a text alternative to an image, for people who cannot see the image (blind people, people using text-only or audio interfaces, etc). In the example given here, the appropriate alt attribute might be something like "the Exploratorium is on 21st and 8th street".

It's hard enough as it is to get people to use appropriate alt attributes on images; encouraging them to think in terms of "hint text" will not help. Could the attribute in this case please be renamed? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 19:50, 9 September 2016 (UTC)

Resolved at phabricator:T145236. In the future, please don't post the same concern in several places, Phabricator is enough. Max Semenik (talk) 22:32, 9 September 2016 (UTC)
Please keep your misguided opinions of where posting is appropriate to yourself. For any issue that may not necessarily be resolved at Phabricator - and there are enough of those - the talk page of the relevant topic is a perfectly reasonable place to air the issue. Whoever was responsible for the suggestion to misuse the alt tag needs to be made aware of the problem and there's no guarantee that they will be tracking a particular Phabricator ticket. --RexxS (talk) 01:12, 10 September 2016 (UTC)
As a developer of the very thingie we're discussing, I can actually state where I prefer to see reports. And if you continue in the same tone, you will lose your access to technical spaces, including this wiki. Max Semenik (talk) 17:46, 14 September 2016 (UTC)


How to get an inverted filling in case of GeoShapes for masking outside areas? --RolandUnger (talk) 05:04, 11 October 2016 (UTC)

Pinging Yuri to see if he has an answer. CKoerner (WMF) (talk) 16:34, 12 October 2016 (UTC)
We are already working on it in T146582. --Yurik (talk) 22:04, 12 October 2016 (UTC)
Thanks. --RolandUnger (talk) 04:52, 19 October 2016 (UTC)

Maplink and queries[edit]

Hi, does Maplink support queries the same way Mapframe does? Thanks for help, --Vojtěch Dostál (talk) 18:17, 1 November 2016 (UTC)

Topographical details[edit]

Is it possible to show more details like mountain peaks with names, names of alpine club huts and names of mountain lakes and other features (e.g. for locator maps in mountain infoboxes). If i zoom in my example i only see small mountain paths (with names and numbers) leading to the summit but no peak (funny) and only the shape of a mountain lake and the shapes of buildings. I know there is a "more details" button, but i think we should also show this details in the Wikimedia map.

Also some Maki Icons ar not shown (Opera and Firefox) e. g. mountain or castle. The name of the marker symbol is accepted by Karthographer but not shown.

CKoerner (WMF) would like to have some input from german wikipedia...--Kogo (talk) 22:12, 13 December 2016 (UTC)

Thank you Kogo, I'm pinging Yuri who might be able to shed some light on the choices for which details appear on the map. For the second issue, I do know we have a task related to some icons not being available. I'll mention your request there as well. CKoerner (WMF) (talk) 15:09, 15 December 2016 (UTC)
I think hillshading would be a good start in that direction, but we should do much more to decorate natural features. Paul Norman will hopefully be working on this project as part of the Maps restyling. --Yurik (talk) 05:05, 16 December 2016 (UTC)
I've kept the '395 ticket about hillshading and have another about another about topographic features in general. Hillshading is much harder than topographic features in general (e.g. mountain peaks) because it's both more technical work (another data source, hillshading in vector tiles, etc) as well as more trouble to get right cartographically. Pnorman (talk) 01:01, 26 January 2017 (UTC)

For the missing maki icons see phabricator --Herzi Pinki (talk) 11:02, 16 December 2016 (UTC)

Other GeoJSON types[edit]

  • I would think that MultiPoint, MultiPolygon, bbox, MultiLineString and GeometryCollection types which are available to use within a mapframe as well could be noted in Help... (just have to understand how they work differently from Point, Polygon, LineString and Feature Collection). In addition a limited number of geometric shapes can be drawn and placed on a map such as circles, stars, squares etc. Matroc (talk) 05:26, 19 December 2016 (UTC)

Query syntax with geojson properties[edit]

On the french Wikipedia, I have used a maplink with WD query in a similar way to US states & governors example, see here if interested, but I have a last problem: I would like to return a stroke-width property (like the fill for the states colors) , but the hyphen is not allowed in Sparql syntax, and the underscore does not match. Pinging Yuri ; is there a solution yet? GAllegre (talk) 22:22, 10 January 2017 (UTC)

GAllegre, it seems to work for me: Localisation des forts autour de Grenoble --Yurik (talk) 07:13, 11 January 2017 (UTC)
Yurik, thanks, it works indeed. I don't know what was wrong at may first try. Many thanks again for your quick reply. GAllegre (talk) 09:01, 11 January 2017 (UTC)

Wikipedia links in the mapframe[edit]

Using interwiki links in the mapframe doesn't seem to work, is this a known bug? Jc86035 (talk) 04:57, 21 January 2017 (UTC)

Not to my knowledge, please file a phab: ticket. --Yurik (talk) 05:12, 21 January 2017 (UTC)

Template/module calls[edit]

It seems that I cannot call a template parameter or invoke a module from inside a <maplink>? --Geraki (talk) 11:24, 23 January 2017 (UTC)

Geoline from Wikidata[edit]

This example doesn't work:

Derwent Aqueduct
<mapframe text="Derwent Aqueduct" width=300 height=300 zoom=9 longitude="-1.521" latitude="53.0563">
  "type": "ExternalData",
  "service": "geoline",
  "ids": "Q28522472"

The OSM relation also has the Wikidata attribute.--Fleischameista (talk) 13:42, 25 January 2017 (UTC)

Fleischameista, sorry, got sidetracked with a lot of other stuff happening. I looked at the relation 2734272 (type=pipeline). I am really not sure if it gets imported/parsed properly by osm2pgsql, CCing Paul, who might have an answer for this. --Yurik (talk) 05:20, 30 January 2017 (UTC)
Not by default. Pnorman (talk) 05:21, 30 January 2017 (UTC)
Pnorman, what change to the OSM data would you suggest to make the pipeline appear? I feel that adding wikidata tag to each way is an overkill, but would work. --Yurik (talk) 05:30, 30 January 2017 (UTC)
@Pnorman: And which relation types get parsed? I could simply change the relation at OSM. BTW the relation already has a wikidata tag.--Fleischameista (talk) 11:02, 1 February 2017 (UTC)
Fleischameista, i added wikidata tag to each way of that relation and made a few more cleanup fixes there - changeset 45729426. I think it will help, until the geoshapes service can handle it correctly. --Yurik (talk) 22:53, 1 February 2017 (UTC)

Wikidata coordinates[edit]

The sculptures...

Is it possible to plot the coordinates (with markers) of items that I get through a Wikidata query (and that has coordinates on Wikidata)? How would I do that? I tried this, but it does not work:

<mapframe zoom="7" width="200" height="200" text="The sculptures...">
"query": "SELECT ?id ?coord ?idLabel
(SAMPLE(?img) as ?img) 
(concat('[[File:', substr(str(?img), 52, 100), '|200px]]') as ?description)
  ?id wdt:P361 wd:Q2094828 .
  ?id wdt:P625 ?coord .
    ?id wdt:P18 ?img .
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language 'sv,en' .
} GROUP BY ?id ?coord ?idLabel"

Ainali (talk) 10:27, 31 March 2017 (UTC)

Problem with coordinates calculation[edit]

From text: "(example: 12°18′0″N 45°36′0″E)". Clicking on coordinates will send you to "9.861, 52.646" not "12.3, 45.6". --Igel B TyMaHe (talk) 19:40, 9 May 2017 (UTC)

<mapframe> in template[edit]

Is it an example how to wrap <mapframe> in template? I would like to protect the map code from accedent errors and give users a friendly template interface in a native langueage. I've tried several methods, none of them works. So I would like to call template with some options and get back a map. Pavel Malakhov (talk) 09:33, 16 May 2017 (UTC)

Pavel Malakhov, there is a template in wikivoyage that does that, but it might be slightly more than what you need. Also, WV can combine multiple mapframe and maplink tag's data into one map, which is not possible in any other wikis. --Yurik (talk) 17:36, 18 May 2017 (UTC)
Yurik, this template uses Lua which I can not use in my wiki. Is it more simple example? Pavel Malakhov (talk) 09:12, 31 May 2017 (UTC)
I'll give an example. When I create a template with tag: <mapframe text="Map title" latitude="55.74459" zoom="11" longitude="37.60428" width="{{{1}}}" height="{{{2}}}" align="center"> generator returns an error:
Проблемы с <mapframe>:

 * Атрибут «width» имеет недопустимое значение
 * Атрибут «height» имеет недопустимое значение

which is Russian for:

Problems with <mapframe>:

 * Attribute «width» has wrong value
 * Attribute «height» has wrong value

Pavel Malakhov (talk) 09:10, 1 June 2017 (UTC)

Pavel Malakhov, Did you find an answer to this? The solution is to use a {{#tag:...}} magic word, (some not very understandable help is available at Help:Magic_words#Miscellaneous).
It allows you to include an extension tag within a template. I used this on en:wikipedia with <maplink> as we don't have <mapframe>, but I have had a go at adapting it to do what you want. The following code, or something customised to suit your wiki, might do it. Note that all the 'content' has to go first, followed by the parameters, ie the other way round from calling <mapframe> directly. This version allows an optional single marker in your map frame.
  "type": "FeatureCollection",
  "features": [
      "type": "Feature",
      "properties": {
          "title": "{{{title|}}}",
          "description": "{{{description|}}}",
          "marker-symbol": "-number",
          "marker-size": "medium",
          "marker-color": "#B80000"
      "geometry": {
        "type": "Point",
        "coordinates": [{{{pointlon|-0.162}}}, {{{pointlat|51.485}}} ]
}|zoom={{{zoom|12}}}| latitude={{{lat|51.48}}}| longitude={{{lon|-0.16}}}| text={{{text|}}}| width={{{width|300}}}| height={{{height|300}}}| align={{{align|right}}} }}
This template, if it was created as Template:mapframe, for example, needs only lat and lon as essential, with all the others optional using standard wiki syntax, eg:
{{mapframe| lat=51.48| lon=-0.16| zoom=11| width=350| height=250| align=center| text=Your frame text| pointlat=51.485| pointlon=-0.162| title=Interesting point}}
This has only had a quick run on a sandbox, so you will need to test it properly as a template on your wiki. You can then translate the parameters, and could embellish the options as much as you like by adding multiple points or other features - but they may not be that relevant - it depends how you imagine using it. Good luck. RobinLeicester (talk) 00:13, 23 July 2017 (UTC)

Other external sources (Gpsies)[edit]

Hi there

Would it be possible to use other ExternalSources than explained in the documentation. E.g. I got (gpsies ID: wvlbpblefmwwkkap), which would perfectly fit into the Kartographer concept.

Cheers, Ceever (talk) 13:33, 20 May 2017 (UTC)

Ceever no, only sources that are part of the wikimedia ecosystem can be included, and each requires development integration. —TheDJ (Not WMF) (talkcontribs) 08:34, 22 July 2017 (UTC)

How to purge map images from the cache?[edit]

Hi, currently if i am using the map files from commons (like example Map data from Commons) and the source map page in commons is changed then the map in the wikipedia uses the old version of the map. Is there some way todo the forced refresh of the map image? --Zache (talk) 04:46, 22 June 2017 (UTC)

Where does the GeoShape come from?[edit]

Hello! Where does the Geoshape info come from? I'm looking to {{{2}}} (Q753702) and can't find an OSM info for that. The Geonames shape is not exactly the same. So... where the heck? -Theklan (talk) 16:54, 2 August 2017 (UTC)

Theklan, Since no-one with better OSM understanding has answered, I will throw in the little I understand - which may be at best a half truth, but is at least giving you a direction. (Apologies if this is basic and you are hoping for something more insightful). On the OSM site, the various objects have a list of tags, and some, such as an Administrative boundary, might have been matched up to the wikidata Q number. So in your example, at, if you click on the boundary line, and find the East New Britain Administrative boundary feature, and have a look at its tags, one is the wikidata tag. Somehow - and this is where my knowledge ends - Kartographer can find that tag and then extract the geoshape data that it connects to. Does that help? RobinLeicester (talk) 17:22, 13 August 2017 (UTC)
It helps a lot! I was trying to figure out how Wikidata knew that, and it was OSM who knew! Thanks RobinLeicester!