AutoPatrol, Bureaucrats, Administrators
481
edits
m (Text replacement - "^" to "{{deprecated}}") |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Represents geographical location (defined by latitude and longitude). | {{deprecated}}Represents geographical location (defined by latitude and longitude). | ||
Line 9: | Line 9: | ||
'''Constructor''' | '''Constructor''' | ||
GeoLocation(latitude, longitude, type) | GeoLocation(''latitude'', ''longitude'', [''type'']); | ||
If ''type'' is omitted 1 (manual) will be used. | |||
Line 43: | Line 45: | ||
| 3 || Network (obtained from network, for example using WiFi AP database) | | 3 || Network (obtained from network, for example using WiFi AP database) | ||
|} | |} | ||
===Examples=== | |||
'''Getting node location''' | |||
<pre> | |||
nodeLoc = $node->geolocation; | |||
println("Node latitude: " . nodeLoc->latitudeText); | |||
println("Node longitude: " . nodeLoc->longitudeText); | |||
</pre> | |||
Output: | |||
<pre> | |||
Node latitude: N 48° 00' 0.000" | |||
Node longitude: E 22° 00' 0.000" | |||
</pre> | |||
'''Setting node location''' | |||
<pre> | |||
nodeLoc = GeoLocation(22.11, 48.12, 1); | |||
$node->setGeoLocation(nodeLoc); | |||
</pre> | |||
'''Clearing node location''' | |||
<pre> | |||
$node->clearGeoLocation(); | |||
</pre> |