(Unless otherwise stated, the copyright of the materials included belong to Jan Woreczko & Wadi.)
Szablon:GEMap/TemplateDoc
Z Wiki.Meteoritica.pl
m |
m |
||
Linia 21: | Linia 21: | ||
| lon = {{{lon|20.00}}} | | lon = {{{lon|20.00}}} | ||
| zoom = {{{zoom|5}}} | | zoom = {{{zoom|5}}} | ||
- | | width = {{{width| | + | | width = {{{width| {{GEFrame-dfltWidth}} }}} |
- | | height = {{{height| | + | | height = {{{height| {{GEFrame-dfltHeight}} }}} |
| type = {{{type|terrain}}} | | type = {{{type|terrain}}} | ||
| controls = {{{controls|medium}}} | | controls = {{{controls|medium}}} | ||
Linia 33: | Linia 33: | ||
Available coding options are: | Available coding options are: | ||
- | * width (in pixels; default is 400) | + | * width (in pixels; default is <nowiki>{{GEFrame-dfltWidth}}</nowiki> = 400) |
- | * height (in pixels; default is 300) | + | * height (in pixels; default is <nowiki>{{GEFrame-dfltHeight}}</nowiki> = 300) |
* lat (the center latitude on the map; default is 52.00) | * lat (the center latitude on the map; default is 52.00) | ||
* lon (the center longitude on the map; default is 20.00) | * lon (the center longitude on the map; default is 20.00) | ||
* zoom (the zoom level; 0 is the furthest away, 21 is the closest in; default is 5) | * zoom (the zoom level; 0 is the furthest away, 21 is the closest in; default is 5) | ||
- | * type ("normal" or "map", "hybrid", or "satellite"; default is "hybrid"; default is "terrain") | + | * type ("normal" or "map" or "'''roadmap'''", "'''hybrid'''", or "'''satellite'''"; default is "hybrid"; default is "'''terrain'''") |
* controls (''small'' creates +/- zoom buttons, ''medium'' has zoom buttons and pan buttons, ''large'' has pan buttons with a sliding scale for zoom, and ''none'' has no buttons; default is "medium") | * controls (''small'' creates +/- zoom buttons, ''medium'' has zoom buttons and pan buttons, ''large'' has pan buttons with a sliding scale for zoom, and ''none'' has no buttons; default is "medium") | ||
* selector (show the map/hybrid/satellite selector? ''yes'' (default) and ''no''.) | * selector (show the map/hybrid/satellite selector? ''yes'' (default) and ''no''.) | ||
Linia 53: | Linia 53: | ||
<pre> | <pre> | ||
<googlemap lat="52.523777" lon="13.411896" | <googlemap lat="52.523777" lon="13.411896" | ||
- | zoom="12" width="500" height="400" type=" | + | zoom="12" width="500" height="400" type="hybrid" |
controls="small"> | controls="small"> | ||
52.499683,13.333907,Kaiser Wilhelm Memorial Church | 52.499683,13.333907,Kaiser Wilhelm Memorial Church |
Wersja z 22:43, 16 paź 2018
Spis treści |
Aplet Extension:Maps
Nowy aplet wyświetlający mapy Google: http://www.mediawiki.org/wiki/Extension:Maps, nie jest jeszcze zaimplementowany na Wiki.Meteoritica.pl
Aplet Extension:Google Maps
Applet: http://www.mediawiki.org/wiki/Extension:Google_Maps
Opis składni: http://www.mediawiki.org/wiki/Extension:Google_Maps/Syntax
Extension options
{{GEMap | kml1 = | kml2 = ... | kml29 = | kml30 = | lat = {{{lat|52.00}}} | lon = {{{lon|20.00}}} | zoom = {{{zoom|5}}} | width = {{{width| {{GEFrame-dfltWidth}} }}} | height = {{{height| {{GEFrame-dfltHeight}} }}} | type = {{{type|terrain}}} | controls = {{{controls|medium}}} | scale = {{{scale|yes}}} | units = {{{units|meters}}} | selector = {{{selector|yes}}} }}
Available coding options are:
- width (in pixels; default is {{GEFrame-dfltWidth}} = 400)
- height (in pixels; default is {{GEFrame-dfltHeight}} = 300)
- lat (the center latitude on the map; default is 52.00)
- lon (the center longitude on the map; default is 20.00)
- zoom (the zoom level; 0 is the furthest away, 21 is the closest in; default is 5)
- type ("normal" or "map" or "roadmap", "hybrid", or "satellite"; default is "hybrid"; default is "terrain")
- controls (small creates +/- zoom buttons, medium has zoom buttons and pan buttons, large has pan buttons with a sliding scale for zoom, and none has no buttons; default is "medium")
- selector (show the map/hybrid/satellite selector? yes (default) and no.)
- scale (show the distance scale? yes and no (default).)
- overview (show the inset navigation map? yes and no (default).)
- icons (web address if the marker icon is customized. With "{label}" where the name of the icon will be inserted; defaults to "http://maps.google.com/mapfiles/marker{label}.png")
- icon (web address if the marker icon is not specified; the default icon is http://maps.google.com/mapfiles/marker.png)
- units ("meters" or "miles"; default is "meters".)
All attributes are optional.
So the final code might be:
<googlemap lat="52.523777" lon="13.411896" zoom="12" width="500" height="400" type="hybrid" controls="small"> 52.499683,13.333907,Kaiser Wilhelm Memorial Church 52.510019,13.369893,Berlin Philharmonie </googlemap>
Using <googlemap> in a template
If you would like to put a map inside a template, then you will need to use a slightly different coding to get the coding to work properly.
The following is an example for including a map without markers.
BAD:
<googlemap lat="{{{1}}}" lon="{{{2}}}">
GOOD:
{{#tag:googlemap|lat={{{1}}} lon={{{2}}}}}
The following is an example for including a map with markers.
{{#tag:googlemap |#770077 {{{Markers}}} |zoom=5 |lat={{{1}}} |lon={{{2}}} }}
This #tag technique only works with MediaWiki 1.12 and later.
if the above does not work, try
{{#tag:googlemap |lat={{{1}}} |lon={{{2}}} }}
Przykładowa mapa
<googlemap lat="42.717255" lon="-73.20714" zoom="14" width="400" height="300" controls="medium"> 42.711658, -73.20538, Red maple in front of the chem/computer science building 42.712225, -73.205305, Sugar maple in front of West #82C575 42.709876, -73.211946 42.71612, -73.208342 42.718201, -73.217869 42.720155, -73.204908 </googlemap>