<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Grazie per l'informazione.<br>
<br>
C'è anche il webservice di mapquest, che è uno dei principali
contributors di OpenStreetMap, offrono anche Geocoding, che sarà
utile.<br>
<br>
Comunque queste email sarebbe meglio mandarle qui:<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a href="http://ml.ninux.org/mailman/listinfo/nodeshot">http://ml.ninux.org/mailman/listinfo/nodeshot</a><br>
<br>
Federico<br>
<br>
<br>
<br>
On 11/23/2013 12:23 AM, Alessandro Gubitosi wrote:<br>
</div>
<blockquote cite="mid:528FE787.7070404@iod.io" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<font face="Helvetica, Arial, sans-serif">Volevo segnalare che se
volete sapere la quota di altezza del vostro nodo potete farlo a
questo indirizzo: <a moz-do-not-send="true"
href="http://www.earthtools.org/">http://www.earthtools.org/<br>
</a><br>
@Nemesis, ci sono a disposizione anche le api, quindi sarebbe
bello che il nuovo nodeshot si calcoli da solo questo dato.<br>
Basta richiamare l'url: <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://www.earthtools.org/height/LAT/LON">http://www.earthtools.org/height/LAT/LON</a>
(nota bene no virgole "," si punti ".").<br>
Il codice per fare una richiesta asincrona e ottenere i dati c'è
già qui: <a moz-do-not-send="true"
href="https://github.com/gubi/Ninuxoo-Semantic-Decentralized/blob/master/common/js/include/setup.js#L235-L240">https://github.com/gubi/Ninuxoo-Semantic-Decentralized/blob/master/common/js/include/setup.js#L235-L240</a><br>
Per comodità te lo reincollo ottimizzato qui:<br>
</font>
<blockquote>
<div style="" class="line" id="LC235"><tt><span class="nx">$</span></tt><tt><span
class="p">.</span></tt><tt><span class="nx">get</span></tt><tt><span
class="p">(</span></tt><tt><span class="s2"><a
moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="http://www.earthtools.org/height/">"http://www.earthtools.org/height/"</a></span></tt><tt>
</tt><tt><span class="o">+</span></tt><tt> LATITUDE</tt><tt> </tt><tt><span
class="o">+</span></tt><tt> </tt><tt><span class="s2">"/"</span></tt><tt>
</tt><tt><span class="o">+</span></tt><tt> LONGITUDE</tt><tt><span
class="p">,</span></tt><tt> </tt><tt><span class="kd">function</span></tt><tt><span
class="p">(</span></tt><tt><span class="nx">heightdata</span></tt><tt><span
class="p">)</span></tt><tt> </tt><tt><span class="p">{</span></tt></div>
<div style="" class="line" id="LC236"><tt> </tt><tt><span
class="kd">var</span></tt><tt> </tt><tt><span class="nx">xml</span></tt><tt>
</tt><tt><span class="o">=</span></tt><tt> </tt><tt><span
class="nx">heightdata</span></tt><tt><span class="p">,</span></tt></div>
<div style="" class="line" id="LC237"><tt> </tt><tt><span
class="nx">xmlDoc</span></tt><tt> </tt><tt><span
class="o">=</span></tt><tt> </tt><tt><span class="nx">$</span></tt><tt><span
class="p">.</span></tt><tt><span class="nx">parseXML</span></tt><tt><span
class="p">(</span></tt><tt><span class="nx">xml</span></tt><tt><span
class="p">),</span></tt></div>
<div style="" class="line" id="LC238"><tt> </tt><tt><span
class="nx">$xml</span></tt><tt> </tt><tt><span class="o">=</span></tt><tt>
</tt><tt><span class="nx">$</span></tt><tt><span class="p">(</span></tt><tt><span
class="nx">xmlDoc</span></tt><tt><span class="p">),</span></tt></div>
<div style="" class="line" id="LC239"><tt> </tt><tt><span
class="nx">$height_mt</span></tt><tt> </tt><tt><span
class="o">=</span></tt><tt> </tt><tt><span class="nx">$xml</span></tt><tt><span
class="p">.</span></tt><tt><span class="nx">find</span></tt><tt><span
class="p">(</span></tt><tt><span class="s2">"meters"</span></tt><tt><span
class="p">),</span></tt></div>
<div class="line" id="LC244"><tt> </tt><tt><span class="nx">$height_ft</span></tt><tt>
</tt><tt><span class="o">=</span></tt><tt> </tt><tt><span
class="nx">$xml</span></tt><tt><span class="p">.</span></tt><tt><span
class="nx">find</span></tt><tt><span class="p">(</span></tt><tt><span
class="s2">"feet"</span></tt><tt><span class="p">);<br>
<br>
console.log("Metri: " + </span></tt><tt><span
class="p"><span class="nx">$height_mt</span><span
class="p">.</span><span class="nx">text</span><span
class="p">(), </span></span></tt><tt>"Piedi: " + </tt><tt><span
class="p"><span class="p"><span class="nx">$height_ft</span></span></span></tt><tt><span
class="p"><tt><span class="p"><tt><span class="nx"><tt><span
class="p"><span class="p">.</span><tt><span
class="nx">text</span><span class="p">());<br>
</span></tt></span></tt></span></tt></span></tt>});</span></tt></div>
</blockquote>
<font face="Helvetica, Arial, sans-serif">Comunque, maggiori info
sulle loro API le puoi trovare qui: <a moz-do-not-send="true"
href="http://www.earthtools.org/webservices.htm#height">http://www.earthtools.org/webservices.htm#height</a><br>
<br>
Ciao<br>
Gubi<br>
</font> </blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<br>
<b>Federico Capoano</b><br>
Web Designer & Web Developer<br>
Portfolio/Blog: <a href="http://nemesisdesign.net">nemesisdesign.net</a><br>
Twitter: <a href="http://twitter.com/nemesisdesign/">@nemesisdesign</a><br>
PGP Key ID: 308BD46E</div>
</body>
</html>