Table of Contents
Exemples
http://terresdelebre.guifi.net/mapa-guifi-net/
http://109.69.9.55/guifimaps/maps
Traceroute:
http://109.69.9.55/guifimaps/ca/guifi/menu/ip/traceroute
Descargado branche de Google Api V3 de:
https://gitorious.org/~tombatossals/guifi/tombatossalss-drupal-guifi/commits/googlev3
Jose, si te animas a mirar lo de los nodos clickables perfecto. Yo tenía la duda de donde extraer el json con la lista de nodos, urls y coordenadas para cargarlos dinámicamente en el mapa. ¿Sabéis si ya existe, o tendríamos que desarrollarlo?
Si no existe no sería complicado crear un url en drupal que al llamarla por GET o POST devuelva un json con la lista de nodos. Yo mismo lo crearía.
Datos de Guifi
Donde descargar los CNML:
http://guifi.net/es/guifi/cnml/17711
Descarga por zonas:
http://guifi.net/guifi/cnml/11276/nodes
Modificado
De la página de configuración:
http://guifidev.matarosensefils.net/ca/admin/settings/guifi
URL for WMS service:
http://guifi.net/cgi-bin/mapserv?map=/home/guifi/maps.guifi.net/guifimaps/GMap.map
URL for maps module:
http://maps.guifi.net
Fucionamiento web de guifi
En la web de guifi los ficheros del API de google están en:
modules/guifi/js
Borrar cache. Botón abajo del todo Clear cached data:
http://guifidev.matarosensefils.net/ca/admin/settings/performance
Api V3
Si funciona
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript">
function initialize() {
//mapa
var myLatlng = new google.maps.LatLng(41.549, 2.452);
//nodo
var myLatlng2 = new google.maps.LatLng(41.549, 2.450);
var myOptions = {
zoom: 18,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.SATELLITE
};
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var contentString = '<div id="content">'+
'<div id="siteNotice">'+
'</div>'+
'<h1 id="firstHeading" class="firstHeading">MatEscorxador</h1>'+
'<div id="bodyContent">'+
'<p><b>IP:</b> 10.139.56.129 </p>'+
'<p>Node: <a href="http://guifi.net/node/18084">'+
'http://guifi.net/node/18084</a> Actiu</p>'+
'</div>'+
'</div>';
var infowindow = new google.maps.InfoWindow({
content: contentString
});
var icono2tam = new google.maps.Size({
width:10,
height:10
})
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title:"MatEscorxador"
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
});
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width:100%; height:100%"></div>
</body>
</html>
