सामग्री पर जाएँ

साँचा:मैपफ्रेम

विकियात्रा से
(साँचा:Mapframe से अनुप्रेषित)
[view] [edit] [history] [purge] Template documentation

Function

This template acts as a frame for an external map. Javascript is used to replace "mapdiv" with an iframe. See Wikivoyage:How to use dynamic maps and Wikivoyage:Dynamic maps Expedition for more information.

Usage

{{Mapframe|1|2|zoom=|height=|width=|layer=|staticmap=|align=|name=}}

Required parameters

|1 latitude of the map's centre, valid range: -90.0 to 90.0
|2 longitude of the map's centre, valid range: -180.0 to 180.0

Optional parameters

|zoom= zoom level, default=14, valid range: 0 to 18 or auto (0=Earth, 18=city block, auto=showing all markers)
|height= height of map frame, default is 420px - should be at least 370 to provide enough space for the layers menu to expand
|width= width of map frame, default is 420px
|staticmap= static map image, a normal png or svg file
|align= alignment of map frame, default is right (other values are "left" and "center")
|name= name of the location as you want it to appear in the caption - default display is the article title with parent page and disambiguation removed. For an example of this parameter's usage, see Amsterdam/Binnenstad.
|layer= see Wikivoyage:How to use dynamic maps#Mapframe

Examples

 {{Mapframe|51.47766|0.00115}}
 {{Mapframe|zoom=auto}} (lat/long is not required)
 {{Mapframe|51.47766|0.00115|zoom=14|height=400|width=400}}
 {{Mapframe|51.47766|0.00115|zoom=14|height=400|width=400 |layer=W|staticmap=map.png}}
 {{Mapframe|51.47766|0.00115|zoom=14|height=400|width=400 |layer=MLSCG|align=center|name=the Binnenstad}}

Associated template

  • {{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.
  • {{mapmask}} - Used to create a mask using manually entered latitude/longitude pairs; useful for drawing city or region borders that aren't available from OpenStreetMap.

Code

  • Module:Map used to create <mapframe> tag with all of the parameters

This template acts as a frame for an external map. Javascript is used to replace "mapdiv" with an iframe. See [[Wikivoyage:How to use dynamic maps]] and [[Wikivoyage:Dynamic maps Expedition]] for more information.

साँचे के पैरामीटर्स[साँचा डेटा सम्पादित करें]

इस साँचे के लिए पैरामीटरों के इनलाइन प्रारूपण को प्राथमिकता दी जाती है।

पैरामीटरविवरणप्रकारस्थिति
Latitude1

Latitude of the map's centre, -90 to 90

उदाहरण
51.47766
संख्यासुझावित
Longitude2

Longitude of the map's centre, -180 to 180

उदाहरण
0.00115
संख्यासुझावित
Zoom levelzoom

Zoom level from 0-18 (0=Earth, 18=city block, auto=fit all markers)

उदाहरण
14
संख्यासुझावित
Widthwidth

Width of map frame

डिफ़ॉल्ट
420
उदाहरण
400
संख्यावैकल्पिक
Heightheight

Height of map frame

डिफ़ॉल्ट
420
उदाहरण
400
संख्यावैकल्पिक
Namename

Name of the location as you want it to appear in the caption

डिफ़ॉल्ट
Article title
उदाहरण
the Binnenstad
अज्ञातवैकल्पिक
Alignmentalign

Alignment of the map frame, left/right/center

डिफ़ॉल्ट
right
उदाहरण
center
स्ट्रिंगवैकल्पिक
Layerlayer

List of layers to show, see [[Wikivoyage:How to use dynamic maps#Mapframe]]

उदाहरण
MLSCG
स्ट्रिंगवैकल्पिक
Static map imagestaticmap

A PNG or SVG file to serve as the static map image

उदाहरण
map.png
फ़ाइलवैकल्पिक