Bản mẫu:Hộp địa lý/doc

180pxĐây là tiêu bản hộp thông tin cho mọi loại đặc điểm địa lý. Phiên bản này (hay Geobox 2) thay thế cho các tiêu bản Geobox (hay Geobox 1) cũ. Do đó Geobox 2 không có các tiêu bản cụ thể cho từng đặc điểm địa lý cụ thể mà chỉ có một tiêu bản có thể áp dụng cho mọi loại dữ liệu dùng trong Geoboxes 1.0. Ngoại trù cách gọi tiêu bản, mọi tên trường không thay đổi.

**Đặc trưng**
Geoboxes 2 duy trì các chức năng như Geoboxes 1:  - tự tạo liên kết wiki;- chuyển đổi đơn vị tự động giữa hệ mét với hệ Anh-Mỹ;- tự động đặt điểm đánh dấu vị trí trên bản đồ định vị (nếu có) theo các tọa độ hay giá trị X/Y;- không cần định dạng dữ liệu đầu vào, nó được tiêu bản tự thực hiện.
Một vài đặc trưng mới:- nhiều trường mới;- bản đồ nền;- danh sách tùy chọn có thể đóng lại được cho mọi trường;- cờ tự động tùy chọn cho quốc gia và/hoặc bang;- các thể loại quốc tế như Di sản thế giới vì thế không cần hộp thông tin thứ hai trên cùng một trang

**Sử dụng**
left Please do read at least this!- Copy the appropriate blank template into the edited page and fill in the fields. Do not re-use a template from another page.- Please don't erase empty fields which might be completed later. Such empty fields are not displayed and don't hinder anything.- Do not put multiple items into a single field, use indexed fields. Not: city = Valencia, Alicante, Murcía but city = Valencia | city1 = Alicante | city2 = Murcía- It isn't necessary to put  and  markup around anything that links to an existing article, the template does it for you. All cities in the example above will be linked to the appropriate articles. To turn off auto-linking, put the  tag around the text.- Before raising a question read the documentation. Though not perfect it contains valuable information.

**Fields**

**Field behavior**
There exist base fields whose output can be modified or extended by adding additional fields, these always bear the name of the base field plus the name of the additional field starting with an underscore ("_"). The additional fields are not present in the blank templates as they can be added to virtually any Geobox. Following additional fields are defined for all base fields:- _type - for redefining the default field name, e.g. the default field name for the region field is Region, adding region_type it can be changed to display Province, Department …. N.B.: keep the text short, it is always displayed on one line, if it is too long, the left column of the geobox gets too wide.- _note - any sort of note which is printed after the field value, it can be even a reference, though the author of Geoboxes discourages from doing so as the implementation of  tags is very poor. The note is printed in a bit different font, currently implemented as italics.- _label : puts the HTML title property on the item (the text displays on hover), it's useful for hints, it can be a longer text then the _type field.
The fields that link to existing articles don't need to be put between  and  markup, this is added automatically if the page exists. However, the markup can be used when the text of the link is different from the link itself, e.g. . To turn off auto-linking, put the  tag around the text, e.g. .

