Extension:KML Export/kml.style

From MediaWiki.org
Jump to: navigation, search
KML Export FeaturesInstallationQuick startHow to useParser functionsSpecial pagesConfiguration

This parser function creates a named style that can be referenced by the style= property of kml.placemark and kml.folder.

You should set styles in category pages or in the kmlexport-common system message, not on article pages where placemarks are placed. This way, styles are shared among all articles.

This function instantiates a <Style> KML feature.

Syntax[edit | edit source]

{{#kml.style: id 
|style
|...
}} 

Arguments[edit | edit source]

id
XML identifier of this style.
style
One or more style definitions. See Style syntax.

Returns[edit | edit source]

On success, the style is set and the function returns no text. If the syntax is not understood, a red error message box is displayed.

Examples[edit | edit source]

{{#kml.style: statue
|IconStyle(href=http://example.com/kml/statue.png scale=0.8)
|LabelStyle(#ffccffcc scale=0.8)
}}
{{#kml.style: airport
|IconStyle(href=http://example.com/kml/airport.png scale=0.8)
|LabelStyle(#ffffcccc scale=0.8)
}}
 
{{#kml.style: default
|BalloonStyle({{#kml.text:
== $[name] ==
[[Main page]], [[Special:Recentchanges|Recent changes]]
----
$[description]
}})
}}

See also[edit | edit source]