Maps in Mediawiki: Difference between revisions
Appearance
Ttenbergen (talk | contribs) |
Ttenbergen (talk | contribs) |
||
| Line 2: | Line 2: | ||
== Maps extension == | == Maps extension == | ||
[https://maps.extension.wiki Maps extension] with an inline Cargo query | [https://maps.extension.wiki Maps extension] with an inline Cargo query to set targets and a line | ||
{#cargo_query: table=Place | {{#display_map: | ||
{{#cargo_query: table=Place | |||
|fields = CONCAT(Coordinates__full, '~', Name , '~',Description ) | |fields = CONCAT(Coordinates__full, '~', Name , '~',Description ) | ||
|format=list | |format=list | ||
|delimiter=; | |delimiter=; | ||
|no html | |no html | ||
} | }} | ||
|lines= {{#cargo_query: table=Place | |||
|fields = Coordinates__full | |||
{{# | |where=Name="North Forge" | ||
{{#cargo_query: table=Place | |format=list | ||
|fields = | |delimiter=; | ||
|no html | |||
}}:{{#cargo_query: table=Place | |||
|fields = Coordinates__full | |||
|where=Name="WRC" | |||
|format=list | |format=list | ||
|delimiter=; | |delimiter=; | ||
Revision as of 21:39, 2022 November 11
This page is a test ground and demo for using maps in mediawiki.
Maps extension
Maps extension with an inline Cargo query to set targets and a line
{{#display_map:
{{#cargo_query: table=Place
|fields = CONCAT(Coordinates__full, '~', Name , '~',Description )
|format=list
|delimiter=;
|no html
}}
|lines= {{#cargo_query: table=Place
|fields = Coordinates__full
|where=Name="North Forge"
|format=list
|delimiter=;
|no html
}}:{{#cargo_query: table=Place
|fields = Coordinates__full
|where=Name="WRC"
|format=list |delimiter=; |no html }} |copycoords=yes |resizable=on |layers=OpenStreetMap,Esri.WorldImagery
}}
Cargo Displayformat Maps
{{#cargo_query: table=Place |format = openlayers |fields = Name, Description, Coordinates |width = 400 |height = 300 }}
{{#cargo_query: table=Place |format = leaflet |fields = Name, Description, Coordinates |width = 400 |height = 300 }}
Notes
- parameters:
- |icon = Squirrelslair 200.png - works, but poor visibility
- googlemaps would require billing
Encode locations
Template:Place defines Cargo Table Place.
Locations can be grabbed from Google Maps by right-clicking on an area and then clicking on the coordinates. They can be pasted into the Coordinates template paramater.
Here are the template calls (see edit view).