Page MenuHomeMiraheze

Kartographer uses Wikimedia's tile server which frequently give 429s
Closed, ResolvedPublic

Description

These days the Wikimedia tile server isn't "open" anymore. I think we need to use one of the other free options: https://wiki.openstreetmap.org/wiki/Tile_servers

Event Timeline

Reception123 edited projects, added Extensions; removed MediaWiki.
Reception123 moved this task from Backlog to Deployed Extension Bugs on the Extensions board.

@MusikAnimal Which one would you want?

Any! My guess is OSM's official tile server is probably the most reliable, but I really have no idea. Since maps are currently broken on Miraheze, I'm guessing not too many wikis are actively using it. Thus, I suspect we wouldn't meet the "heavy use" that is forbidden in OSM's usage policy.

I do not know how production Kartographer works. I'm guessing you all are using Kartotherian, and the tile server is configured somewhere in there.

Sorry for the late response. It seems that this requires some extra config (setting up a "kart") so we'd have to look more into this.

Thanks for the update! I'm happy to help, too.

Hi @Reception123. Any updates on this? I realize this is super low priority, as I'm probably the only one actively looking for maps (or else presumably you would have received other such requests). This is why I would like to help, but I'm not sure where to start. I was unable to find any documentation on setting up a "kart", could you point me to that? Also, where is the existing Kartographer/Kartotherian configuration for Miraheze? Many thanks for the help.

Hi @Reception123. Any updates on this? I realize this is super low priority, as I'm probably the only one actively looking for maps (or else presumably you would have received other such requests). This is why I would like to help, but I'm not sure where to start. I was unable to find any documentation on setting up a "kart", could you point me to that? Also, where is the existing Kartographer/Kartotherian configuration for Miraheze? Many thanks for the help.

Hi @MusikAnimal. Really sorry, I completely missed this post. I've tried looking but I'm not really sure myself, so I've asked @Universal_Omega if he could take a look.

Unknown Object (User) closed this task as Resolved.Dec 26 2020, 22:19
Unknown Object (User) claimed this task.

Should now work. Now uses https://tiles.wmflabs.org tile server.

In T5996#130629, @Universal_Omega wrote:

Should now work. Now uses https://tiles.wmflabs.org tile server.

Looks like the follow-up commit R9:a0bb9311 changed it to openstreetmap.org. However I'm seeing 404s on my end. This maplink for instance should work: https://spcodex.wiki/w/index.php?title=User:MusikAnimal/sandbox&oldid=59055 Is it working for you?

Unknown Object (User) added a comment.Dec 27 2020, 01:17
In T5996#130629, @Universal_Omega wrote:

Should now work. Now uses https://tiles.wmflabs.org tile server.

Looks like the follow-up commit R9:a0bb9311 changed it to openstreetmap.org. However I'm seeing 404s on my end. This maplink for instance should work: https://spcodex.wiki/w/index.php?title=User:MusikAnimal/sandbox&oldid=59055 Is it working for you?

That does appear to work for me, yes.

In T5996#130636, @Universal_Omega wrote:

This maplink for instance should work: https://spcodex.wiki/w/index.php?title=User:MusikAnimal/sandbox&oldid=59055 Is it working for you?

That does appear to work for me, yes.

Really? I've tried on multiple devices, logged in and out, as well as with debug=true (in the event it's a ResourceLoader issue).

What I'm seeing links for instance to https://tile.openstreetmap.org/13/1309/3164@1.3x.png?lang=en which is a 404. A working URL would be https://tile.openstreetmap.org/13/1309/3164.png?lang=en, without the @1.3x bit.

Another thing to note: it still credits Wikimedia maps at the bottom-right of the map.

Unknown Object (User) added a comment.Dec 27 2020, 04:47

Another thing to note: it still credits Wikimedia maps at the bottom-right of the map.

correct

Unknown Object (User) added a comment.Dec 27 2020, 04:48
In T5996#130636, @Universal_Omega wrote:

This maplink for instance should work: https://spcodex.wiki/w/index.php?title=User:MusikAnimal/sandbox&oldid=59055 Is it working for you?

That does appear to work for me, yes.

Really? I've tried on multiple devices, logged in and out, as well as with debug=true (in the event it's a ResourceLoader issue).

What I'm seeing links for instance to https://tile.openstreetmap.org/13/1309/3164@1.3x.png?lang=en which is a 404. A working URL would be https://tile.openstreetmap.org/13/1309/3164.png?lang=en, without the @1.3x bit.

that url you gave me shows "37°48′37″N 122°23′58″W" and clicking on it correctly shows the map, which seems to work.

In T5996#130648, @Universal_Omega wrote:

that url you gave me shows "37°48′37″N 122°23′58″W" and clicking on it correctly shows the map, which seems to work.

Odd that it works for you but not for me.

I've tried:

  • Chromium and Firefox on Ubuntu and on Android
  • Different IPs (home wi-fi and mobile data)
  • Logged in and logged out
  • With and without debug=true and safemode=1

I get the same result everywhere -- blank map, and the network log shows 404s. Actually, it doesn't make any requests at all with safemode=1, i.e. https://spcodex.wiki/w/index.php?title=User:MusikAnimal/sandbox&oldid=59055&safemode=1#/maplink/0

