Filtered format

From Maps for MediaWiki

The Semantic Result Formats (SRF) extension provides a filtered format that shows query results in switchable views with client-side filtering, including a map view. Since SRF 6.0.0, that map view can draw on the Maps extension.

What the filtered map view takes from Maps:

  • Custom base layers: layer names defined via $egMapsLeafletLayerDefinitions (see custom layers) can be used in its map view layers parameter. Custom layer names require Maps 13.1.x, or Maps 14.2.0 or later.
  • GeoJSON overlays: its map view geojson parameter takes a page in the GeoJson: namespace, or a URL, and shows it as an overlay on top of the result markers. Fetching is handled by Maps (see Leaflet GeoJSON) and works with any currently supported version of Maps.

What it does on its own: the filtered map view ships its own copy of Leaflet, does its own marker clustering, and has its own map provider configuration parameter ($srfgMapProvider). None of the Maps display parameters documented on this wiki apply to it.

Maps is an optional dependency for the filtered format: without Maps, leaflet-providers layer names still work, and only custom layer names and the GeoJSON overlay are unavailable. The load order of the two extensions in “LocalSettings.php” does not matter.

For parameters and examples, see Help:Filtered format on semantic-mediawiki.org. For showing query results on a map with Maps’ own Leaflet format, including dynamic coordinate loading for large result sets and marker clustering, see Leaflet SMW queries.