Logo Voyage

Template:Mapmask Voyage Tips and guide

You can check the original Wikivoyage article Here
[view] [edit] [history] [purge] Template documentation

Function

    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

    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,long pairs 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:
    View full screen dynamic map for Brooklyn/Downtown

    Useful tools

    Other examples

    param name default meaning
    group mask Name of the group to use for the highlighting
    latitude 0
    longitude 0
    zoom 0
    text empty (hides it) for <maplink>, what text to show
    mask (show as mask) if set, will show highlight instead of a mask
    title See GeoJson simple style for these
    description
    fill
    fill-opacity 0.3
    stroke-width 0.5
    stroke
    stroke-opacity
    tag maplink Which tag to use. Can be "maplink", "mapframe", or others like "syntaxhighlight" for debugging
    pretty Useful for debugging - shows json as pretty printed. Do not use for production


    Nothing is shown

    "{{Mapmask | 10,-30 | 50,-30 | 40,30 | 10,30 }}"
    ""

    With 'text='

    {{Mapmask | zoom=2 | text= | 10,-30 | 50,-30 | 40,30 | 10,30 }}

    With 'text="Something"'

    {{Mapmask | zoom=2 | text=Something | 10,-30 | 50,-30 | 40,30 | 10,30 }}

    tag=mapframe

    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}}

    Debuging

    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

    • {{mapframe}} - Template used to add a dynamic map to an article.
    • {{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.


    Discover



    Powered by GetYourGuide