Help:KML export

From Mapping on MediaWiki
Jump to: navigation, search

User manual

Introduction

Coordinates

Geocoding

Displaying maps

Displaying markers

Customizing markers

Mapping services

Semantic mapping

Coordinates data-type

Querying coordinate data

Distance query

Maps in forms

Admin manual

Semantic Maps adds, since version 0.7.3, a KML export format to SMW. This format allows you to export queried geographical data using a standardized format and use it in other applications.

Special:Ask example

This example query results in a link "View the KML file" at the bottom of the Special:Ask page. When clicking this link, you will get the KML file. You can point to the destination of the link from your application, and will get an up-to-date version of the file every time it's requested.

Inline ask example

This inline query

{{
#Ask: [[Has coordinates::+]]
| ?Has coordinates
| ?Located in
| ?Has location type 
| format=kml
}}

results into:

… further results

This example demonstrates the usage of some of the parameters supported by the kml format and

{{
#Ask: [[Has coordinates::+]]
| ?Has coordinates
| ?Located in
| ?Has location type 
| format=kml
| pagelinktext=Check out $1 on our wiki!
| linkpropvalues=yes
}}

results into:

… further results

Customizing the KML

Since version Semantic Maps 0.7.4, you can use these parameters to tweak the KML generated by the kml printer. Naturally you can also make use of the standard parameters available in queries.

Parameter Type Default Description
linkpage yes/no yes If a link to the page should be made or not.
linkpropnames yes/no no If properties should be linked to or not.
linkpropvalues yes/no no If property values should be linked to (when they are pages) or not.
linkabsolute yes/no yes If links should be absolute or not (relative).
pagelinktext text View article $1 (internationalized) The text used for the link to the page (if it's created). $1 will be replaced by the page name.

Import examples

An example import of the resulting KML into Google Maps MyMaps can be found here. Another example where some of the parameters introduced in 0.7.4 where used can be found here


This documentation page applies to all (Semantic) Maps versions from 0.7.4 to the most current version.
Other versions: 0.7.3 – 0.7.3      

Help:KML export en 0.7.4