Module:Coordinates/doc

提供: VANGUARD FLIGHT wiki
移動先: 案内検索

このページは、[[[Module:Coordinates]]]の説明文を記述するページです。

Under construction icon-blue.svg

This page is under construction, or in the middle of an expansion or major redevelopment.
You are welcome to assist in its construction by editing it as well. For information on its status, please contact Jarekt.

This module is intended to (eventually) replace the functionality of {{location}} and related templates, but at the moment it is collection of methods related to geolocation. It provides several methods most of them not used yet:

  • {{#Invoke:Coordinates | parseAttribute| attribute string | attribute name }} : parse {{location}} attribute parameter attribute string and return value of the attribute name parameter
  • {{#Invoke:Coordinates | getHeader| attribute string }} : parse {{location}} attribute parameter attribute string and return the numeric value of the header attribute. Careful, this function is live (called by {{Location/layout}}).
  • {{#Invoke:Coordinates | GeoHack_link| lat=... | lon=... |lang=xx | site=... | globe=... }}: creates link to GeoHack tool and display location coordinates. The URLs are based on website and latitude/longitude coordinates. Language is used so it can be passes to the website. Globe parameter is used to allow specifying coordinates on planets other than earth. Careful, this function is live (called by {{Institution/coordinates}}).
  • {{#Invoke:Coordinates | lat_lon| lat=... | lon=... |lang=xx }}: create coordinate location string based on decimal degrees latitude and longitude number. Language is used to localize the presentation of the numbers.
  • {{#Invoke:Coordinates | deg2dms| degrees|lang=xx }}: create dms (degree/minute/second) string based on decimal degrees number. Language is used to localize the presentation of the numbers.
  • {{#Invoke:Coordinates | externalLink| site=... | globe=... | lat=... | lon=... |lang=xx }}: create URLs for different sites which are used by coordinate location templates. The URLs are based on website and latitude/longitude coordinates. Language is used so it can be passes to the website. Globe parameter is used to allow specifying coordinates on planets other than earth.

Examples

  • {{#invoke:Coordinates| GeoHack_link | lat=51.48 | lon=0}} will display 51° 28′ 48″ N, 0° 00′ 00″ E
  • {{#invoke:Coordinates| GeoHack_link | lat=51.48 | lon=0 | lang=en }} will display 51° 28′ 48″ N, 0° 00′ 00″ E
  • {{#invoke:Coordinates| GeoHack_link | lat=51.48 | lon=0 | lang=ru }} will display 51° 28′ 48″ с. ш., 0° 00′ 00″ в. д.
  • {{#invoke:Coordinates| GeoHack_link | lat= | lon=0 | lang=ru }} (with missing latitude value) will display "latitude, longitude"
  • {{#invoke:Coordinates| externalLinksSection | globe = Earth| lat=51.48 | lon=0 | lang=en | namespace=File}} displays "[{{fullurl:tools:~kolossos/openlayers/commons-on-osm.php|zoom=16&lat=51.48&lon=0}} OpenStreetMap] - Google Maps - [{{fullurl:tools:~para/GeoCommons/earth.php|latdegdec=51.48&londegdec=0&scale=10000&commons=1}} Google Earth]"
  • {{#invoke:Coordinates| externalLinksSection | globe = Earth| lat=51.48 | lon=0 | lang=en | namespace=Category}} displays "[{{fullurl:tools:~kolossos/openlayers/commons-on-osm.php|zoom=16&lat=51.48&lon=0}} OpenStreetMap] - Google Maps - [{{fullurl:tools:~para/GeoCommons/earth.php|latdegdec=51.48&londegdec=0&scale=10000&commons=1}} Google Earth]"
  • {{#invoke:Coordinates| externalLinksSection | globe = Earth| lat=51.48 | lon=0 | lang=ru | namespace=Category}} displays "[{{fullurl:tools:~kolossos/openlayers/commons-on-osm.php|zoom=16&lat=51.48&lon=0}} OpenStreetMap] - Картах Google - [{{fullurl:tools:~para/GeoCommons/earth.php|latdegdec=51.48&londegdec=0&scale=10000&commons=1}} Google Планете Земля]"
  • {{#invoke:Coordinates| externalLinksSection | globe = Mars| lat=51.48 | lon=0 | lang=en | namespace=File}} displays "Google Maps"
  • {{#invoke:Coordinates| externalLinksSection | globe = Moon| lat=51.48 | lon=0 | lang=en | namespace=File}} displays "Google Maps"
  • {{#invoke:Coordinates| LocationTemplateCore | globe = Earth| lat=51.48 | lon=0 | lang=en | namespace=File| attributes=elevation:10_heading:W | mode=camera | bare = 1}} displays "
    51° 28′ 48″ N, 0° 00′ 00″ E  View this and other nearby images on: OpenStreetMap - Google Maps - Google Earthinfo
    {{#coordinates: 51.480000| 0.000000|type:camera_elevation:10_heading:W}}"
  • {{#invoke:Coordinates| LocationTemplateCore | globe = Earth| lat=51.48 | lon=0 | lang=en | namespace=File| attributes=elevation:10_heading:W | mode=camera | bare = 0}} displays "
    Camera location51° 28′ 48″ N, 0° 00′ 00″ E  View this and other nearby images on: OpenStreetMap - Google Maps - Google Earthinfo
    {{#coordinates: 51.480000| 0.000000|type:camera_elevation:10_heading:W}}"

See testcases to see more examples.

Dependencies

Relies on Module:I18n/coordinates for all of the internationalization translations.