[ninux-not-wireless] Calcolare la quota di altitudine sul map server

Alessandro Gubitosi gubi.ale at iod.io
Sat Nov 23 00:23:51 CET 2013


Volevo segnalare che se volete sapere la quota di altezza del vostro
nodo potete farlo a questo indirizzo: http://www.earthtools.org/

@Nemesis, ci sono a disposizione anche le api, quindi sarebbe bello che
il nuovo nodeshot si calcoli da solo questo dato.
Basta richiamare l'url: http://www.earthtools.org/height/LAT/LON (nota
bene no virgole "," si punti ".").
Il codice per fare una richiesta asincrona e ottenere i dati c'è già
qui:
https://github.com/gubi/Ninuxoo-Semantic-Decentralized/blob/master/common/js/include/setup.js#L235-L240
Per comodità te lo reincollo ottimizzato qui:

    $.get("http://www.earthtools.org/height/"+LATITUDE+"/"+LONGITUDE,function(heightdata){
        varxml=heightdata,
        xmlDoc=$.parseXML(xml),
        $xml=$(xmlDoc),
        $height_mt=$xml.find("meters"),
        $height_ft=$xml.find("feet");
       
        console.log("Metri: " + $height_mt.text(), "Piedi: " +
    $height_ft.text());
    });

Comunque, maggiori info sulle loro API le puoi trovare qui:
http://www.earthtools.org/webservices.htm#height

Ciao
Gubi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ml.ninux.org/pipermail/not-wireless/attachments/20131123/58f6d293/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL: <http://ml.ninux.org/pipermail/not-wireless/attachments/20131123/58f6d293/attachment-0001.sig>


More information about the Not-wireless mailing list