//

Information about location

"; //GLog.write(marker.id); var projectId; for (var i=0;i"; } else if(clef=='id') html += ""; else if (clef=='latitude') html+= ""; else if (clef=='longitude') html+= ""; else if(clef=='markerId') continue; else if(clef=='Link') { if(modifiable=="" && Security[overlay.Type]=="1" && listProjects[projectId][clef]=='') { html+=""; } else { html += ""; } } else if(clef=='Gallery') html += ""; else html += ""; // } if(modifiable=="" && Security[overlay.Type]=="1") { html=html+"
Latitude
Longitude
Narrative 
Narrative

"; if(modifiable=="" && Security[overlay.Type]=="1") html += " 

"; html+="
"+clef+" 
"+clef+"
 
 
"; html=html+"
delete"; } else html=html+"
"; //GLog.write(listProjects[projectId]['markerId']); for(var i=0; i9) { //request='http://ws.geonames.org/citiesJSON?north='+bounds.getNorthEast().lat()+'&south='+bounds.getSouthWest().lat()+'&east='+bounds.getNorthEast().lng()+'&west='+bounds.getSouthWest().lng()+'&callback=getLocations'; request='./inc/map_plot_subcounties.php?north='+bounds.getNorthEast().lat()+'&south='+bounds.getSouthWest().lat()+'&east='+bounds.getNorthEast().lng()+'&west='+bounds.getSouthWest().lng()+'&callback=getSubcounties'; aObj = new JSONscriptRequest(request); aObj.buildScriptTag(); aObj.addScriptTag(); } redrawMap(); }); GEvent.addListener(map, "zoomend", function() { var bounds = map.getBounds(); for(var i=label.length; i>=0;--i) { map.removeOverlay(label[i]); label.splice(i,1); } if(map.getZoom()>9) { //request='http://ws.geonames.org/citiesJSON?north='+bounds.getNorthEast().lat()+'&south='+bounds.getSouthWest().lat()+'&east='+bounds.getNorthEast().lng()+'&west='+bounds.getSouthWest().lng()+'&callback=getLocations'; request='./inc/map_plot_subcounties.php?north='+bounds.getNorthEast().lat()+'&south='+bounds.getSouthWest().lat()+'&east='+bounds.getNorthEast().lng()+'&west='+bounds.getSouthWest().lng()+'&callback=getSubcounties'; aObj = new JSONscriptRequest(request); aObj.buildScriptTag(); aObj.addScriptTag(); //GLog.write(map.getZoom()); } redrawMap(); }); var bounds = map.getBounds(); // request='http://ws.geonames.org/citiesJSON?north='+bounds.getNorthEast().lat()+'&south='+bounds.getSouthWest().lat()+'&east='+bounds.getNorthEast().lng()+'&west='+bounds.getSouthWest().lng()+'&callback=getLocations'; request='./inc/map_plot_subcounties.php?north='+bounds.getNorthEast().lat()+'&south='+bounds.getSouthWest().lat()+'&east='+bounds.getNorthEast().lng()+'&west='+bounds.getSouthWest().lng()+'&callback=getSubcounties'; aObj = new JSONscriptRequest(request); aObj.buildScriptTag(); aObj.addScriptTag(); } function getLocations (jData) { if (jData == null) { return; } var geonames = jData.geonames; for (var i=0; i<\/div><\/div>'; var templabel = new ELabel(new GLatLng(geonames[i].lat,geonames[i].lng), stuff,geonames[i].geonameId, null, null, 65); map.addOverlay(templabel); label[label.length]=templabel; } } } function getSubcounties(jData){ if (jData == null) { return; } var subcounties = jData.subcounties; for (var i=0; i<\/div><\/div>'; var templabel = new ELabel(new GLatLng(subcounties[i].latitude,subcounties[i].longitude), stuff,subcounties[i].id, null, null, 65); map.addOverlay(templabel); label[label.length]=templabel; } } } function redrawMenu() { var features="
"; for(var i=0;i" } features+="
"+listTypes[i]['Type']+"
"; document.getElementById("features").innerHTML = features; } function addTypeForm(){ var html="
 
