Template:Wy/si/mapmask/උපදෙස්
| මෙය Template:Wy/si/mapmask සඳහා වන උපදෙස් උප පිටුවක් වෙයි. මෙහි, template පිටුව පිළිබඳ භාවිත උපදෙස්, ප්රවර්ග සහ වෙනත් ප්රධාන පිටුව තුළ සෘජුව පැවතීම අවශ්ය නොවන දෑ අන්තර්ගත වනු ඇත. |
Function
[edit source]This template overlays a dark polygonal mask on a dynamic map so that the subject area is more clearly delineated. Mask display can be turned on or off by toggling the "GPX tracks / Map mask" layer control.
Usage
[edit source]See Wikivoyage:How to use dynamic maps#Custom districts and tracks for instructions on creating GPX tracks for use with this template.
The points of the mask polygon are marked with {{Mapmask|lat,long|lat,long| ... |lat,long}}
- Required parameters:
|lat,longpairs of geographical co-ordinates for each corner of the masking polygon.
- Example:
{{Mapmask|43.28915,-78.19371|43.28928,-78.18969|43.28828,-78.18745|43.28543,-78.18724|43.28555,-78.19381}}
- A working example:
Useful tools
[edit source]- Route Editor -- Online editor to create coordinates for Mapmask as a GPX track file.
- OSM Route Manager -- Exporting OpenStreetMap routes as a GPX route file.
- GPX Optimizer -- Simplifier/Optimizer for GPX files.
- Gpx2mapmask -- Converting GPX track or route file to Mapmask format.
- Mapmask ↔ GeoJSON Converter -- Convert a GeoJSON polygon into Mapmask format.
Other examples
[edit source]
Nothing is shown
[edit source]"{{Mapmask | 10,-30 | 50,-30 | 40,30 | 10,30 }}"
"Template:Mapmask"
With 'text='
[edit source]{{Mapmask | zoom=2 | text= | 10,-30 | 50,-30 | 40,30 | 10,30 }}
Template:Mapmask
With 'text="Something"'
[edit source]{{Mapmask | zoom=2 | text=Something | 10,-30 | 50,-30 | 40,30 | 10,30 }}
Template:Mapmask
tag=mapframe
[edit source]Show highlighted, red-colored area. {{Mapmask | tag=mapframe | align=left | zoom=2 | mask= | fill=#FF0000 | group= | width=420|height=420 |10,-30|50,-30|40,30|10,30}} Template:Mapmask
Debuging
[edit source]This will show data as pretty-printed JSON using the syntaxhighlight extension
{{Mapmask | tag=syntaxhighlight | pretty= | lang=json | 10,-30 | 50,-30 | 40,30 | 10,30 }}
See also
[edit source]- {{Wy/si/mapframe}} - Template used to add a dynamic map to an article.
- {{Wy/si/mapshape}} - Used to create a mask, shape or line using data from the OpenStreetMap database; useful for city or region borders, or for showing routes.