openstreetmap / operations

OSMF Operations Working Group issue tracking
https://operations.osmfoundation.org/
99 stars 13 forks source link

Replace MultiMaps extension #749

Closed Tigerfell closed 1 year ago

Tigerfell commented 2 years ago

Once again we have to find a new extension to display maps in the OSM wiki because MultiMaps extension throws errors when used with MediaWiki >= 1.38. The extension is not maintained anymore.

I would suggest to use the Kartographer extension because it is maintained by the Wikimedia Foundation. This suggestion has several shortcomings however:

All of those issues relate to the fact that WMF first developed this extension for themselves only. They did not take into account other setups or common practices employing Leaflet. I got in touch with their German chapter and they said they will not address these points in 2022 but maybe later. MediaWiki 1.37 has its end of live in November 2022 however.

Tigerfell commented 2 years ago

Related Phabricator tickets for further research

1ec5 commented 2 years ago

There’s also a Maps extension. It’s actively maintained and based on Leaflet like MultiMaps, and it seems to address some of the caveats above. At a glance, the main downside would probably be that it’s more complex than MultiMaps.

lectrician1 commented 2 years ago

What's the decision on what we will replace it with so that we can get this moving? Using the Maps extension seems like the clear solution to me.

grischard commented 2 years ago

@lectrician1 as far as I can tell, no one is planning to work on it right now. Solving this would help with the wiki upgrade (#760). Do you want to take the lead on migrating to the Maps extension?

Firefishy commented 2 years ago

I can see advantages to both Kartographer and Maps extensions. I do like something that Wikimedia supports, but the attribution would need to be fixed.

lectrician1 commented 2 years ago

@grischard

Do you want to take the lead on migrating to the Maps extension?

Of course! But I don't know how!

I don't know how the current maps work so I can look into it. Do I need to research configuring the extensions? Will I end up editing chef files?

1ec5 commented 1 year ago

It is impossible to show another tile layer like Thunderforest per default. One always has to access the map and then switch the layer individually.

There is a $wgKartographerStyles configuration variable that allows the <mapframe> to specify one of the values in the mapstyle="…" attribute. However, all it does is insert the map style after the $wgKartographerMapServer in the URL. It isn’t flexible enough to load a layer from a different host. As a workaround, the same MediaWiki:Kartographer.js or MediaWiki:Kartographer-wv-layer-wikimedia mentioned in https://github.com/openstreetmap/chef/pull/552#issue-1501381457 could hot-swap the tile layers’ base URLs.