Difference between revisions of "Template:GEOnet2/doc"
Jump to navigation
Jump to search
(update with new server info) |
imported>Zyxw (update documentation, add instructions from Template:Cite gns/doc) |
||
| Line 1: | Line 1: | ||
| + | {{Documentation subpage}} | ||
| + | <!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> | ||
{{TOC right}} | {{TOC right}} | ||
| − | {{Tl|GEOnet2}} provides | + | {{Tl|GEOnet2}} provides an external link to a specific geographic feature name from the [[GEOnet Names Server]] (GNS), published by the [[National Geospatial-Intelligence Agency]] (NGA). The template uses the GEOnet G_NAME a.k.a. Name_GUID search index or key. |
| − | == | + | == Usage == |
| − | <code>{{Tlx|GEOnet2|Name_GUID| | + | <code>{{Tlx|GEOnet2|''Name_GUID''|''link-label-name''}}</code> |
| − | + | Unnamed parameters: | |
| − | + | # ''<code>Name_GUID</code>'' (required) – the corresponding index or key field from the GEOnet Names Server | |
| − | + | # ''<code>link-label-name</code>'' (optional) – name used in the reference link, otherwise defaults to <nowiki>{{</nowiki>PAGENAME}}. | |
<pre> | <pre> | ||
| Line 15: | Line 17: | ||
'http://geonames.nga.mil/namesgaz/detaillinksearch.asp?G_NAME='+sId+'&Diacritics='+sDCValue | 'http://geonames.nga.mil/namesgaz/detaillinksearch.asp?G_NAME='+sId+'&Diacritics='+sDCValue | ||
</pre> | </pre> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
== Parameters == | == Parameters == | ||
| Line 52: | Line 36: | ||
<td><code><nowiki>{{</nowiki>PAGENAME}}</code></td> | <td><code><nowiki>{{</nowiki>PAGENAME}}</code></td> | ||
<td>Link-label-name</td> | <td>Link-label-name</td> | ||
| + | </tr> | ||
| + | </table> | ||
| + | |||
| + | == Finding the ID == | ||
| + | A search engine can be found [http://geonames.nga.mil/namesgaz/ here]. Select a country name to reduce the number of matches. Finding the required <tt>id</tt> is browser specific.<ref>These instructions were valid, using the latest browser version, at the time this documentation was written. Tests were only done using the Windows versions. If you you have a problem leave a note on the [[Template talk:Cite gns/doc|discussion page]] or try the [[Wikipedia:Help desk|Help desk]].</ref> | ||
| + | * [[Google Chrome|Chrome]] – Left click on the name then right click anywhere on pop-up. Select "Open frame in new tap". A [[URL]] without a protocol will be displayed in the Omnibox at the top of the screen. | ||
| + | * [[Firefox]] – While pressing the [[control key]], left click on the name. A new tab will be created with a [[JavaScript]] function in the URL box. | ||
| + | * [[Internet Explorer]] – Right click on the name and select "Properties". A Javascript function, identified as the URL, will be displayed in the pop-up. | ||
| + | * [[Opera (web browser)|Opera]] – Right click on the name and select "Open in New Tab". A new tab will be created with A Javascript function in the URL box. | ||
| + | * [[Safari (web browser)|Safari]] – Right click on the name and select "Copy Link". Paste location into a text box (right click and select Paste). | ||
| + | |||
| + | The Javascript or URL for [[Mount Logan]] contain the string "('32FA8842BEDB3774E0440003BA962ED3', 'DC')" the <tt>id</tt> is the [[alphanumeric]] value between the single quotes. For example, the <tt>id</tt> for Mount Logan is 32FA8842BEDB3774E0440003BA962ED3. | ||
| + | |||
| + | === Note === | ||
| + | {{reflist}} | ||
| + | |||
| + | == Examples == | ||
| + | <table class="wikitable"> | ||
| + | <caption>{{Tl|GEOnet2}} examples</caption> | ||
| + | <th>Code</th> | ||
| + | <th>Produces</th> | ||
| + | <th>Description</th> | ||
| + | <tr> | ||
| + | <td><code>{{Tlx|GEOnet2|32FA88151D7D3774E0440003BA962ED3}}</code></td> | ||
| + | <td>{{GEOnet2|32FA88151D7D3774E0440003BA962ED3}}</td> | ||
| + | <td>Baku, Azerbaijan Name_GUID</td> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td><code>{{Tlx|GEOnet2|32FA88151D7D3774E0440003BA962ED3|Baku, Azerbaijan}}</code></td> | ||
| + | <td>{{GEOnet2|32FA88151D7D3774E0440003BA962ED3|Baku, Azerbaijan}}</td> | ||
| + | <td>Baku, Azerbaijan Name_GUID</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
== See also == | == See also == | ||
| − | + | {{Special:PrefixIndex/Template:GEOnet}} | |
| − | |||
| − | |||
| − | + | Similar templates: | |
| − | {{Special: | + | * {{tl|Cite GNS}} – for same link in different format |
| + | * {{tl|GNIS}} and {{tl|Cite GNIS}} – for links to U.S. geographic feature names from [[Geographic Names Information System]] (GNIS) | ||
| + | |||
| + | List of pages linking to [[Special:Linksearch/geonames.nga.mil|geonames.nga.mil]]: | ||
| + | * [[Special:Linksearch/geonames.nga.mil/namesgaz/detaillinksearch.asp]] (current format) | ||
| + | * [[Special:Linksearch/geonames.nga.mil/ggmagaz/detaillinksearch.asp]] (old format) | ||
== External links == | == External links == | ||
| Line 67: | Line 85: | ||
** [http://geonames.nga.mil/namesgaz/ GNS Search - Text Based Page] | ** [http://geonames.nga.mil/namesgaz/ GNS Search - Text Based Page] | ||
** [http://geonames.nga.mil/namesviewer GNS Search - Open Geospatial Consortium (OGC) Viewer Page] | ** [http://geonames.nga.mil/namesviewer GNS Search - Open Geospatial Consortium (OGC) Viewer Page] | ||
| − | <includeonly> | + | |
| − | <!-- | + | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| |
| − | [[Category:United States government attribution templates | + | <!-- Categories go here, and interwikis go in Wikidata --> |
| + | [[Category:United States government attribution templates]] | ||
[[Category:United States military templates|Navy, USGovernment]] | [[Category:United States military templates|Navy, USGovernment]] | ||
| − | </includeonly> | + | }}</includeonly> |
Revision as of 23:18, 29 May 2014
| 40px | This is a documentation subpage for Template:GEOnet2. It contains usage information, categories and other content that is not part of the original template page. |
{{GEOnet2}} provides an external link to a specific geographic feature name from the GEOnet Names Server (GNS), published by the National Geospatial-Intelligence Agency (NGA). The template uses the GEOnet G_NAME a.k.a. Name_GUID search index or key.
Usage
{{GEOnet2|Name_GUID|link-label-name}}
Unnamed parameters:
Name_GUID(required) – the corresponding index or key field from the GEOnet Names Serverlink-label-name(optional) – name used in the reference link, otherwise defaults to {{PAGENAME}}.
sDCValue = 'DC' sId = "'" + UNI + "'" URL: 'http://geonames.nga.mil/namesgaz/detaillinksearch.asp?G_NAME='+sId+'&Diacritics='+sDCValue
Parameters
| Parameter | Mandatory or Optional | Default | Description |
|---|---|---|---|
| {1} | Mandatory | Undefined | G_NAME in detaillinksearch.asp URL a.k.a. Name_GUID database search key |
| {2} | Optional | {{PAGENAME}} |
Link-label-name |
Finding the ID
A search engine can be found here. Select a country name to reduce the number of matches. Finding the required id is browser specific.[1]
- Chrome – Left click on the name then right click anywhere on pop-up. Select "Open frame in new tap". A URL without a protocol will be displayed in the Omnibox at the top of the screen.
- Firefox – While pressing the control key, left click on the name. A new tab will be created with a JavaScript function in the URL box.
- Internet Explorer – Right click on the name and select "Properties". A Javascript function, identified as the URL, will be displayed in the pop-up.
- Opera – Right click on the name and select "Open in New Tab". A new tab will be created with A Javascript function in the URL box.
- Safari – Right click on the name and select "Copy Link". Paste location into a text box (right click and select Paste).
The Javascript or URL for Mount Logan contain the string "('32FA8842BEDB3774E0440003BA962ED3', 'DC')" the id is the alphanumeric value between the single quotes. For example, the id for Mount Logan is 32FA8842BEDB3774E0440003BA962ED3.
Note
- ↑ These instructions were valid, using the latest browser version, at the time this documentation was written. Tests were only done using the Windows versions. If you you have a problem leave a note on the discussion page or try the Help desk.
Examples
| Code | Produces | Description |
|---|---|---|
|
GEOnet2/doc at GEOnet Names Server | Baku, Azerbaijan Name_GUID |
|
Baku, Azerbaijan at GEOnet Names Server | Baku, Azerbaijan Name_GUID |
See also
Similar templates:
- {{Cite GNS}} – for same link in different format
- {{GNIS}} and {{Cite GNIS}} – for links to U.S. geographic feature names from Geographic Names Information System (GNIS)
List of pages linking to geonames.nga.mil:
- Special:Linksearch/geonames.nga.mil/namesgaz/detaillinksearch.asp (current format)
- Special:Linksearch/geonames.nga.mil/ggmagaz/detaillinksearch.asp (old format)
External links