Template:Divesite infobox: Difference between revisions

From Dive Atlas
(change to geo uri)
(Remove "Has region" property (it now duplicates "Part of"))
 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div style="float: right; margin-left:15px">
<div class="divesiteinfobox">
{| class="wikitable" style="border:1px solid black"
{| class="wikitable" style="border:1px solid black; width:100%;"
!colspan="2" | Site Info
!colspan="2" | Site Info
|-
|-
Line 7: Line 7:
|-
|-
! Coordinates
! Coordinates
| <a href="geo:{{{coordinates}}}">{{{coordinates}}}</a>
| [geo:{{#invoke:String|replace|source={{{coordinates}}}|pattern=%s|replace=|plain=false}} {{{coordinates}}}]
|-
|-
! Region
! Region
| {{{region}}}
| {{{region}}}
|-
|-
! Access via
! Access
| {{{site_access_type}}}
| {{{site_access_type}}}
|-
|-
Line 19: Line 19:
|-
|-
|}
|}
{{#if:{{{coordinates}}}|{{ #display_map:{{{coordinates}}}|width=300|height=300|copycoords=yes|defzoom=13|resizable=yes|fullscreen=yes }} }}
</div>


<!-- Map -->
{{#if:{{{coordinates}}}|{{ #display_map:{{{coordinates}}}|copycoords=yes|defzoom=13|resizable=yes|fullscreen=yes }} }}
</div><includeonly>
<!-- SMW properties -->
{{#set:Has coordinates={{{coordinates}}} }}
{{#set:Has site type={{{type}}} }}
{{#set:Has access type={{{site_access_type}}} }}
<!-- Categories -->
{{#if:{{{type}}}|[[Category:{{{type}}}]]}}
{{#if:{{{type}}}|[[Category:{{{type}}}]]}}
 
{{IsPartOf|{{{region}}}}}
<noinclude>
[[Category:Dive sites]]
</includeonly><noinclude>
<templatedata>
<templatedata>
{
{
Line 53: Line 60:
"coordinates": {
"coordinates": {
"label": "GPS coordinates",
"label": "GPS coordinates",
"description": "GPS coordinates of the site. For large sites such as lakes, use something representative such as the typical entrypoint or a major feature.",
"description": "Decimal GPS coordinates of the site. For large sites such as lakes, use something representative such as the typical entrypoint or a major feature. Format should be 'lat,long'.",
"example": "36°01'57.4\"N 75°39'50.3\"W",
"example": "36.032611, -75.663972",
"type": "string",
"type": "string",
"suggested": true
"suggested": true
},
},
"Type": {
"type": {
"label": "Type",
"label": "Type",
"description": "General type of site; ocean, lake, wreck, cave, river, etc. If multiple types are present, add multiple.",
"description": "General type of site; ocean, lake, wreck, cave, river, etc. If multiple types are present, add multiple.",
Line 64: Line 71:
"required": true
"required": true
}
}
}
},
"description": "This is a \"god\" template that should be invoked on every page documenting an individual dive site. It does the following:\n\n- Adds an info box displaying basic site information\n- Adds a slippy map with a pin on the geolocation\n- Inserts various SMW properties\n- Calls IsPartOf to place the article in a region"
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Latest revision as of 16:26, 6 January 2025

Site Info
Type {{{type}}}
Coordinates {{{coordinates}}}
Region {{{region}}}
Access {{{site_access_type}}}
Depth range {{{depth_range}}}
Loading map...

This is a "god" template that should be invoked on every page documenting an individual dive site. It does the following: - Adds an info box displaying basic site information - Adds a slippy map with a pin on the geolocation - Inserts various SMW properties - Calls IsPartOf to place the article in a region

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Regionregion

The general region

Suggested values
Arctic Circle
Example
Caribbean
Stringrequired
Site access typesite_access_type

How the site is typically accessed - boat, shore, etc.

Example
Boat
Unknownrequired
Depth rangedepth_range

The depth range for dives at this site. It's okay for this to be very large; e.g. for sites where both recreational and technical dives can be conducted, the range could be something like 5-100m

Example
5-10m
Stringsuggested
GPS coordinatescoordinates

Decimal GPS coordinates of the site. For large sites such as lakes, use something representative such as the typical entrypoint or a major feature. Format should be 'lat,long'.

Example
36.032611, -75.663972
Stringsuggested
Typetype

General type of site; ocean, lake, wreck, cave, river, etc. If multiple types are present, add multiple.

Example
Wreck
Unknownrequired