Template:Poi
From CruisersWiki
(fix for narrow srceens) |
|||
(14 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
- | -->{{if| test={{{name|}}} | + | -->{{if| test={{not|{{{name|}}}}}{{eq|{{{name|}}}|'' ''}} | then='''{{red|Please specify POI name}}'''[[Category:Atricles with empty POI names]]}}<!-- |
- | + | ||
-->{{if | -->{{if | ||
| test={{{image|}}} | | test={{{image|}}} | ||
| then={{thumb|{{{image|}}}|{{{imagetext|}}}|{{{imagewidth|}}}}} | | then={{thumb|{{{image|}}}|{{{imagetext|}}}|{{{imagewidth|}}}}} | ||
}}<!-- | }}<!-- | ||
- | --><{{block|{{{inline|}}}}} class="h- | + | --><{{block|{{{inline|}}}}} class="h-item cw-poi" id="{{anchorencode:{{{name}}}}}"><!-- |
-->{{?|test={{{inline|}}}||<h4 style{{=}}"display:none">{{{name}}}</h4><!-- put POI into TOC -->}}<!-- | -->{{?|test={{{inline|}}}||<h4 style{{=}}"display:none">{{{name}}}</h4><!-- put POI into TOC -->}}<!-- | ||
--><{{block|{{{inline|}}}}} style="display:none"><!-- | --><{{block|{{{inline|}}}}} style="display:none"><!-- | ||
- | --><span class="p-name"> | + | --><span class="p-name">{{{name}}}</span><!-- item name |
- | --><span class="u-url">{{localurl:{{FULLPAGENAMEE}}}}#{{anchorencode:{{{name}}}}}</span><!-- | + | --><span class="u-url">{{localurl:{{FULLPAGENAMEE}}}}#{{anchorencode:{{{name}}}}}</span><!-- item url |
--></{{block|{{{inline|}}}}}><!-- | --></{{block|{{{inline|}}}}}><!-- | ||
- | --><{{block|{{{inline|}}}}} class="p- | + | --><{{block|{{{inline|}}}}} class="p-location h-card heading"><!-- h-card |
- | --> | + | --><span class="p-category" style="display:none">{{{type|other}}}</span><!-- |
- | -- | + | -->{{poi/icon |
- | + | | lat={{{lat|}}}{{{1|}}} {{{2|}}} {{{3|}}} | |
- | --> | + | | lon={{{lon|}}}{{{4|}}} {{{5|}}} {{{6|}}} |
+ | | zoom={{{zoom|14}}} | ||
+ | | type={{{type|other}}} | ||
+ | }} <!-- | ||
+ | --><span class="p-name name">{{?|test={{{nobold|}}}||'''}}{{if | ||
| test={{{url|}}} | | test={{{url|}}} | ||
| then=[{{{url}}} {{{name}}}] | | then=[{{{url}}} {{{name}}}] | ||
| else={{{name}}} | | else={{{name}}} | ||
}}{{?|test={{{nobold|}}}||'''}}</span> <!-- | }}{{?|test={{{nobold|}}}||'''}}</span> <!-- | ||
+ | --><span class="sample-link"> <nowiki>[[</nowiki>{{FULLPAGENAME}}#{{{name}}}{{!}}{{{name}}}<nowiki>]]</nowiki> </span><!-- | ||
-->{{if | -->{{if | ||
| test={{{altname|}}} | | test={{{altname|}}} | ||
| then=<span>(''{{{altname}}}'') </span> | | then=<span>(''{{{altname}}}'') </span> | ||
- | }}{{if | + | }}<!-- |
- | | test={{{1|}}}{{{lat|}}} | + | -->{{if |
- | | | + | | test={{{nocoord|}}}{{not|{{{1|}}}{{{lat|}}}{{{geometry|}}}}} |
- | | | + | | else=<span><!--<nowiki>[</nowiki>-->{{geo coord |
- | + | | name={{{name}}} | |
+ | | lat={{{lat|}}}{{{1|}}} {{{2|}}} {{{3|}}} | ||
+ | | lon={{{lon|}}}{{{4|}}} {{{5|}}} {{{6|}}} | ||
+ | | geometry={{{geometry|}}} | ||
| zoom={{{zoom|14}}} | | zoom={{{zoom|14}}} | ||
- | }}<nowiki>]</nowiki></span><!-- | + | }}<!--<nowiki>]</nowiki>--></span><!-- |
-->}}<!-- | -->}}<!-- | ||
--> </{{block|{{{inline|}}}}}><!-- h-card | --> </{{block|{{{inline|}}}}}><!-- h-card | ||
-->{{?|test={{{portofentry|}}}|<{{block|{{{inline|}}}}}>{{blue|'''Port of Entry'''}}</{{block|{{{inline|}}}}}>}}<!-- | -->{{?|test={{{portofentry|}}}|<{{block|{{{inline|}}}}}>{{blue|'''Port of Entry'''}}</{{block|{{{inline|}}}}}>}}<!-- | ||
- | -->{{?|test={{{text|}}}|<{{block|{{{inline|}}}}} class{{=}}"e-description">{{?|test={{{inline|}}}| | | + | -->{{?|test={{{text|}}}|<{{block|{{{inline|}}}}} class{{=}}"e-description" {{?|test={{{inline|}}}||style{{=}}"margin-left:2em;"}}>{{?|test={{{inline|}}}| | |
}}{{{text|}}}</{{block|{{{inline|}}}}}>}}<!-- | }}{{{text|}}}</{{block|{{{inline|}}}}}>}}<!-- | ||
--></{{block|{{{inline|}}}}}></includeonly><noinclude> | --></{{block|{{{inline|}}}}}></includeonly><noinclude> |
Latest revision as of 11:37, 7 September 2017
This template is used to list POIs (POI stands for point of interest).
In a wiki article a POI denotes some geographic location like a city, port or an anchorage. Such a POI must have a name and a type, also it should have some geographic coordinates and a description text.
Usage
{{poi | lat= | lon= | portofentry= | type= | name= | image= | imagetext= | imagewidth= | text= }}
The coordinates are defined by lat and lon parameters represented in decimal degrees (negative values denote either S or W hemispheres). Alternatively coordinates could be written in a compound form like:
{{poi | lat= DD.dd | lon= DDD.dd | type= | name= | text= }}
where degrees, decimal minutes and hemisphere symbol (N, S, E, W) are separated by a single space. Coordinates in this format are quite useful when Template:Coord locations are converted into Template:Poi and similar templates.
Type
A value of the type parameter should be one of:
- anchorage
- accommodation
- attention
- beach
- berth (for marinas and other moorings at harbour quays, piers, etc.)
- buoy (for mooring buoys)
- chandler (for yacht's stores)
- danger
- eatingout (for restaurants, caffes, eateries, etc.)
- facilities
- fuel
- harbour
- provisions (for grocery stores, markets and supermarkets)
- officials
- service
- waypoint
- other
Examples
{{poi | lat=41.23762| lon=9.1968 | type=berth | name=Lega Navale di Santa Teresa Gallura | url=http://www.leganavale.it/strutture/s_teresa_di_gallura/s_teresa_di_gallura | text= A private yacht club located at the small Eastern inlet just before the marina }}
Gives:
{{poi| lat=41.18005| lon=9.3881| zoom=15 | type=buoy | name=Palau buoy field | text=Just SE entrance to the marina. When the marina is full the yachts are sent to moor there. {{Note}} anchorage in the bay is not allowed. The buoy field is operated by the marina. A dinghy doc is located at the port side of the entrance to the marina. }}
Produces:
Palau buoy field
Just SE entrance to the marina. When the marina is full the yachts are sent to moor there. Note: anchorage in the bay is not allowed.
The buoy field is operated by the marina. A dinghy doc is located at the port side of the entrance to the marina.{{Poi | lat=37.12665 | lon=26.85269 | type= harbour | name= Lakki |altname= Λακκί | zoom= 15 | portofentry= Yes | image= Greece_Leros_Lakki_m.jpg | imagetext= Chart of Lakki Harbor | imagewidth= 300px | text= This is the main harbor of the island. It is located on the W side of the island. [http://www.hri.org/infoxenios/english/dodecanese/leros/towns.html#Laki Lakki] is a deep inlet and it is the largest harbor of the Dodecanese, affording all-round protection. On the NW side of the harbor there is small [[Agmar_Lakki_Marina|marina]] operated by [http://www.agmar.gr/ ''Agmar'']. ''See [[Agmar Lakki Marina]]''. }}
Gives:
Lakki
... and compound style:
{{poi | lat = 41 14.633 N | lon= 009 08.904 E | type= anchorage | name= Cala Spinosa | text= A narrow bay W of Baia di Santa Reparata, good holding on sandy patches. }}
Expands to:
Cala Spinosa
See CruisersWiki:Chartlet.config for the list of respective map icons.