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.

Kartographer on non-MediaWiki project site?

3
154.126.10.103 (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.

154.126.12.160 (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?"

Using on my own Mediawiki installation

10
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.

Reply to "Using on my own Mediawiki installation"

Can't make marker display

4
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’

2
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 MediaWiki.org 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 - ~~~~

197.218.88.81 (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)
Daylen (talkcontribs)

Is it possible to enable the maps to show country borders, regardless of the zoom level? Thank you.

Reply to "Country border lines"

Displaying maps from commons with wikidata query

2
Nikola Tulechki (talkcontribs)

Hello, my question is very similar to that of @Yair rand below.

I am looking for a way to display multiple maps stored in Commons using a Wikidata query. The polygons I want do not exist as OSM relations. I am looking for a way to fetch them directly from Commons, but select and and style them using a WD query

Is that possible?

Thanks

NT

TheDJ (talkcontribs)
Reply to "Displaying maps from commons with wikidata query"
Fokebox (talkcontribs)

Hello,

Is it possible to insert any text inside of the symbol or not?

Matroc (talkcontribs)

Not that I know of... A-Z, 1-99 and maki symbols (and blank) are what I use. -- ~~~~


Colorado highlighted map shows Atlantic Ocean

5
Summary by TheDJ

Related to bug phab:T225350

Mathglot (talkcontribs)

The link labeled, "Result: State of Colorado, highlighted" instead shows a patch of the Atlantic Ocean west of Gabon. [[Help:Extension:Kartographer#/maplink/6]] gives this link. Mathglot (talk) 22:11, 10 February 2020 (UTC)

Arlo Barnes (talkcontribs)
Mathglot (talkcontribs)

@Arlo Barnes: Yes, I'm curious and interested, and thanks very much for posting that! Mathglot (talk) 06:27, 12 February 2020 (UTC)

Matroc (talkcontribs)

I fixed this by adding latitude and longitude paremters

TheDJ (talkcontribs)

This was a bug with autozoom/positioning, which is now fixed.

Commons Geoshapes with SPARQL queries

9
Yair rand (talkcontribs)

(I hope this is an acceptable place to ask questions regarding how to use this extension?)


Is there any way to use specific geoshapes from Commons (using Wikidata's geoshape property) on maps pulled using Wikidata SPARQL queries?

2A02:8109:9B40:78:452:F808:5C06:3550 (talkcontribs)
Yair rand (talkcontribs)

No, those geoshapes are not pulled from Commons via Wikidata. They are pulled from another source (I'm not completely sure which), that has a very limited set of geoshapes available, and does not, for example, include all countries.

Dipsacus fullonum (talkcontribs)

That other source is Open Street Map (OSM) which indeed do have geoshapes for very many things, but you need to put a Wikidata tag to the OSM relations before they can be used by Kartographer. You can log in OSM with your Wikimedia login and edit the map data. They is a brief explanation of how to that at Help:Extension:Kartographer/OSM. But not all relations (geoshapes) at OSM can be used. It depends on their their type. See phab:T156433.

The answer to the original question is no as far as I know.

Yair rand (talkcontribs)

Adding Wikidata tags to OSM relations doesn't seem to work.

See for example, w:User:Yair rand/mapsandbox2. This is a very simple, one-line query showing all UN member states. However, despite the Wikidata item for Russia linking to the correct OSM relation, which links back to the Wikidata item, the boundaries for Russia still don't work (along with the boundaries for China, Brazil, Argentina, and many others).

Dipsacus fullonum (talkcontribs)

The boundaries for these countries works when I look at your mapsandbox2.

Yair rand (talkcontribs)

That's really confusing. I just tried it on multiple browsers on multiple computers, and couldn't get those countries to show up highlighted in the dark grey. Other countries show up highlighted, but certain ones aren't.

Very bizarre.

Dipsacus fullonum (talkcontribs)

Yes, I have also several times experienced some strange behavior from using Kartographer with external OSM data. I just made a new case about it on Phabricator at phab:T224846.

Yair rand (talkcontribs)

That task is marked as fixed, but certain countries still don't show up. May or may not be related to phab:T218097, I'm not sure...

Reply to "Commons Geoshapes with SPARQL queries"