PayPal-donate (Wiki).png
O ile nie zaznaczono inaczej, prawa autorskie zamieszczonych materiałów należą do Jana Woreczko & Wadi.

(Unless otherwise stated, the copyright of the materials included belong to Jan Woreczko & Wadi.)


Szablon:GEMap/TemplateDoc

Z Wiki.Meteoritica.pl

(Różnice między wersjami)
(Utworzył nową stronę „== Aplet GoogleMaps == Applet: http://www.mediawiki.org/wiki/Extension:Google_Maps Opis składni: http://www.mediawiki.org/wiki/Extension:Google_Maps/Syntax == Exte...”)
(Extension options)
Linia 12: Linia 12:
| kml2 =  
| kml2 =  
...
...
-
| kml15 =  
+
| kml29 =  
-
| kml16 =  
+
| kml30 =  
| lat = {{{lat|52.00}}}
| lat = {{{lat|52.00}}}
| lon = {{{lon|20.00}}}
| lon = {{{lon|20.00}}}

Wersja z 15:01, 3 paź 2012

Spis treści

Aplet GoogleMaps

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|400}}}
| height = {{{height|300}}}
| type = {{{type|terrain}}}
| controls = {{{controls|medium}}}
| scale = {{{scale|yes}}}
| units = {{{units|meters}}}
| selector = {{{selector|yes}}}
}}

Available coding options are:

  • width (in pixels; default is 740)
  • height (in pixels; default is 600)
  • lat (the center latitude on the map)
  • lon (the center longitude on the map)
  • zoom (the zoom level; 0 is the furthest away, 21 is the closest in)
  • type ("normal" or "map", "hybrid", or "satellite"; default is "hybrid")
  • 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)
  • 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="map" 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>


Osobiste