AutoPatrol, Bureaucrats, Administrators
481
edits
m (Text replacement - "^" to "{{deprecated}}") |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
Represents geographical location (defined by latitude and longitude). | {{deprecated}}Represents geographical location (defined by latitude and longitude). | ||
Line 45: | 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> |