Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
project:electronomy [2013/03/22 17:19] – [Data] bernara3project:electronomy [2013/08/15 22:23] (current) – tagged loleg
Line 32: Line 32:
  
   * List and link your actual and ideal data sources.   * List and link your actual and ideal data sources.
 +
 +===== Capture d'écran =====
 +
 +===== Captures =====
 +
 +{{:project:capture_d_e_cran_2013-03-22_a_17.23.03.png?200|}}
 +{{:project:map_large.png?200|}}
 +
  
 ===== Code ===== ===== Code =====
  
 +Index.html :
 +
 +<code html>
 <html> <html>
 <script type="text/javascript"> <script type="text/javascript">
Line 115: Line 126:
 </body> </body>
 </html> </html>
 +</code>
 +
 +GetCentroid.html
 +
 +<code html>
 +<html>
 +<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
 +
 +<script>
 +$(document).ready(function() {
 + var url = 'http://api.geo.admin.ch/main/wsgi/swisssearch/geocoding';
 +  
 +  // A completer par le npa de toutes les communes
 +  var test = new Array();
 +  test[0] = 3960;
 +  test[1] = 1920;
 +  test[2] = 1950;
 + 
 +  for (var i=0;i<test.length;i++){
 +
 +     $.getJSON(url + '?query=' +  test[i] +'&services=postalcodes&no_geom=false', function(data) {
 +     $.each(data.results, function(key, val){
 +     var content = "NPA: " +val.nr+ "<br/>";
 +     content += "Label: " +val.label+ "<br/>";
 +     var coord = new Array();
 +     $.each(val.bbox, function(i,j){
 +     coord[i] = j;
 +     });
 +
 +     // Avoir la longitude et latitude de la commune
 +     content += coord[0]+6400+" | ";
 +     content += coord[1]+6400;
 +     content += "<br/>";
 +     $('#data').append(content);
 +     });
 +     }); 
 + }
 +});
 +</script>
 +<body>
 + <div id="data"></div>
 +</body>
 +</html>
 +</code>
 +
 +  * Problèmes à regler centroid
 +  * Manque plus que le for each sur chaque communes
 ===== Team ===== ===== Team =====
  
   * [[user:fabienroduit]]   * [[user:fabienroduit]]
   * Grégoire Largey   * Grégoire Largey
-  * +  * Anthony Bernardo 
 +  * Romain Paccolat 
 + 
 +===== Data ===== 
 + 
 +  * {{:project:electronomy.xlsx|}}
  
 ===== Links ===== ===== Links =====
Line 127: Line 190:
   * Tools you used ...   * Tools you used ...
      
-{{tag>status:concept needs:dev needs:design needs:data needs:expert}} +{{tag>status:concept energy needs:dev needs:design has:data needs:expert}}
  • project/electronomy.1363969153.txt.gz
  • Last modified: 2013/03/22 17:19
  • by bernara3