Can you confirm you tested on multiple devices, etc.? Could my geographic location have anything to do with it (load balancing on OSM's end)? The tile server used for https://www.openstreetmap.org/ is the same and it loads fine.

Unknown Object (User) added a comment.Dec 27 2020, 08:37
In T5996#130648, @Universal_Omega wrote:

that url you gave me shows "37°48′37″N 122°23′58″W" and clicking on it correctly shows the map, which seems to work.

Odd that it works for you but not for me.

I've tried:

  • Chromium and Firefox on Ubuntu and on Android
  • Different IPs (home wi-fi and mobile data)
  • Logged in and logged out
  • With and without debug=true and safemode=1

I get the same result everywhere -- blank map, and the network log shows 404s. Actually, it doesn't make any requests at all with safemode=1, i.e. https://spcodex.wiki/w/index.php?title=User:MusikAnimal/sandbox&oldid=59055&safemode=1#/maplink/0

Can you confirm you tested on multiple devices, etc.? Could my geographic location have anything to do with it (load balancing on OSM's end)? The tile server used for https://www.openstreetmap.org/ is the same and it loads fine.

I can confirm it works on both chrome, and Firefox, mobile, and desktop.

Three others including @RhinosF1 and @Reception123 confirmed they see a blank map when clicking on the coordinates link at https://spcodex.wiki/w/index.php?title=User:MusikAnimal/sandbox&oldid=59055. I'm very confused how it could work for some and not others. Maybe you have something weird going on your system with /etc/hosts? Or maybe geographic location does matter? I am located in New York City.

At any rate, at least on my end, it is very close to working. We just need to get rid of the @1.3x in the URLs. I have a different version of the <maplink> at https://spcodex.wiki/w/index.php?title=User:MusikAnimal/sandbox&oldid=59060 that does't provide a zoom level, thinking maybe that was the issue, but I still get the @1.3x in the URLs.

In T5996#130647, @Universal_Omega wrote:

Another thing to note: it still credits Wikimedia maps at the bottom-right of the map.

correct

These are no longer Wikimedia maps, correct? Not a big deal, just pointing it out.

Unknown Object (User) added a comment.Dec 27 2020, 19:29

Three others including @RhinosF1 and @Reception123 confirmed they see a blank map when clicking on the coordinates link at https://spcodex.wiki/w/index.php?title=User:MusikAnimal/sandbox&oldid=59055. I'm very confused how it could work for some and not others. Maybe you have something weird going on your system with /etc/hosts? Or maybe geographic location does matter? I am located in New York City.

At any rate, at least on my end, it is very close to working. We just need to get rid of the @1.3x in the URLs. I have a different version of the <maplink> at https://spcodex.wiki/w/index.php?title=User:MusikAnimal/sandbox&oldid=59060 that does't provide a zoom level, thinking maybe that was the issue, but I still get the @1.3x in the URLs.

In T5996#130647, @Universal_Omega wrote:

Another thing to note: it still credits Wikimedia maps at the bottom-right of the map.

correct

These are no longer Wikimedia maps, correct? Not a big deal, just pointing it out.

If it doesn't work then the extension may have to be uninstalled. As the current way it is, is the only way it can be done, as this Extension has a majority compatibility with WMF wikis and not meant for external use to much. There is nothing further that can be done unfortunately, as far as I'm aware, but I will look further.

It works on my local if I have wgKartographerSrcsetScales set to a blank string (or falsy value). Can we try that?

Unknown Object (User) added a comment.Dec 28 2020, 16:53

It works on my local if I have wgKartographerSrcsetScales set to a blank string (or falsy value). Can we try that?

We can try that sure

Unknown Object (User) closed this task as Resolved.Dec 28 2020, 17:11

Done. Let me know if that worked or not. If not please reopen this task and the extension may have to be considered for uninstallation as that would mean it doesn't work on our setup.

It's working for me now. Thank you!

Hopefully we won't run into any issues with over-use of OSM's tile server, but if we ever believe it to be a problem, I think disabling $wgKartographerEnableMapFrame might be enough. That essentially means you can only use <maplink>, such that the user has to click for a map to be shown (and hence there's no needless requests to the tile server).

Another thing to note: it still credits Wikimedia maps at the bottom-right of the map.

These are no longer Wikimedia maps, correct? Not a big deal, just pointing it out.

I was going to create a patch for this, but it looks like both the OSM and Wikimedia Maps attribution is in the same message, so it's not easy to hide just one of them based on $wgKartographerMapServer. For now I've just changed the message locally at https://spcodex.wiki/wiki/MediaWiki:Kartographer-attribution

Thanks again!

Unknown Object (User) added a comment.Dec 29 2020, 06:59

It's working for me now. Thank you!

Hopefully we won't run into any issues with over-use of OSM's tile server, but if we ever believe it to be a problem, I think disabling $wgKartographerEnableMapFrame might be enough. That essentially means you can only use <maplink>, such that the user has to click for a map to be shown (and hence there's no needless requests to the tile server).

Another thing to note: it still credits Wikimedia maps at the bottom-right of the map.

These are no longer Wikimedia maps, correct? Not a big deal, just pointing it out.

I was going to create a patch for this, but it looks like both the OSM and Wikimedia Maps attribution is in the same message, so it's not easy to hide just one of them based on $wgKartographerMapServer. For now I've just changed the message locally at https://spcodex.wiki/wiki/MediaWiki:Kartographer-attribution

Thanks again!

Glad to hear it's working now!