184
edits
Tomas Kirnak (talk | contribs) (Added examples) |
|||
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> |
edits