Maps supports "distance queries" via its integration with Semantic MediaWiki.
Distance queries are an extension to Semantic MediaWiki's query syntax. They allow restricting results to those with coordinates close to a specified location.
Query syntax
[[PropertyName::coordinates (distance)]]
Example:
[[Coordinates::50° 50' 48" N, 4° 21' 10" E (420 km)]]
This restricts the results to pages (or subjects) with a value for the Coordinates property that is within 420 kilometers of Brussels.
Supported distance units
All units supported by the distance function are also supported in distance queries.
Accuracy
Distance queries are not entirely accurate. They restrict results by creating a bounding box (square) around the specified location. This means some results that are outside the specified range might still be included.
Example
{{#ask: [[Category:Cities]] [[Coordinates::50° 50' 48" N, 4° 21' 10" E (420 km)]]
| format=map
| ?Coordinates
}}
Loading map...
{"format":"leaflet","minzoom":false,"maxzoom":false,"limit":50,"offset":0,"link":"all","sort":[""],"order":[],"headers":"show","mainlabel":"","intro":"","outro":"","searchlabel":"... further results","default":"","import-annotation":false,"width":"auto","height":"350px","centre":false,"title":"","label":"","icon":"","lines":[],"polygons":[],"circles":[],"rectangles":[],"copycoords":false,"static":false,"zoom":false,"defzoom":14,"layers":["OpenStreetMap"],"image layers":[],"overlays":[],"resizable":false,"fullscreen":false,"scrollwheelzoom":false,"cluster":false,"clustermaxzoom":20,"clusterzoomonclick":true,"clustermaxradius":80,"clusterspiderfy":true,"geojson":"","clicktarget":"","showtitle":true,"hidenamespace":true,"template":"","userparam":"","activeicon":"","pagelabel":false,"ajaxcoordproperty":"","ajaxquery":"","locations":[{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Example_data:Amsterdam\" title=\"Example data:Amsterdam\"\u003EAmsterdam\u003C/a\u003E\u003C/b\u003E","title":"Amsterdam","link":"","lat":52.372761111111,"lon":4.8936027777778,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Example_data:Brussels\" title=\"Example data:Brussels\"\u003EBrussels\u003C/a\u003E\u003C/b\u003E","title":"Brussels","link":"","lat":50.846558333333,"lon":4.3516972222222,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Example_data:Ghent\" title=\"Example data:Ghent\"\u003EGhent\u003C/a\u003E\u003C/b\u003E","title":"Ghent","link":"","lat":51.053827777778,"lon":3.7250111111111,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Example_data:Hamburg\" title=\"Example data:Hamburg\"\u003EHamburg\u003C/a\u003E\u003C/b\u003E","title":"Hamburg","link":"","lat":53.543763888889,"lon":10.009913888889,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Example_data:Hannover\" title=\"Example data:Hannover\"\u003EHannover\u003C/a\u003E\u003C/b\u003E","title":"Hannover","link":"","lat":52.374477777778,"lon":9.7385527777778,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Example_data:London\" title=\"Example data:London\"\u003ELondon\u003C/a\u003E\u003C/b\u003E","title":"London","link":"","lat":51.507322222222,"lon":-0.12764722222222,"icon":""}],"imageLayers":[]}
Same query but without the distance restriction:
{{#ask: [[Category:Cities]]
| format=map
| ?Coordinates
}}
Loading map...
{"format":"leaflet","minzoom":false,"maxzoom":false,"limit":50,"offset":0,"link":"all","sort":[""],"order":[],"headers":"show","mainlabel":"","intro":"","outro":"","searchlabel":"... further results","default":"","import-annotation":false,"width":"auto","height":"350px","centre":false,"title":"","label":"","icon":"","lines":[],"polygons":[],"circles":[],"rectangles":[],"copycoords":false,"static":false,"zoom":false,"defzoom":14,"layers":["OpenStreetMap"],"image layers":[],"overlays":[],"resizable":false,"fullscreen":false,"scrollwheelzoom":false,"cluster":false,"clustermaxzoom":20,"clusterzoomonclick":true,"clustermaxradius":80,"clusterspiderfy":true,"geojson":"","clicktarget":"","showtitle":true,"hidenamespace":true,"template":"","userparam":"","activeicon":"","pagelabel":false,"ajaxcoordproperty":"","ajaxquery":"","locations":[{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Example_data:Amsterdam\" title=\"Example data:Amsterdam\"\u003EAmsterdam\u003C/a\u003E\u003C/b\u003E","title":"Amsterdam","link":"","lat":52.372761111111,"lon":4.8936027777778,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Example_data:Berlin\" title=\"Example data:Berlin\"\u003EBerlin\u003C/a\u003E\u003C/b\u003E","title":"Berlin","link":"","lat":52.517036111111,"lon":13.388861111111,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Example_data:Brussels\" title=\"Example data:Brussels\"\u003EBrussels\u003C/a\u003E\u003C/b\u003E","title":"Brussels","link":"","lat":50.846558333333,"lon":4.3516972222222,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Example_data:Ghent\" title=\"Example data:Ghent\"\u003EGhent\u003C/a\u003E\u003C/b\u003E","title":"Ghent","link":"","lat":51.053827777778,"lon":3.7250111111111,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Example_data:Hamburg\" title=\"Example data:Hamburg\"\u003EHamburg\u003C/a\u003E\u003C/b\u003E","title":"Hamburg","link":"","lat":53.543763888889,"lon":10.009913888889,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Example_data:Hannover\" title=\"Example data:Hannover\"\u003EHannover\u003C/a\u003E\u003C/b\u003E","title":"Hannover","link":"","lat":52.374477777778,"lon":9.7385527777778,"icon":""},{"text":"\u003Cb\u003E\u003Ca href=\"/wiki/Example_data:London\" title=\"Example data:London\"\u003ELondon\u003C/a\u003E\u003C/b\u003E","title":"London","link":"","lat":51.507322222222,"lon":-0.12764722222222,"icon":""}],"imageLayers":[]}