I'm currently serving a custom map with qgis-mapserver and that works well. However, my next step is Mediawiki integration, and for reasons of GeoJSON overlays, I must use the Leaflet option there.

It appears to me that Leaflet only accepts TMS with x/y/z coordinates, not WMS with bbox parameters. If I am mistaken, please tell me how to make Leaflet use WMS.

If not, I have set up tilecache.cgi but that also works with a bbox parameter, though it creates the x/y/z tile structure on disk. I could also throw gdal2tiles at it.

Does anyone have the workflow from QGIS to MediaWiki Maps (with Leaflet) set up successfully? I've found nothing in Google nor the Maps or Leaflet documentations.

QGIS 3.8, MediaWiki 1.33.0 with Maps 7.3.0

The intended effect is similar to this: https://www.semantic-mediawiki.org/wiki/Extension:Maps/Geojson -- just with my own map source.

  • Leaflet L.tileLayer.WMS object is based on bbox strategy, but only supports tiled sources. If you have different source format (GeoJSON, ...), you could try leaflet.wms plugin: github.com/heigeo/leaflet.wms – TomazicM Sep 8 '19 at 9:10
  • thanks, that is one piece of the puzzle. – Tom Sep 8 '19 at 17:59
  • A WMS or tile service won't give you GeoJSON. – nmtoken Sep 9 '19 at 9:57
  • @nmtoken no, but Mediawiki Maps supports GeoJSON pages for geolocation of features, and it works only with leaflet. – Tom Sep 9 '19 at 11:00
  • I can't see the point of asking how to get WMS to work with Leaflet if, you want a GeoJSON input to Leaflet. You''l need something that serves vector output like WFS using something like github.com/azgs/azgs-leaflet – nmtoken Sep 9 '19 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.