Finddestination
From Mapping on MediaWiki
| Finddestination |
|---|
| What: |
| Finds the destination given a starting point, initial bearing and a distance |
| Min version: |
| 0.6 |
| Max version: |
| still supported |
| Function implementation: |
| Yes |
| Tag implementation: |
| Yes |
You can use the #finddestination parser function to find a destination given a starting point(that can be in any of the supported formats), an initial bearing and a distance. This function is part of the Maps extension, so you should have Maps installed in order to use it.
Contents |
[edit] Usage
[edit] Syntax
{{#finddestination:{starting point}|{initial bearing}|{distance}}}
[edit] Parameters
This parser function supports use of so called 'default parameters'. This allows you to simply pass along values, without writing the parameter name= part. You can mix this notation together with using named parameters, but must at all times keep the default ones in the correct order.
| Parameter | Aliases | Default | Usage |
|---|---|---|---|
| location | - | required | The initial location. |
| bearing | - | required | The initial bearing. |
| distance | - | required | The distance to travel |
| format | notation | configurable | The format in which to output the destination. |
| directional | - | configurable | Indicates if the format of the destination should be directional or not. Either yes or no. |
| allowcoordinates | - | configurable | Indicates if coordinates should be allowed. If set to no, only addresses will be accepted. |
| service | - | configurable | The geocoding service to use to geocode the value in case it's an address. |
| mappingservice | - | none | Parameter you can use to indicate the mapping service you are using this function with. This will maps allow to override the default value of the service parameter by the one that's optimal for the mapping service. (Example: In case of Google Maps, the Google geocoder will be used.) |
[edit] Examples
Calculating the distance between two points
{{#finddestination:55.7557860° N, 37.6176330° W|90|500}}
Results into: 55° 45' 21" N, 37° 36' 35" W
{{#finddestination:New York|bearing=90|distance=500|format=float}}
Results into: 40.7143526482 N, 74.0000406722 W
[edit] See also
- Geodistance parser hook
- Coordinates parser hook
- Distance parser hook
This documentation page applies to all (Semantic) Maps versions from 0.7 to the most current version.
Other versions: 0.6 – 0.6.6
Facts about FinddestinationRDF feed
| From version | 0.7 + |
| Has description | Finds the destination given a starting point, initial bearing and a distance + |
| Has maximum version | still supported + |
| Has minimum version | 0.6 + |
| Has parser function | true + |
| Has tag extension | true + |
| Is master page | true + |
| Language code | en + |
| Master page | Finddestination + |