**Multiple fields**
 Some fields might contain multiple values, these are not to be put in a single field and separated by commas but using numbered additional fields (e.g. for the country field there also exist country1, country2, country3 …. The additional "indexed" fields are usually not present in the blank templates. Usually up to 16 such fields can be used.- When there are too many indexed fields, adding appropriate _fold = 1 parameter causes the values to be "folded" upon page load, with the "show/button" enabling the values to be shown/hidden.- For countries and states adding appropriate _flag = 1 parameter prints a small flag in front of every country/state in the list.

**Units**
All figures can be in either metric (default) or imperial (miles, feet etc.) units; the Geoboxes display both, automatically calculating imperial figures from metric or metric from imperial ones. Unformated numbers (i.e. without commas) must be entered, otherwise the auto-conversion produces an error. The output is "nicely" formatted. Following additional fields can be used:- _imperial - for input in imperial/customary units- _round - for changing the rounding precision of auto-conversion, it's the position from the decimal point to which the figure is rounded, negative values can be used when the input figure is rounded/approximate, default value is 0- _unit - for changing the default unit, appropriate unit abbreviation should be used; the default unit for e.g. area is usually square kilometre (or square mile respectively), this can be changed to ha for hectare, acre for acre etc.
The last two additional fields are defined for every field using any units, if there is a set of similar fields, e.g. for area (area, area_land, area_water etc., the _round and _unit fields of the basic one are applied on all of them if they aren't specifically set)

**Coordinates**
Coordinates can be entered in two ways:- using separate _d, _m, _s…fields, _s and _m can be dropped out, the coordinate display template is adjusted accordingly- using just _d field and a decimal number, the hemisphere can be defined by either _NS, _EW fields or by using negative figures for western and southern hemisphere (these two systems mustn't be combined)
For every location type which can be described in coordinates, there exist two additional fields- _coordinates_type (named coordinates_type for the main location), which can be used to override the default type and region for coordinates. If coordinates_type is needed, the possible parameters are described at WP:GEO#Parameters
:If coordinates_type is not used:
:*The coordinates region parameter will be set according to "country", e.g. "country = United Kingdom" will generate coordinates with "region:GB". For Canada and the United States, in addition, "state" will be used, e.g. "country = Canada" and "state = Ontario" will result in "region:CA-ON".
:*The coordinates type parameter has the following default values:
:**"type:city" for Geobox Borough|City|Settlement|settlement|town|Town|Township|Village
:**"type:river" for Geobox River|Stream|Creek
:**"type:mountain" for Geobox Mountain|Range (The use of this template for mountain ranges is deprecated. Use  Infobox mountain range instead. The remaining instances are being replaced.)
:**"type:isle" for Geobox Island
:**"type:adm1st" for Geobox Province for a series of countries where provinces are first level subdivision. For all currently undefined countries, this renders as type:state
:**"type:landmark" for all other features
::For "type:city", if the value in field "population" is a number, coordinates type is set to "type:city(population)". If the population field includes text, symbols or commas, "type:city" is used instead.- _coordinates_format (named coordinates_format for the main location) to override how the coordinates are displayed, if the input is decimal the output is decimal too, if the input is DMS so is the output, the possible values are self-explanatory dms and dec
Both _type and _format fields can be defined for every location with coordinates separately or by the general coordinates_type and coordinates_format fields. 
If coordinates_no_title is assigned any value (typically just 1), it switches off generation of the coordinates in the title of the page, this is useful when another template on the page displays the coordinates in the title too and it cannot be turned off.
coordinates_note can be used with lat_d, long_d, etc. to provide a note or reference.
Please be sensible when setting the coordinates, tenths or hundredths of seconds mean unnecessary centimeter precicision.

**Maps**
The map field should be used for a location map of the feature, i.e. where it is located within a country. The location map can be of three types:- Self-contained location map, as in Greater Fatra, for example.- Semi-automated locator dot. The map field contains background map, whereas locator_x and locator_y contain relative coordinates of the locator dot (as a percent of the map width, inserted without the % symbol), this system can be used when the map is not (or cannot be) calibrated for the automated locator dot.  - Fully automated locator dot. If coordinates of the location are defined in the Geobox and a calibrated map exists, the locator dot is placed automatically based on the coordinates (map_locator field defines the appropriate map calibration), as in Ostrá, for example. The same locator calibration can be used for all maps derived from one base map; e.g., Lysá hora and Plasy share the same calibration, though the background map is different. The existing calibrations are listed here: Geobox locator.
See also Template talk:Geobox2 map for further info on maps.

**Geobox layout**
 geobox_width - width of the Geobox in pixels (without px, just the figure), it can be used when there are more Geoboxes or images stacked below each other and the same width is desirable; not in blank templates.

**Geobox 1.0 > Geobox 2.0 conversion**
There's now a testing version of a semi-automated tool that can convert a page with Geobox 1.0 template to a page with Geobox 2.0. The tool is located at 
. 
You must add the full address to the page to convert at the end of the previous link, e.g. 
.
It changes the template call and rearranges the fields in the Geobox 2 style (and it also renames several fields, although the old field names are accepted too).
The page you get displayed is the full wiki text of the article with the converted Geobox. Just copy it all end paste it over all the text in the edit field of the page. 
#