Module:Infobox dim/doc: Difference between revisions
Appearance
Content deleted Content added
mark as high use |
document new functionality |
||
Line 16: | Line 16: | ||
* area_acre |
* area_acre |
||
{{div col end}} |
{{div col end}} |
||
When producing scale or zoom, module can use size of object on screen specified via {{para|viewport_cm}} or {{param|viewport_px}}. Defaults to 10cm, to match geohack. |
|||
In addition, the module can accept and convert between geohack parameters: |
In addition, the module can accept and convert between geohack parameters: |
Revision as of 17:13, 5 October 2024
![]() | This Lua module is used on approximately 250,000 pages. To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
Code to convert information about physical size of objects into parameters for geohack or mapframes.
The following parameters describe the physical object size:
- length_km
- length_mi
- width_km
- width_mi
- area_km2
- area_mi2
- area_ha
- area_acre
When producing scale or zoom, module can use size of object on screen specified via |viewport_cm=
or {{{viewport_px}}}
. Defaults to 10cm, to match geohack.
In addition, the module can accept and convert between geohack parameters:
- dim
- scale
- type (e.g., "mountain" or "city")
- population (for type="city" only)
Usage
{{#invoke:Infobox dim|dim}}
Generates dim string (e.g, "24km") suitable for geohack link
{{#invoke:Infobox dim|scale}}
Generates scale (e.g, 100000) suitable for geohack link
{{#invoke:Infobox dim|zoom}}
Generates Open Street Map zoom level (e.g, 12) suitable for use in mapframes