"; document.getElementById("addType").innerHTML = html; } function addNewType(){ if(document.forms["addType"].elements["typeName"].value!="") { var i=listTypes.length; listTypes[i]=new Array(); icons[i] = new GIcon(baseIcon); letter=String.fromCharCode("A".charCodeAt(0) + i) icons[i].image = "./img/pushpins/marker"+letter+".png"; listTypes[i]['Visible']=true; listTypes[i]['Type']=document.forms["addType"].elements["typeName"].value; redrawMenu(); document.getElementById("addType").innerHTML="Add new Type"; }else document.getElementById("addType").innerHTML="Add new Type"; } //Rafraichissement des markers sur la map function redrawMap() { for (var i=0; i0) { marker=createMarker(point,i, icons[j]); --nbMarkersAllowedOnMap; //Hiding marker if his type his hidden if(listTypes[j]['Visible']==false) markersProjects[markersProjects.length-1].hide(); } //GLog.write(markersProjects[61].id); } else { //delete existing marker for(var k=0; k

Information about location

"; //GLog.write(marker.id); var projectId; for (var i=0;i"; } else if(clef=='id') html += ""; else if(clef=='markerId') continue; else html += ""; } if(modifiable=="") { html=html+"
"+clef+"
 
 
"; html=html+"
delete"; } else html=html+""; marker.openInfoWindowHtml(html); }); */ GEvent.addListener(marker, "dragend", function() { var oldY=listProjects[projectId]['latitude']; var oldX=listProjects[projectId]['longitude']; if (confirm("Move this location ?")) { var npoint = marker.getPoint(); listProjects[projectId]['latitude'] = npoint.y; listProjects[projectId]['longitude'] = npoint.x; update_position(markerId); } else { var point = new GLatLng(oldY,oldX); marker.setPoint(point); } }); /* markersProjects[projectId]=marker; markersProjects[projectId].id=markerId; map.addOverlay(markersProjects[projectId]); */ //GLog.write(markersProjects.length); var nbMarkers=markersProjects.length; markersProjects[nbMarkers]=marker; markersProjects[nbMarkers].id=markerId; markersProjects[nbMarkers].Type=listProjects[projectId]['Type']; if(modifiable=="disabled" || Security[markersProjects[nbMarkers].Type]=="0") markersProjects[nbMarkers].disableDragging(); map.addOverlay(markersProjects[nbMarkers]); } function showType(typeId) { var visible; for(var i=0; i"); }*/ var deg=parseFloat(tableau[0]); var min=parseFloat(tableau[1]); var sec=parseFloat(tableau[2]); var dec = Math.abs(deg) + Math.abs(min/60) + Math.abs(sec/3600); if (deg < 0) {dec = -dec;} return dec; } function uploadFile() { window.open("./inc/upload.php?us="+us+"&pwd="+pwd, "popup", "height=50, width=440, menubar='no', toolbar='no', location='no', status='no', scrollbars='yes'" ); } function replaceFile() { var html=" "; document.getElementById("editFile").innerHTML = html; window.open("./inc/upload.php?us="+us+"&pwd="+pwd, "popup", "height=50, width=440, menubar='no', toolbar='no', location='no', status='no', scrollbars='yes'" ); } function zoomto(v) { if (v!="Goto") { var coords = v.split(','); map.setCenter(new GLatLng(coords[0], coords[1]),12); var bounds = map.getBounds(); for(var i=0; i2 || (coords[1]>43 && coords[1]<50))?G_SATELLITE_TYPE:G_MAP_TYPE); } function viewGallery() { window.open(document.balloon.Gallery.value,"Gallery",""); } //]]>