czfgmap |
Subversion Repositories: |
Rev 9 | Rev 10 | |
---|---|---|
Line 20... | Line 20... | |
include("../forum/globalmap.php"); |
include("../forum/globalmap.php"); | |
|
| |
switch (@$_SERVER['SERVER_NAME']) { |
switch (@$_SERVER['SERVER_NAME']) { | |
case "connected.czf": |
case "connected.czf": | |
$GMapKey="ABQIAAAAvGTA14kOdSvtr3t8EjKUdxQ2n1pNbYRLwYPuGT94C-0un95jGhSkgS0a3LnGa2MzRepHicK08lDDmg"; |
$GMapKey="ABQIAAAAvGTA14kOdSvtr3t8EjKUdxQ2n1pNbYRLwYPuGT94C-0un95jGhSkgS0a3LnGa2MzRepHicK08lDDmg"; | |
break; | ||
case "connected.prosek.czf": | ||
$GMapKey="ABQIAAAAvGTA14kOdSvtr3t8EjKUdxQmdP92EXlqBtrjj_gSpBHpGjsXLRR7QrpeKaV71OgH6Q-vhhFyEpUxOA"; | ||
break; |
break; | |
case "mapa.prosek.czf": |
case "mapa.prosek.czf": | |
$GMapKey="ABQIAAAAlZ9uhPay2OYt2xmaN84g0BTYUdkyQZ68wktXWB9o4y2agzv8zxRyBxtFdIbLe18hmqHTwiWPXl7VxA"; |
$GMapKey="ABQIAAAAlZ9uhPay2OYt2xmaN84g0BTYUdkyQZ68wktXWB9o4y2agzv8zxRyBxtFdIbLe18hmqHTwiWPXl7VxA"; | |
break; |
break; | |
default: |
default: | |
Line 126... | Line 129... | |
} |
} | |
|
| |
function MapLoad() { |
function MapLoad() { | |
if (GBrowserIsCompatible()) { |
if (GBrowserIsCompatible()) { | |
map = new GMap2(document.getElementById("map"),{draggableCursor: \'crosshair\', draggingCursor: \'pointer\'}); |
map = new GMap2(document.getElementById("map"),{draggableCursor: \'crosshair\', draggingCursor: \'pointer\'}); | |
|
||
|
| |
map.addControl(new GLargeMapControl()); |
map.addControl(new GLargeMapControl()); | |
map.addControl(new GMapTypeControl()); |
map.addControl(new GMapTypeControl()); | |
var MapCenter = new GLatLng(MapCenterLat, MapCenterLon); |
var MapCenter = new GLatLng(MapCenterLat, MapCenterLon); | |
map.setCenter(MapCenter, MapZoom); |
map.setCenter(MapCenter, MapZoom); | |
Line 373... | Line 375... | |
function ChangeMapSizeX(NewMapSizeX) { |
function ChangeMapSizeX(NewMapSizeX) { | |
MapSizeX = NewMapSizeX; |
MapSizeX = NewMapSizeX; | |
FetchOverlayAndData(); |
FetchOverlayAndData(); | |
document.getElementById("status").innerHTML = "Rozmer X zmenen na "+MapSizeX; |
document.getElementById("status").innerHTML = "Rozmer X zmenen na "+MapSizeX; | |
document.getElementById("map").style.width = MapSizeX+"px"; |
document.getElementById("map").style.width = MapSizeX+"px"; | |
|
| |
MapName = map.getCurrentMapType().getName(); | ||
ClearOverlayAndData(); |
ClearOverlayAndData(); | |
MapLoad(); |
MapLoad(); | |
FetchOverlayAndData(); |
FetchOverlayAndData(); | |
} |
} | |
|
| |
Line 386... | Line 389... | |
MapSizeY = NewMapSizeY; |
MapSizeY = NewMapSizeY; | |
FetchOverlayAndData(); |
FetchOverlayAndData(); | |
document.getElementById("status").innerHTML = "Rozmer Y zmenen na "+MapSizeY; |
document.getElementById("status").innerHTML = "Rozmer Y zmenen na "+MapSizeY; | |
document.getElementById("map").style.height = MapSizeY+"px"; |
document.getElementById("map").style.height = MapSizeY+"px"; | |
|
| |
MapName = map.getCurrentMapType().getName(); | ||
ClearOverlayAndData(); |
ClearOverlayAndData(); | |
MapLoad(); |
MapLoad(); | |
FetchOverlayAndData(); |
FetchOverlayAndData(); | |
} |
} | |
|
| |
Line 543... | Line 547... | |
function MDControl() { } |
function MDControl() { } | |
MDControl.prototype = new GControl(); |
MDControl.prototype = new GControl(); | |
MDControl.prototype.initialize = function(map) { |
MDControl.prototype.initialize = function(map) { | |
var container = document.createElement("div"); |
var container = document.createElement("div"); | |
var savepos= document.createElement("div"); |
var savepos= document.createElement("div"); | |
savepos.title= "Save actual position and zoomlevel"; |
savepos.title= "Ulozit aktualni pozici a zoom"; | |
savepos.className= "MDbuttons"; |
savepos.className= "MDbuttons"; | |
container.appendChild(savepos); |
container.appendChild(savepos); | |
savepos.appendChild(document.createTextNode("Save Position")); |
savepos.appendChild(document.createTextNode("Ulozit pozici")); | |
GEvent.addDomListener(savepos, "click", function() { |
GEvent.addDomListener(savepos, "click", function() { | |
var center = map.getCenter(); var zoom = map.getZoom(); |
var center = map.getCenter(); var zoom = map.getZoom(); | |
saved.splice(0,2,center,zoom); |
saved.splice(0,2,center,zoom); | |
// alert("Saved Position: "+center.toUrlValue()+"\nZoomlevel: "+zoom); |
// alert("Saved Position: "+center.toUrlValue()+"\nZoomlevel: "+zoom); | |
}); |
}); | |
|
| |
var tosaved=document.createElement("div"); |
var tosaved=document.createElement("div"); | |
tosaved.title= "Back to saved position"; |
tosaved.title= "Navrat zpet na ulozenou pozici"; | |
tosaved.className= "MDbuttons"; |
tosaved.className= "MDbuttons"; | |
container.appendChild(tosaved); |
container.appendChild(tosaved); | |
tosaved.appendChild(document.createTextNode("To Saved")); |
tosaved.appendChild(document.createTextNode("Na ulozenou")); | |
GEvent.addDomListener(tosaved, "click", function() { |
GEvent.addDomListener(tosaved, "click", function() { | |
if(saved.length > 0) { map.setZoom(saved[1]); map.panTo(saved[0]); } |
if(saved.length > 0) { map.setZoom(saved[1]); map.panTo(saved[0]); } | |
}); |
}); | |
map.getContainer().appendChild(container); |
map.getContainer().appendChild(container); | |
return container; |
return container; | |
Line 569... | Line 573... | |
|
| |
MDControl.prototype.getDefaultPosition = function() { |
MDControl.prototype.getDefaultPosition = function() { | |
return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(7,31)); |
return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(7,31)); | |
} |
} | |
|
| |
//############################## | ||
function ShowMeasuredDistanceAndAngle() { | ||
var LineSize = 1; | ||
var LineColAB = "#FF0000"; | ||
var LineColAC = "#FF0000"; | ||
var LineColBC = "#00FF00"; | ||
var LineColOpacity = 0.5; | ||
| ||
var polyOptions = {geodesic:false}; | ||
if ( PtNum > 1 ) { | ||
var pointA = new GLatLng(parseFloat(PtA.lat()),parseFloat(PtA.lng())); | ||
var pointB = new GLatLng(parseFloat(PtB.lat()),parseFloat(PtB.lng())); | ||
polylineAB = new GPolyline([pointA,pointB], LineColAB, 3 + LineSize, LineColOpacity, polyOptions); | ||
map.addOverlay(polylineAB); | ||
} | ||
if ( PtNum > 2 ) { | ||
var pointC = new GLatLng(parseFloat(PtC.lat()),parseFloat(PtC.lng())); | ||
polylineAC = new GPolyline([pointA,pointC], LineColAC, 3 + LineSize, LineColOpacity, polyOptions); | ||
map.addOverlay(polylineAC); | ||
polylineBC = new GPolyline([pointB,pointC], LineColBC, 3 + LineSize, LineColOpacity, polyOptions); | ||
map.addOverlay(polylineBC); | ||
} | ||
} | ||
| ||
//############################## | ||
function HideMeasuredDistanceAndAngle() { | ||
if ( PtNum > 1 ) { | ||
map.removeOverlay(polylineAB); | ||
} | ||
if ( PtNum > 2 ) { | ||
map.removeOverlay(polylineAB); | ||
map.removeOverlay(polylineAC); | ||
map.removeOverlay(polylineBC); | ||
} | ||
} | ||
| ||
//############################## | ||
function MakePrintable() { | ||
| ||
// To make polygons printable... | ||
$$("div.gmnoprint").each( function (div, index) { | ||
div.removeClassName(\'gmnoprint\'); | ||
}); | ||
| ||
} | ||
|
| |
//]]> |
//]]> | |
</script> |
</script> | |
</head> |
</head> | |
|
| |
Line 582... | Line 631... | |
<td> |
<td> | |
<div id="map" class="gmaparea"></div> |
<div id="map" class="gmaparea"></div> | |
</td> |
</td> | |
|
| |
<td valign="top" class="controlarea"> |
<td valign="top" class="controlarea"> | |
Prihlasen jako: | ||
<div id="UserInfo">'; |
<div id="UserInfo">'; | |
|
||
echo "Prihlasen jako:<br>"; |
||
echo $bbuserinfo['username']." "; |
echo $bbuserinfo['username']." "; | |
echo $bbuserinfo['userid']." "; |
echo $bbuserinfo['userid']." "; | |
echo $bbuserinfo['mapperms']." "; |
echo $bbuserinfo['mapperms']." "; | |
echo $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']." "; |
echo $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']." "; | |
|
||
echo '</div> |
echo '</div> | |
Prepnout databazi: |
<hr> | |
<div id="databaze">0</div> |
Databaze: | |
<input type="button" value="ajax" onClick="SwitchDatabase(\'ajax\');"/> |
<br> | |
<input type="button" value="czfmutf" onClick="SwitchDatabase(\'czfmutf\');"/> |
<input type="button" value="czfmutf" onClick="SwitchDatabase(\'czfmutf\');"/> | |
<input type="button" value="gendb" onClick="SwitchDatabase(\'gendb\');"/> |
<input type="button" value="gendb" onClick="SwitchDatabase(\'gendb\');"/> | |
<div id="databaze">0</div> | ||
<hr> | ||
Nody a linky: | ||
<br> |
<br> | |
<input type="button" value="Zobrazit" onClick="Fetch();"/> | ||
<input type="button" value="Smazat" onClick="ForceClear();"/> | ||
<div id="NumNodes">0</div> |
<div id="NumNodes">0</div> | |
<div id="NumLinks">0</div> |
<div id="NumLinks">0</div> | |
<input type="button" value="Nacist ted" onClick="Fetch();"/> |
||
<input type="button" value="Smazat ted" onClick="ForceClear();"/> |
||
<br> |
||
Automaticke nacitani: |
Automaticke nacitani: | |
<input id="AutoFetchModeCheckButton" type="checkBox" onclick="ToggleAutoFetchMode(this.checked)"> |
<input id="AutoFetchModeCheckButton" type="checkBox" onclick="ToggleAutoFetchMode(this.checked)"> | |
<br> |
<br> | |
Automaticke mazani: |
Automaticke mazani: | |
<input id="AutoClearModeCheckButton" type="checkBox" onclick="ToggleAutoClearMode(this.checked)"> |
<input id="AutoClearModeCheckButton" type="checkBox" onclick="ToggleAutoClearMode(this.checked)"> | |
<br> |
<br> | |
Limit nodu: |
Limit poctu nodu: | |
<select id="NodeLimitSelectBox" onchange="ChangeNodeLimit(this.value)"> |
<select id="NodeLimitSelectBox" onchange="ChangeNodeLimit(this.value)"> | |
<option value="0">0</option> |
<option value="0">0</option> | |
<option value="30" selected="selected">30</option> |
<option value="30" selected="selected">30</option> | |
<option value="60">60</option> |
<option value="60">60</option> | |
<option value="200">200</option> |
<option value="200">200</option> | |
<option value="500">500</option> |
<option value="500">500</option> | |
<option value="1000">1000</option> |
<option value="1000">1000</option> | |
</select> |
</select> | |
|
<hr> | |
<input type="button" value=\'Save settings\' onclick=\'SetCookie("default", SaveSettingsCookieText() , 365);\'> |
Nastaveni mapy: | |
<input type="button" value=\'Load settings\' onclick=\'LoadSettings();\'> |
||
<div> |
<div> | |
<select id="MapSizeXSelectBox" onchange="ChangeMapSizeX(this.value)"> |
<select id="MapSizeXSelectBox" onchange="ChangeMapSizeX(this.value)"> | |
<option value="800" selected="selected">800</option> |
<option value="800" selected="selected">800</option> | |
<option value="900">900</option> |
<option value="900">900</option> | |
<option value="1000">1000</option> |
<option value="1000">1000</option> | |
Line 639... | Line 687... | |
<option value="800">800</option> |
<option value="800">800</option> | |
<option value="900">900</option> |
<option value="900">900</option> | |
<option value="1000">1000</option> |
<option value="1000">1000</option> | |
</select> |
</select> | |
</div> |
</div> | |
|
<input type="button" value=\'Ulozit\' onclick=\'SetCookie("default", SaveSettingsCookieText() , 365);\'> | |
<input type="button" value=\'Nahrat\' onclick=\'LoadSettings();\'> | ||
<hr> | ||
Mereni: | ||
<br> | ||
<input type="button" value=\'Zobrazit\' onclick=\'ShowMeasuredDistanceAndAngle();\'> | ||
<input type="button" value=\'Schovat\' onclick=\'HideMeasuredDistanceAndAngle();\'> | ||
<hr> | ||
Print: | ||
<br> | ||
<input type="button" value=\'Print\' onclick=\'MakePrintable();\'> | ||
</td> |
</td> | |
</tr> |
</tr> | |
|
| |
<tr> |
<tr> | |
<td class="statusarea" > |
<td class="statusarea" > | |
Line 651... | Line 709... | |
<div id="debug"></div> |
<div id="debug"></div> | |
<div id="status">Hotovo!</div> |
<div id="status">Hotovo!</div> | |
<div id="data"></div> |
<div id="data"></div> | |
<div id="NodeCoordinates">aaa</div> |
<div id="NodeCoordinates">aaa</div> | |
<div id="SouradniceStredu">Souradnice stredu:<br>Rozsah:<br>Zvetseni:</div> |
<div id="SouradniceStredu">Souradnice stredu:<br>Rozsah:<br>Zvetseni:</div> | |
<a href="http://code.google.com/apis/maps/documentation/examples/">http://code.google.com/apis/maps/documentation/examples/</a> |
||
<br> |
||
<a href="http://code.google.com/apis/kml/documentation/kml_tut.html">http://code.google.com/apis/kml/documentation/kml_tut.html</a> |
||
<br> |
||
<a href="http://mapki.com/wiki/Knowledge_Base">http://mapki.com/wiki/Knowledge_Base</a> |
||
<br> |
||
<a href="http://www.bdcc.co.uk/Gmaps/BdccGmapBits.htm">http://www.bdcc.co.uk/Gmaps/BdccGmapBits.htm</a> |
||
<br> |
||
http://www.czfree.net/forum/showthread.php?postid=197732#post197732 |
||
<td> |
<td> | |
<table border="1"> |
<table border="1"> | |
<tr> |
<tr> | |
<td>Mereni vzdalenosti a uhlu</td><td>A</td><td>B</td><td>C</td> |
<td>Mereni vzdalenosti a uhlu</td><td>A</td><td>B</td><td>C</td> | |
</tr> |
</tr> | |
Line 678... | Line 727... | |
<tr> |
<tr> | |
<td><div id="NodeCoordinatesC">C klikni potreti</div></td><td><div id="NodeDistanceCA">CA</div></td> |
<td><div id="NodeCoordinatesC">C klikni potreti</div></td><td><div id="NodeDistanceCA">CA</div></td> | |
<td><div id="NodeDistanceCB">CB</div></td><td><div id="NodeAngleCBA">BAC</div></td> |
<td><div id="NodeDistanceCB">CB</div></td><td><div id="NodeAngleCBA">BAC</div></td> | |
</tr> |
</tr> | |
<tr> |
<tr> | |
<td></td><td><div id="NodeDistanceBAC">B-A-C</div></td> |
<td> | |
</td><td><div id="NodeDistanceBAC">B-A-C</div></td> | ||
<td><div id="NodeDistanceABC">A-B-C</div></td><td><div id="NodeDistanceBCA">B-C-A</div></td> |
<td><div id="NodeDistanceABC">A-B-C</div></td><td><div id="NodeDistanceBCA">B-C-A</div></td> | |
</tr> |
</tr> | |
</table> |
</table> | |
</td> |
</td> | |
|
| |
</td> |
</td> | |
</tr> |
</tr> | |
|
| |
<tr> |
<tr> | |
<td colspan=2> |
<td colspan=2> | |
<br> |
||
CZFGmap (c) Petr Simandl - GNU General Public License |
CZFGmap (c) Petr Simandl - GNU General Public License | |
<br> |
||
<a href="http://websvn.prosek.czf/">websvn.prosek.czf</a> |
<a href="http://websvn.prosek.czf/">websvn.prosek.czf</a> | |
</td> |
</td> | |
</tr> |
</tr> | |
|
| |
</table> |
</table> | |
|
<a href="http://code.google.com/apis/maps/documentation/examples/">http://code.google.com/apis/maps/documentation/examples/</a> | |
<a href="http://code.google.com/apis/kml/documentation/kml_tut.html">http://code.google.com/apis/kml/documentation/kml_tut.html</a> | ||
<br> | ||
<a href="http://mapki.com/wiki/Knowledge_Base">http://mapki.com/wiki/Knowledge_Base</a> | ||
<a href="http://www.bdcc.co.uk/Gmaps/BdccGmapBits.htm">http://www.bdcc.co.uk/Gmaps/BdccGmapBits.htm</a> | ||
<br> | ||
<a href="http://econym.googlepages.com/custommap.htm">http://econym.googlepages.com/custommap.htm</a> | ||
<br> | ||
http://www.czfree.net/forum/showthread.php?postid=197732#post197732 | ||
</body> |
</body> | |
</html> |
</html> | |
'; |
'; | |
?> |
?> | |
|
|