// -------------------------------------------------------------------------------------------- // GoogleMaps V4 - Methoden // -------------------------------------------------------------------------------------------- var gMap = ""; var gHost = ""; // Mittelpunkt D var gCenterDLat = "50.9446"; var gCenterDLon = "10.3271"; // Search Lat Lon var gSearchLat = ""; var gSearchLon = ""; var gPL = ""; var gCacheArrayLabel = new Array(); var gCacheArrayCache = new Array(); var gZoomLevelOld = 0; var gSearch = ""; var gPan = ""; function openBrWindowFP(inCountry, inP2) { // open full browser window switch (inCountry) { case 'CH': wP1 = 'http://www.etas-it.ch/oc/g_cache_det.php?fId='; break; case 'PL': wP1 = 'http://www.opencaching.pl/viewcache.php?cacheid='; break; default: wP1 = 'http://www.opencaching.de/viewcache.php?cacheid='; break; } features = 'status=yes,scrollbars=yes,toolbar=yes,menubar=yes,location=yes,resizable=yes,width=975,height=650,top=0,left=90'; window.open(wP1 + inP2, '',features); // window.open(wP1 + inP2, ''); } function initMap() { if (gHost != 'localhost') { if (GBrowserIsCompatible()) { // gMap = new GMap(document.getElementById("id_map"), G_HYBRID_TYPE, 1000, 800); gMap = new GMap2(document.getElementById("id_map")); centerMapLand('DE'); gMap.addControl(new GLargeMapControl()); gMap.addControl(new GMapTypeControl()); gMap.addControl(new GScaleControl()); gMap.addControl(new GOverviewMapControl()); GEvent.addListener(gMap, "zoomend", drawLabelCache ); GEvent.addListener(gMap, "moveend", getBounds ); } else { alert("Browser is not compatible for Google Map"); } } else { centerMapLand('DE'); } } function unloadMap() { if (gHost != 'localhost') { GUnload(); } } function centerMapLand(inLC) { wObj = LAND_searchLC(inLC); if (wObj != null) { wOutput = "Suche nach Land, gefunden: " + wObj.LCT + " (" + wObj.LC + ") [" + wObj.Lat + " / " + wObj.Lon + "] ZoomLevel: " + wObj.ZL; document.getElementById('id_status').innerHTML = wOutput; if (gHost != 'localhost') { wZL1 = wObj.ZL; wZL = wZL1.valueOf(); // gMap.setCenter(new GLatLng (wObj.Lat.valueOf(), wObj.Lon.valueOf()), wObj.ZL.valueOf(), G_HYBRID_MAP); gMap.setCenter(new GLatLng (wObj.Lat.valueOf(), wObj.Lon.valueOf()), wZL, G_HYBRID_MAP); // gMap.setCenter(new GLatLng (wObj.Lat.valueOf(), wObj.Lon.valueOf()), 6, G_HYBRID_MAP); } } else { if (gHost != 'localhost') { gMap.setCenter(new GLatLng (gCenterDLat, gCenterDLon), 6, G_HYBRID_MAP); } } getBounds(); } function getBounds() { if (gHost != 'localhost') { wZL = gMap.getZoom(); // alert("ZL old: " + gZoomLevelOld + " ZL new: " + wZL); if (gZoomLevelOld == 11 && wZL == 12) { removeAllLabelCache(); } if (gZoomLevelOld == 12 && wZL == 11) { removeAllLabelCache(); } if (gZoomLevelOld == 12 && wZL == 13) { removeAllLabelCache(); } if (gZoomLevelOld == 13 && wZL == 12) { removeAllLabelCache(); } gZoomLevelOld = wZL; document.getElementById('id_zl').innerHTML = "Zoomlevel: " + wZL; wCLL = gMap.getCenter(); // GLog.write("logeintrag" + wCLL.lat() + " " + wCLL.lng()); wLatw = wCLL.lat(); wLonw = wCLL.lng(); wLat = Math.round(wLatw * 10000) / 10000; wLon = Math.round(wLonw * 10000) / 10000; // save Center gSearchLat = wLat; gSearchLon = wLon; document.getElementById('id_1').innerHTML = "Center : " + wLat + " / " + wLon ; var wBounds = gMap.getBounds(); var wSW = wBounds.getSouthWest(); var wMinX = wSW.lng(); var wMinY = wSW.lat(); var wNE = wBounds.getNorthEast(); var wMaxX = wNE.lng(); var wMaxY = wNE.lat(); var wLatLngStr = '(' + wMinY + ', ' + wMinX + ' / ' + wMaxY + ', ' + wMaxX + ')'; } else { alert("getBounds: geht teilweise nicht, localhost, Default MinMax!"); if (gSearchLat != "") { wLatD = 0.037; wLonD = 0.075; wLat = gSearchLat.valueOf(); wLon = gSearchLon.valueOf(); wMinY = wLat - wLatD; wMinX = wLon - wLonD; wMinY = ((wLat * 1000) - (wLatD * 1000)) / 1000; wMinX = ((wLon * 1000) - (wLonD * 1000)) / 1000; wMaxY = ((wLat * 1000) + (wLatD * 1000)) / 1000; wMaxX = ((wLon * 1000) + (wLonD * 1000)) / 1000; } else { wMinY = 48.00; wMinX = 7.70; wMaxY = 48.10; wMaxX = 7.90; } // alert(gSearchLat + "/" + gSearchLon + " " + wMinY + "/" + wMinX + " - " + wMaxY + "/" + wMaxX); } // if (gHost != 'localhost') { updateMapCache(wMinY, wMinX, wMaxY, wMaxX); // } // else { // alert("geht nicht, localhost"); // } } /* // ************************************************************************************* // Map Info // ************************************************************************************* */ function getMapInfo() { if (gHost != 'localhost') { var wM = ""; wM = wM + ' draggingenabled: ' + gMap.draggingEnabled() + '\n'; wM = wM + ' infoWindowEnabled: ' + gMap.infoWindowEnabled() + '\n'; // wBounds = gMap.getBounds(); wSW = wBounds.getSouthWest(); wMinY = wSW.lng(); wMinX = wSW.lat(); wNE = wBounds.getNorthEast(); wMaxY = wNE.lng(); wMaxX = wNE.lat(); // wM = wM + ' getCenterLatLng: ' + gMap.getCenter() + '\n'; wM = wM + 'minLatLng: ' + wMinX + '/' + wMinY + '\n'; wM = wM + 'maxLatLng: ' + wMaxX + '/' + wMaxY + '\n'; // wM = wM + ' getZoom: ' + gMap.getZoom() + '\n'; wM = wM + ' getMapTypes: ' + gMap.getMapTypes() + '\n'; wMT = gMap.getCurrentMapType(); wM = wM + ' getCurrentMapType: ' + wMT.getName() + '\n'; } else { wM = "Works not for localhost!"; } alert("MapInfo\n" + wM); } /* // ************************************************************************************* // Handle Settings // ************************************************************************************* */ function handleSettings(inSaveRecall, inPersonId, inFileName) { switch (inSaveRecall) { case 'S': wCc = document.frmInput.chkCaches.checked; wPc = document.frmInput.chkPreLoad.checked; if (gHost != 'localhost') { wZL = gMap.getZoom(); wCLL = gMap.getCenter(); wLatw = wCLL.lat(); wLonw = wCLL.lng(); wLat = Math.round(wLatw * 10000) / 10000; wLon = Math.round(wLonw * 10000) / 10000; } else { wZL = 9; wLat = gCenterDLat; wLon = gCenterDLon; } wSaveData = 'cc=' + wCc+ ';kc=' + wKc + ';oc=' + wOc + ';pc=' + wPc + ';zl=' + wZL + ';lat=' + wLat + ';lon=' + wLon; // HTTP-Request absetzen: save Settings wUrl = 'm_oc_ajax.php?fAct=save_data&personid=' + inPersonId + '&filename=' + inFileName + '&savedata=' + wSaveData + '&PHPSESSID='; wAsync_flag = true; ajax_loadXMLDoc3(wUrl, 'handleSettingsSave()', wAsync_flag, 5); break; case 'R': // HTTP-Request absetzen: recall Settings wUrl = 'm_oc_ajax.php?fAct=recall_data&personid=' + inPersonId + '&filename=' + inFileName + '&PHPSESSID='; wAsync_flag = true; ajax_loadXMLDoc3(wUrl, 'handleSettingsRecall()', wAsync_flag, 5); break; case 'B': // Beispiel document.frmInput.chkCaches.checked = true; document.frmInput.chkPreLoad.checked = true; // Zoomlevel wZL = 14; // Freiburg i. B. wLat = 48.00; wLon = 7.85; if (gHost != 'localhost') { gMap.setCenter(new GLatLng (wLat, wLon), wZL); } getBounds(); break; } } function handleSettingsSave() { alert("Save Settings Done"); } function handleSettingsRecall() { var wString = ""; // Response holen var wResp = gHttp3.responseXML.documentElement; // return_code wReturn_code = wResp.getElementsByTagName('return_code')[0].firstChild.data; if (wReturn_code == 'ok') { // mut_datum wMutDatum = wResp.getElementsByTagName('mut_datum')[0].firstChild.data; // mut_zeit wMutZeit = wResp.getElementsByTagName('mut_zeit')[0].firstChild.data; // data_saved wDSw = wResp.getElementsByTagName('data_saved')[0].firstChild.data; wDS = wDSw.split(";"); wDSlen = wDS.length; for (i=0; i < wDSlen; ++i) { wVal = wDS[i].split("="); // alert(wVal[0] + " = >" + wVal[1] + "<"); if (wVal[0] == 'cc') { document.frmInput.chkCaches.checked = eval(wVal[1]); } if (wVal[0] == 'pc') { document.frmInput.chkPreLoad.checked = eval(wVal[1]); } if (wVal[0] == 'zl') { wZL = wVal[1]; } if (wVal[0] == 'lat') { wLat = wVal[1]; } if (wVal[0] == 'lon') { wLon = wVal[1]; } } if (gHost != 'localhost') { gMap.centerAndZoom(new GLatLng(wLat, wLon), wZL); } getBounds(); // alert("Recall Settings Done\nLast Save: " + wMutDatum + " " + wMutZeit + "\n" + wDSw); } else { alert("Recall Settings Done, NOK"); } } /* // ************************************************************************************* // Map Overlays // ************************************************************************************* */ function getAnchorStyle(inAnchor) { var wStyle = ""; switch (inAnchor) { case "bottomLeft": wStyle = "padding: 0px 0px 8px 8px; background: url(images/point_bottomLeft.png) no-repeat bottom left;"; break; case "topRight": wStyle = "padding: 16px 16px 0px 0px; background: url(images/point_bottomLeft.png) no-repeat bottom left;"; break; case "midRight": wStyle = "padding: 0px 16px 0px 0px; background: url(images/point_bottomLeft.png) no-repeat bottom left;"; break; default: break; } return wStyle; } /* // ************************************************************************************* // Cache // ************************************************************************************* */ function drawLabelCache() { // läuft im IE // wV=document.frmInput.getElementById('chkCaches').checked; // läuft im IE + Firefox! wV=document.frmInput.chkCaches.checked; if (wV == true) { getBounds(); } else { // Listbox referenzieren var w_lstResultC = document.forms[0].lstResultC; // Listbox löschen w_lstResultC.options.length = 0; w_lstResultC.disabled = true; document.getElementById('id_rows_caches').innerHTML = " "; removeAllLabelCache(); } } function drawLabelCache2() { // läuft im IE // wV=document.frmInput.getElementById('chkCaches').checked; // läuft im IE + Firefox! wV=document.frmInput.chkCaches.checked; // Listbox referenzieren var w_lstResultC = document.forms[0].lstResultC; // Listbox löschen w_lstResultC.options.length = 0; w_lstResultC.disabled = true; document.getElementById('id_rows_caches').innerHTML = " "; removeAllLabelCache(); if (wV == true) { getBounds(); } } function addLabelCache(inObj_cache) { var wX = ""; wAnchor = "bottomLeft"; wAnchorStyle = getAnchorStyle(wAnchor); // rot var wBGcolorRed = '#FF8080'; // rot // var wBGcolorRed = '#FF3300'; // yellow var wBGcolorYellow = '#FFFF33'; // blue var wBGcolorBlue = '#3399CC'; // green var wBGcolorGreen = '#33FF66'; // rot dunkel var wBGcolor2 = '#FF0000'; switch (inObj_cache.type) { // normal case '2': wBGcolor = wBGcolorRed; break; // Multi case '3': wBGcolor = wBGcolorYellow; break; // Mystery case '7': wBGcolor = wBGcolorBlue; break; default: wBGcolor = wBGcolorGreen; break; } if (inObj_cache.status != "1") { if (document.frmInput.chkArch.checked != true) { return; } else { wBGcolor = '#FFCCCC'; } } if (gHost != 'localhost') { wZL = gMap.getZoom(); } else { wZL = 13; // Test! } var wContent = ""; wContent = '
' + inObj_cache.cacheid + ' (*' + inObj_cache.date_hidden + ')
' + inObj_cache.cache_name + '
'; if (wZL < 13) { wContent = '
' + inObj_cache.cache_name + '
'; } if (wZL < 12) { wContent = '
'; } wLabelId = 'id_' + inObj_cache.cacheid; if (gHost != 'localhost') { var wLabel = new TLabel(); wLabel.id = wLabelId; wLabel.anchorLatLng = new GLatLng(inObj_cache.cache_lat,inObj_cache.cache_lon); wLabel.anchorPoint = wAnchor; // label.markerOffset = new GSize (x,y); wLabel.content = wContent; wLabel.percentOpacity = 90; // Label auf map gMap.addTLabel(wLabel); } // Label in Array sicherstellen gCacheArrayLabel.push(wLabel); gCacheArrayCache.push(inObj_cache); return; } function removeAllLabelCache() { if (gHost != 'localhost') { for (i=0; i < gCacheArrayLabel.length; ++i) { wLabel = gCacheArrayLabel[i]; gMap.removeTLabel(wLabel); } } // Array löschen gCacheArrayLabel = new Array(); gCacheArrayCache = new Array(); return; } function removeLabelCache(inLabel) { if (gHost != 'localhost') { gMap.removeTLabel(inLabel); } return; } function updateMapCache(inLatMin, inLonMin, inLatMax, inLonMax) { wZL = 0; if (gHost != 'localhost') { wZL = gMap.getZoom(); if (wZL < 11) { return; } } else { // Default Zoom-Level wZL = 14; } wV=document.frmInput.chkCaches.checked; if (wV != true) { return; } // document.getElementById('id_status').innerHTML = "loading Caches ..."; wPreLoad = document.frmInput.chkPreLoad.checked; if (wPreLoad == true && wZL > 11) { if (wZL == 12) { wLatDiff = (inLatMax - inLatMin) / 3; wLonDiff = (inLonMax - inLonMin) / 3; } else { wLatDiff = (inLatMax - inLatMin) / 1.5; wLonDiff = (inLonMax - inLonMin) / 1.5; } inLatMin = inLatMin - wLatDiff; inLatMax = inLatMax + wLatDiff; inLonMin = inLonMin - wLonDiff; inLonMax = inLonMax + wLonDiff; } // HTTP-Request absetzen: Caches holen wUrl = 'm_oc_ajax.php?fAct=list_caches_ext&min_lat=' + inLatMin + '&min_lon=' + inLonMin + '&max_lat=' + inLatMax + '&max_lon=' + inLonMax + '&PHPSESSID='; // alert(wUrl); wAsync_flag = true; ajax_loadXMLDoc2(wUrl, 'handleCaches()', wAsync_flag, 5); } function handleCaches() { // Listbox referenzieren var w_lstResultC = document.forms[0].lstResultC; // Listbox löschen w_lstResultC.options.length = 0; wI = 0; wCacheArrayNew = new Array(); var wString = ""; // Response holen var wResp = gHttp2.responseXML.documentElement; // return_code wReturn_code = wResp.getElementsByTagName('return_code')[0].firstChild.data; if (wReturn_code == 'ok') { // Length (row_count) wLength = wResp.getElementsByTagName('cacheid').length; for(var i=0; i 0) { wCacheArrayNew.sort(compareEntries); } // Values in Listbox lstResult abfüllen k = 0; for (var j=0; j < wLen; j++) { k = k + 1; wCobj = wCacheArrayNew[j]; // Values in Listbox lstResult abfüllen wCache = k + " - " + wCobj.cacheid + " " + wCobj.cache_name + " (" + wCobj.distance + "km " + wCobj.direction + ")"; wData = "C;" + wCobj.cacheid + ";" + wCobj.cache_name + ";" + wCobj.distance + ";" + wCobj.direction + ";" + wCobj.cache_lat + ";" + wCobj.cache_lon; w_lstResultC.options[j] = new Option(wCache,wData); // if (wLen == 1) { // w_lstResultC.disabled = true; // } // else { w_lstResultC.disabled = false; // } } // Arrays alt sicherstellen wCacheArrayOld = gCacheArrayCache; wCacheArrayLabelOld = gCacheArrayLabel; // Arrays alt löschen gCacheArrayCache = new Array(); gCacheArrayLabel = new Array(); // Anzahl Einträge wLenN = wCacheArrayNew.length; wLenO = wCacheArrayOld.length; // Vergleiche Arrays neu / alt for (i=0; i < wLenN; ++i) { wCacheidN = wCacheArrayNew[i].cacheid; wFound = ""; for (j=0; j < wLenO; ++j) { wCacheidO = wCacheArrayOld[j].cacheid; if (wCacheidN == wCacheidO) { wFound = "y"; // Label in Array sicherstellen gCacheArrayLabel.push(wCacheArrayLabelOld[j]); gCacheArrayCache.push(wCacheArrayOld[j]); j = wLenO; // alert("keep: " + wCacheidN); } } if (wFound == "") { // add Cache wCobj = wCacheArrayNew[i]; addLabelCache(wCobj); } } // Vergleiche Arrays alt / neu for (i=0; i < wLenO; ++i) { wCacheidO = wCacheArrayOld[i].cacheid; wFound = ""; for (j=0; j < wLenN; ++j) { wCacheidN = wCacheArrayNew[j].cacheid; if (wCacheidO == wCacheidN) { wFound = "y"; j = wLenN; // alert("keep: " + wCacheidO); } } if (wFound == "") { // remove Cache wLabel = wCacheArrayLabelOld[i]; // alert("remove " + wLabel.Cache_nr); removeLabelCache(wLabel); } } wLA = gCacheArrayCache.length; wLL = gCacheArrayLabel.length; document.getElementById('id_rows_caches').innerHTML = " (" + wLA + ") "; if (gHost != 'localhost') { wZL = gMap.getZoom(); } else { wZL = "n/a"; } // document.getElementById('id_zl').innerHTML = "Zoom: " + wZL; // document.getElementById('id_status').innerHTML = "Caches loaded"; var wDebug = ''; if (wDebug == 'y') { wString = ""; wLen = wCacheArrayOld.length; for (i=0; i < wLen; ++i) { wCacheid = wCacheArrayOld[i].cacheid; wCache_name = wCacheArrayOld[i].cache_name; wString = wString + wCacheid + " " + wCache_name + "\n"; } alert("Alte Caches: " + wLen + "\n\n" + wString); } wDebug = ''; if (wDebug == 'y') { wString = ""; wLen = wCacheArrayNew.length; for (i=0; i < wLen; ++i) { wCacheid = wCacheArrayNew[i].cacheid; wCache_name = wCacheArrayNew[i].cache_name; wString = wString + wCacheid + " " + wCache_name + "\n"; } alert("Neue Caches Input: " + wLen + "\n\n" + wString); } wDebug = ''; if (wDebug == 'y') { wString = ""; wLen = gCacheArrayCache.length; for (i=0; i < wLen; ++i) { wCacheid = gCacheArrayCache[i].Cacheid; wCache_name = gCacheArrayCache[i].Cache_name; wString = wString + wCacheid + " " + wCache_name + "\n"; } alert("Neue CacheS Array: " + wLen + "\n\n" + wString); } } function compareEntries(inA, inB) { if (inA.distance < inB.distance) return -1; if (inA.distance > inB.distance) return 1; // a must be equal to b return 0; } /* // ************************************************************************************* // Handle PLZ V2 // ************************************************************************************* */ function handlePLZ2(inPLZ, inKT, inGemeindeName, inLat, inLon) { if (gHost != 'localhost') { if (gPan == "y") { gMap.panTo(new GLatLng (inLat, inLon)); gPan = ""; } else { gMap.setCenter(new GLatLng (inLat, inLon), 13); } } getBounds(); } /* // ************************************************************************************* // eigene Objekte // ************************************************************************************* */ function objGemeinde(in_gemeinde_nr, in_gemeinde_name, in_gemeinde_lat, in_gemeinde_lon) { this.gemeinde_nr = in_gemeinde_nr; this.gemeinde_name = in_gemeinde_name; this.gemeinde_lat = in_gemeinde_lat; this.gemeinde_lon = in_gemeinde_lon; } function objCache(in_cacheid, in_cache_name, in_type, in_cache_lat, in_cache_lon, in_date_hidden, in_status, in_distance,in_direction, in_wpid_oc, in_wpid_gc, in_wpid_nc, in_country) { this.cacheid = in_cacheid; this.cache_name = in_cache_name; this.type = in_type; this.cache_lat = in_cache_lat; this.cache_lon = in_cache_lon; this.date_hidden = in_date_hidden; this.status = in_status; this.distance = in_distance; this.direction = in_direction; this.wpid_oc = in_wpid_oc; this.wpid_gc = in_wpid_gc; this.wpid_nc = in_wpid_nc; this.country = in_country; } /* // ************************************************************************************* // Code für Tests // ************************************************************************************* */ function dumpArrayC() { wString = ""; wLen = gCacheArrayCache.length; for (i=0; i < wLen; ++i) { wCacheid = gCacheArrayCache[i].cacheid; wC_name = gCacheArrayCache[i].cache_name; wC_status = gCacheArrayCache[i].status; wString = wString + wCacheid + " " + wC_name + " " + wC_status + "\n"; } alert("Cache Array: " + wLen + "\n\n" + wString); } function dumpArrayCL() { if (gHost != 'localhost') { wString = ""; wLen = gCacheArrayLabel.length; for (i=0; i < wLen; ++i) { wId = gCacheArrayLabel[i].id; wString = wString + wId + "\n"; } alert("Cache Array Label: " + wLen + "\n\n" + wString); } else { alert("geht nicht, localhost!"); } } function searchLocation(inSearch) { // Status löschen document.getElementById('id_status').innerHTML = ""; // Listbox referenzieren var w_lstResult = document.forms[0].lstResult; // Listbox löschen w_lstResult.options.length = 0; w_lstResult.disabled = true; // Listbox referenzieren var w_lstResultC = document.forms[0].lstResultC; // Listbox löschen w_lstResultC.options.length = 0; w_lstResultC.disabled = true; // Search Lat Lon löschen gSearchLat = ""; gSearchLon = ""; gSearch = inSearch; if (gSearch.length == 0) { alert ("kein Suchbegriff eingegeben"); return; } // Track Search-Items TRACK_trackAction("id_oc_1", gFileName + " - Search: " + gSearch); wPos = gSearch.indexOf(","); if (wPos > 0) { if (gHost != 'localhost') { var wGeocoder = new GClientGeocoder(); wGeocoder.getLatLng( gSearch, function(wLatLon) { if (!wLatLon) { alert("Geocoding: Adresse '" + gSearch + "' nicht gefunden"); } else { wOutput = "Suche nach Adresse erfolgreich. [" + wLatLon.lat() + " / " + wLatLon.lng() + "]"; document.getElementById('id_status').innerHTML = wOutput; handlePLZ2("", "", gSearch, wLatLon.lat(), wLatLon.lng()); } } ); } else { alert ("Geocoding angenommen, geht unter localhost nicht!"); } return; } wSearch = gSearch.toUpperCase(); // nur Land eingegeben if (wSearch.length == 2) { centerMapLand(wSearch); return; } wSearchTag = ""; wSearchVal = ""; if (wSearch.substr(1,1) == "=") { wPos = 1; wSearchTag = wSearch.substr(0,wPos); wSearchVal = wSearch.substr(wPos + 1); } else { if (wSearch.substr(2,1) == "=") { wPos = 2; wSearchTag = wSearch.substr(0,wPos); wSearchVal = wSearch.substr(wPos + 1); } else { wSearchVal = wSearch; } } // alert("Tag: " + wSearchTag + " Val: " + wSearchVal); switch (wSearchTag) { case 'CH': case 'FR': case 'DE': case 'AT': if ((wSearchVal.length == 2) || (wSearchTag == 'AT' && wSearchVal.length == 1)) { // Search Kanton/Departement/Bundesland KDB_getKDBRemote("id_oc_1", "KDB_handleGetKDB", wSearchTag, wSearchVal); return; } if (((wSearchVal.length == 4) && (IsNumeric(wSearchVal) == true)) || ((wSearchVal.length == 5) && (IsNumeric(wSearchVal) == true))) { // Search PLZ PLZ_getPLZRemote("id_oc_1", "PLZ_handleGetPLZ", wSearchTag, wSearchVal); return; } PLZ_listGemeindeRemote("id_oc_1", "PLZ_handleListOrt", wSearchTag, wSearchVal); return; break; } if ((gSearch.length == 6) && (IsNumeric(gSearch) == true)) { CACHE_getCacheByIdRemote("id_oc_1", "CACHE_handleGetCacheByNameRemote", gSearch); return; } wW = wSearch.substr(0,2); wS = wSearch.substr(2); switch (wW) { case 'OC': CACHE_getCacheByOcIdRemote("id_oc_1", "CACHE_handleGetCacheByOcIdRemote", gSearch); break; case 'GC': CACHE_getCacheByGcIdRemote("id_oc_1", "CACHE_handleGetCacheByGcIdRemote", gSearch); break; case 'N0': CACHE_getCacheByNcIdRemote("id_oc_1", "CACHE_handleGetCacheByNcIdRemote", gSearch); break; default: CACHE_getCacheByNameRemote("id_oc_1", "CACHE_handleGetCacheByNameRemote", gSearch); break; } } function KDB_handleGetKDB(inObj) { if (inObj.KDB == null) { alert("KDB: " + gSearch + " nicht gefunden"); } else { switch (inObj.Land) { case "CH": wKKD = "Kanton"; break; case "F": wKKD = "Departement"; break; case "D": wKKD = "Bundesland"; break; default: wKKD = ""; break; } wOutput = "Suche nach " + wKKD + " gefunden: " + inObj.Land + "-" + inObj.KDB + " - " + inObj.KDBname + " [" + inObj.Latitude + " / " + inObj.Longitude + "]"; document.getElementById('id_status').innerHTML = wOutput; // save Center gSearchLat = inObj.Latitude; gSearchLon = inObj.Longitude; handlePLZ2(inObj.KDB, inObj.Land, inObj.KDBname, inObj.Latitude, inObj.Longitude); } } function PLZ_handleGetPLZ(inObj) { if (inObj.PLZ == null) { alert("PLZ: " + gSearch + " nicht gefunden"); } else { wOutput = "Suche nach PLZ, gefunden: " + inObj.Land + "-" + inObj.PLZ + " - " + inObj.GemeindeName + " (" + inObj.KDB + ") [" + inObj.Latitude + " / " + inObj.Longitude + "]"; document.getElementById('id_status').innerHTML = wOutput; // save Center gSearchLat = inObj.Latitude; gSearchLon = inObj.Longitude; handlePLZ2(inObj.PLZ, inObj.KDB, inObj.GemeindeName, inObj.Latitude, inObj.Longitude); } } /* function PLZ_handleGetOrt(inObj) { if (inObj.PLZ == null) { alert("Ort: " + gSearch + " nicht gefunden"); } else { wOutput = "Suche nach Ort, gefunden: " + inObj.PLZ + " - " + inObj.Ort + " (" + inObj.Bundesland + ") N " + inObj.KoordLat + " E " + inObj.KoordLon; document.getElementById('id_status').innerHTML = wOutput; handlePLZ2(inObj.PLZ, inObj.KT, inObj.GemeindeName, inObj.KoordLat, inObj.KoordLon); } } */ function PLZ_handleListOrt(inPLZArray) { wLen = inPLZArray.length; if (wLen == 0) { alert("Ort: " + gSearch + " nicht gefunden"); return; } // Listbox referenzieren var w_lstResult = document.forms[0].lstResult; // Listbox löschne w_lstResult.options.length = 0; for (var j=0; j < wLen; j++) { wObj = inPLZArray[j]; // alert ("PLZ: " + wObj.PLZ); // Values in Listbox lstResult abfüllen wI = j + 1; wOrt = wI + " - " + wObj.Land + "-" + wObj.GemeindeName + " (" + wObj.KDB + ")"; wData = "O;" + wObj.GemeindeNr + ";" + wObj.PLZ + ";" + wObj.GemeindeName + ";" + wObj.KDB + ";" + wObj.Latitude + ";" + wObj.Longitude; w_lstResult.options[j] = new Option(wOrt,wData); } if (wLen == 1) { w_lstResult.disabled = true; } else { w_lstResult.disabled = false; } handleGetOrt2(w_lstResult.options[0].value); } function handleGetOrt2(inElem) { wEntry = inElem.split(";"); wType = wEntry[0]; if (wType == "O") { wGemeindeNr = wEntry[1]; wPLZ = wEntry[2]; wOrt = wEntry[3]; wKT = wEntry[4]; wLatitude = wEntry[5]; wLongitude = wEntry[6]; // Lat Lon save gSearchLat = wLatitude; gSearchLon = wLongitude; wOutput = "Suche nach Ort, gefunden: " + wPLZ + " - " + wOrt + " " + " (" + wKT + ") [" + wLatitude + " / " + wLongitude + "] " ; document.getElementById('id_status').innerHTML = wOutput; handlePLZ2(wPLZ, wKT, wOrt, wLatitude, wLongitude); } else { wCacheId = wEntry[1]; wCacheName = wEntry[2]; wDist = wEntry[3]; wDir = wEntry[4]; wLatitude = wEntry[5]; wLongitude = wEntry[6]; // Lat Lon save gSearchLat = wLatitude; gSearchLon = wLongitude; wOutput = "Positioniert auf CacheId: " + wCacheId + " - " + wCacheName + " [" + wLatitude + " / " + wLongitude + "] " ; document.getElementById('id_status').innerHTML = wOutput; handlePLZ2("", wCacheId, wCacheName, wLatitude, wLongitude); } } function handleChangeResult() { // Listbox referenzieren var w_lstResult = document.forms[0].lstResult; handleGetOrt2(w_lstResult.options[w_lstResult.options.selectedIndex].value); } function handleChangeResultC() { gPan = "y"; // Listbox referenzieren var w_lstResultC = document.forms[0].lstResultC; handleGetOrt2(w_lstResultC.options[w_lstResultC.options.selectedIndex].value); } function CACHE_handleGetCacheByIdRemote(inObj) { if (inObj.CacheId == null) { alert("CacheId: " + gSearch + " nicht gefunden"); } else { wOutput = "Suche nach CacheId, gefunden: " + inObj.CacheId + " - " + inObj.CacheName + " [" + inObj.KoordWPlat + " / " + inObj.KoordWPlon + "]"; document.getElementById('id_status').innerHTML = wOutput; handlePLZ2(inObj.CacheId, "", inObj.CacheName, inObj.KoordWPlat, inObj.KoordWPlon); } } function CACHE_handleGetCacheByNameRemote(inObj) { if (inObj.CacheName == null) { alert("CacheName: " + gSearch + " nicht gefunden"); } else { wOutput = "Suche nach CacheName, gefunden: " + inObj.CacheId + " - " + inObj.CacheName + " [" + inObj.KoordWPlat + " / " + inObj.KoordWPlon + "]"; document.getElementById('id_status').innerHTML = wOutput; handlePLZ2(inObj.CacheId, "", inObj.CacheName, inObj.KoordWPlat, inObj.KoordWPlon); } } function CACHE_handleGetCacheByOcIdRemote(inObj) { if (inObj.CacheName == null) { alert("OC-Id: " + gSearch + " nicht gefunden"); } else { wOutput = "Suche nach OC-Id, gefunden: " + inObj.CacheId + " - " + inObj.CacheName + " [" + inObj.KoordWPlat + " / " + inObj.KoordWPlon + "]"; document.getElementById('id_status').innerHTML = wOutput; handlePLZ2(inObj.WpId, '', inObj.CacheName, inObj.KoordWPlat, inObj.KoordWPlon); } } function CACHE_handleGetCacheByGcIdRemote(inObj) { if (inObj.CacheName == null) { alert("GC-Id: " + gSearch + " nicht gefunden"); } else { wOutput = "Suche nach GC-Id, gefunden: " + inObj.CacheId + " - " + inObj.CacheName + " [" + inObj.KoordWPlat + " / " + inObj.KoordWPlon + "]"; document.getElementById('id_status').innerHTML = wOutput; handlePLZ2(inObj.WpId, '', inObj.CacheName, inObj.KoordWPlat, inObj.KoordWPlon); } } function CACHE_handleGetCacheByNcIdRemote(inObj) { if (inObj.CacheName == null) { alert("NC-Id: " + gSearch + " nicht gefunden"); } else { wOutput = "Suche nach NC-Id, gefunden: " + inObj.CacheId + " - " + inObj.CacheName + " [" + inObj.KoordWPlat + " / " + inObj.KoordWPlon + "]"; document.getElementById('id_status').innerHTML = wOutput; handlePLZ2(inObj.WpId, '', inObj.CacheName, inObj.KoordWPlat, inObj.KoordWPlon); } } function IsNumeric(strString) { // check for valid numeric strings var strValidChars = "0123456789"; var strChar; var blnResult = true; if (strString.length == 0) return false; // test strString consists of valid characters listed above for (i = 0; i < strString.length && blnResult == true; i++) { strChar = strString.charAt(i); if (strValidChars.indexOf(strChar) == -1) { blnResult = false; } } return blnResult; } // -------------------------------------------------------------------------------------------- // Globale Variablen // -------------------------------------------------------------------------------------------- var gHttp1; var gHttp2; var gHttp3; var gHttpTrack; var gCallbackFunction1; var gCallbackFunction2; var gCallbackFunction3; var gTime1S = 0; var gTime2S = 0; var gTime3S = 0; var gTime1; var gTime2; var gTime3; // -------------------------------------------------------------------------------------------- // get Doc1 // -------------------------------------------------------------------------------------------- function ajax_loadXMLDoc1(in_url, in_callback_function, in_async_flag, in_timeout_seconds) { gHttp1 = false; gCallbackFunction1 = in_callback_function; // branch for native XMLHttpRequest object if(window.XMLHttpRequest) { try { gHttp1 = new XMLHttpRequest(); } catch(e) { gHttp1 = false; } // branch for IE/Windows ActiveX version } else if(window.ActiveXObject) { try { gHttp1 = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { gHttp1 = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { gHttp1 = false; } } } if(gHttp1) { if (in_timeout_seconds > "") { gTime1S = in_timeout_seconds; // Time starten wDate = new Date(); gTime1 = wDate.getTime(); } else { gTime1S = 0; } // damit xy.php nicht aus dem Cache bedient wird, muss ein Token mitgegeben werden var wDate = new Date(); var wToken = wDate.getTime(); gHttp1.onreadystatechange = ajax_processReqChange1; gHttp1.open("GET", in_url + '&token=' + wToken, in_async_flag); gHttp1.send(""); } } // -------------------------------------------------------------------------------------------- // ReqChange1 // -------------------------------------------------------------------------------------------- function ajax_processReqChange1() { if (gTime1S > 0) { // Time stoppen wDate = new Date(); wTime = wDate.getTime(); wDiffS = (wTime - gTime1) / 1000; if (wDiffS > gTime1S) { // Abbruch? wAnswer = window.confirm("Server gibt seit " + wDiffS + " Sekunden keine Antwort. Abbrechen?"); if (wAnswer == true) { gHttp1.readyState = 4; } else { // Timer zurücksetzen gTime1 = wtime; } } } // only if gHttp1 shows "loaded" if (gHttp1.readyState == 4) { // only if "OK" if (gHttp1.status == 200) { // Callback aufrufen eval(gCallbackFunction1); } else { alert("m_ajax_main: There was a problem retrieving the XML data:\n" + gHttp1.statusText); } } } // -------------------------------------------------------------------------------------------- // get Doc2 // -------------------------------------------------------------------------------------------- function ajax_loadXMLDoc2(in_url, in_callback_function, in_async_flag) { gHttp2 = false; gCallbackFunction2 = in_callback_function; // branch for native XMLHttpRequest object if(window.XMLHttpRequest) { try { gHttp2 = new XMLHttpRequest(); } catch(e) { gHttp2 = false; } // branch for IE/Windows ActiveX version } else if(window.ActiveXObject) { try { gHttp2 = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { gHttp2 = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { gHttp2 = false; } } } if(gHttp2) { // damit xy.php nicht aus dem Cache bedient wird, muss ein Token mitgegeben werden var wDate = new Date(); var wToken = wDate.getTime(); gHttp2.onreadystatechange = ajax_processReqChange2; gHttp2.open("GET", in_url + '&token=' + wToken, in_async_flag); gHttp2.send(""); } } // -------------------------------------------------------------------------------------------- // ReqChange2 // -------------------------------------------------------------------------------------------- function ajax_processReqChange2() { // only if gHttp2 shows "loaded" if (gHttp2.readyState == 4) { // only if "OK" if (gHttp2.status == 200) { // Callback aufrufen eval(gCallbackFunction2); } else { alert("m_ajax_main: There was a problem retrieving the XML data:\n" + gHttp2.statusText); } } } // -------------------------------------------------------------------------------------------- // get Doc3 // -------------------------------------------------------------------------------------------- function ajax_loadXMLDoc3(in_url, in_callback_function, in_async_flag) { gHttp3 = false; gCallbackFunction3 = in_callback_function; // branch for native XMLHttpRequest object if(window.XMLHttpRequest) { try { gHttp3 = new XMLHttpRequest(); } catch(e) { gHttp3 = false; } // branch for IE/Windows ActiveX version } else if(window.ActiveXObject) { try { gHttp3 = new ActiveXObject("Msxml3.XMLHTTP"); } catch(e) { try { gHttp3 = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { gHttp3 = false; } } } if(gHttp3) { // damit xy.php nicht aus dem Cache bedient wird, muss ein Token mitgegeben werden var wDate = new Date(); var wToken = wDate.getTime(); gHttp3.onreadystatechange = ajax_processReqChange3; gHttp3.open("GET", in_url + '&token=' + wToken, in_async_flag); gHttp3.send(""); } } // -------------------------------------------------------------------------------------------- // ReqChange3 // -------------------------------------------------------------------------------------------- function ajax_processReqChange3() { // only if gHttp3 shows "loaded" if (gHttp3.readyState == 4) { // only if "OK" if (gHttp3.status == 200) { // Callback aufrufen eval(gCallbackFunction3); } else { alert("m_ajax_main: There was a problem retrieving the XML data:\n" + gHttp3.statusText); } } } // -------------------------------------------------------------------------------------------- // get DocTrack // -------------------------------------------------------------------------------------------- function ajax_loadXMLDocTrack(in_url, in_async_flag) { gHttpTrack = false; // branch for native XMLHttpRequest object if(window.XMLHttpRequest) { try { gHttpTrack = new XMLHttpRequest(); } catch(e) { gHttpTrack = false; } // branch for IE/Windows ActiveX version } else if(window.ActiveXObject) { try { gHttpTrack = new ActiveXObject("Msxml3.XMLHTTP"); } catch(e) { try { gHttpTrack = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { gHttpTrack = false; } } } if(gHttpTrack) { // damit xy.php nicht aus dem Cache bedient wird, muss ein Token mitgegeben werden var wDate = new Date(); var wToken = wDate.getTime(); gHttpTrack.onreadystatechange = ajax_processReqChangeTrack; gHttpTrack.open("GET", in_url + '&token=' + wToken, in_async_flag); gHttpTrack.send(""); } } // -------------------------------------------------------------------------------------------- // ReqChangeTrack // -------------------------------------------------------------------------------------------- function ajax_processReqChangeTrack() { // only if gHttpTrack shows "loaded" if (gHttpTrack.readyState == 4) { // only if "OK" if (gHttpTrack.status == 200) { // Callback aufrufen x_handleTrackAction(); } else { alert("m_ajax_main: There was a problem retrieving the XML data:\n" + gHttpTrack.statusText); } } } function ajax_trackAction(inTrackstring) { // escape: Sonderzeichen umwandeln wTS = escape(inTrackstring); // HTTP-Request absetzen wUrl = 'm_ajax.php?fAct=track_action&trackstring='+ wTS + '&PHPSESSID='; wAsync_flag = true; ajax_loadXMLDocTrack(wUrl, 'handleTrackAction', wAsync_flag); } function x_handleTrackAction() { // alert("fertig"); } /* // ************************************************************************************* // Länder // ************************************************************************************* */ // ------------------------------------------------------------------------------------------ // globale Variablen gLAND_lc = new Array(); gLAND_lct = new Array(); gLAND_zl = new Array(); gLAND_lat = new Array(); gLAND_lon = new Array(); gLAND_loaded = 'n'; /* // ************************************************************************************* // eigene Objekte // ************************************************************************************* */ function objLAND(in_LAND, in_LAND_Text, in_ZL, in_Lat, in_Lon) { this.LC = in_LAND; this.LCT = in_LAND_Text this.ZL = in_ZL; this.Lat = in_Lat; this.Lon = in_Lon; } /* // ************************************************************************************* // LAND_Load: interne Tabelle laden // ************************************************************************************* */ function LAND_load() { gLAND_loaded = 'y'; i=0; gLAND_lc[i] = "CH"; gLAND_lct[i] = "Schweiz"; gLAND_zl[i] = 7; gLAND_lat[i] = "46.801216"; gLAND_lon[i] = "8.2267"; i++; gLAND_lc[i] = "DE"; gLAND_lct[i] = "Deutschland"; gLAND_zl[i] = 6; gLAND_lat[i] = "50.9446"; gLAND_lon[i] = "10.3271"; i++; gLAND_lc[i] = "AT"; gLAND_lct[i] = "Österreich"; gLAND_zl[i] = 7; gLAND_lat[i] = "47.695"; gLAND_lon[i] = "13.656"; i++; gLAND_lc[i] = "LI"; gLAND_lct[i] = "Liechtenstein"; gLAND_zl[i] = 11; gLAND_lat[i] = "47.1458"; gLAND_lon[i] = "9.565"; i++; gLAND_lc[i] = "NL"; gLAND_lct[i] = "Niederlande"; gLAND_zl[i] = 8; gLAND_lat[i] = "52.2648"; gLAND_lon[i] = "5.4327"; i++; gLAND_lc[i] = "BE"; gLAND_lct[i] = "Belgien"; gLAND_zl[i] = 8; gLAND_lat[i] = "50.7504"; gLAND_lon[i] = "4.6033"; i++; gLAND_lc[i] = "LU"; gLAND_lct[i] = "Luxemburg"; gLAND_zl[i] = 9; gLAND_lat[i] = "49.8149"; gLAND_lon[i] = "6.0947"; i++; gLAND_lc[i] = "FR"; gLAND_lct[i] = "Frankreich"; gLAND_zl[i] = 6; gLAND_lat[i] = "46.0942"; gLAND_lon[i] = "1.9391"; i++; gLAND_lc[i] = "IT"; gLAND_lct[i] = "Italien"; gLAND_zl[i] = 6; gLAND_lat[i] = "43.1972"; gLAND_lon[i] = "12.3926"; i++; gLAND_lc[i] = "SI"; gLAND_lct[i] = "Slovenien"; gLAND_zl[i] = 8; gLAND_lat[i] = "46.0885"; gLAND_lon[i] = "14.6997"; i++; gLAND_lc[i] = "CZ"; gLAND_lct[i] = "Tschechien"; gLAND_zl[i] = 7; gLAND_lat[i] = "49.8734"; gLAND_lon[i] = "15.4468"; i++; gLAND_lc[i] = "NO"; gLAND_lct[i] = "Norwegen"; gLAND_zl[i] = 6; gLAND_lat[i] = "60.4139"; gLAND_lon[i] = "9.2725"; i++; gLAND_lc[i] = "PL"; gLAND_lct[i] = "Polen"; gLAND_zl[i] = 6; gLAND_lat[i] = "52.12"; gLAND_lon[i] = "19.3579"; i++; gLAND_lc[i] = "SK"; gLAND_lct[i] = "Slovakei"; gLAND_zl[i] = 8; gLAND_lat[i] = "48.6111"; gLAND_lon[i] = "19.3359"; i++; gLAND_lc[i] = "ES"; gLAND_lct[i] = "Spanien"; gLAND_zl[i] = 6; gLAND_lat[i] = "40.2292"; gLAND_lon[i] = "-3.3179"; i++; gLAND_lc[i] = "SE"; gLAND_lct[i] = "Schweden"; gLAND_zl[i] = 6; gLAND_lat[i] = "58.4937"; gLAND_lon[i] = "14.3701"; i++; gLAND_lc[i] = "DK"; gLAND_lct[i] = "Dänemark"; gLAND_zl[i] = 7; gLAND_lat[i] = "55.8938"; gLAND_lon[i] = "10.8325"; } /* // ************************************************************************************* // LAND_searchLAND: search in interner Tabelle // ************************************************************************************* */ function LAND_searchLC(inLC) { if (gLAND_loaded == "n") { LAND_load(); } i = 0; j = -1; wLen = gLAND_lc.length; wLC = inLC.toUpperCase(); while (i < wLen) { if (gLAND_lc[i] == wLC) { j=i; break; } i++; } if (j > -1) { wObj = new objLAND(gLAND_lc[j], gLAND_lct[j], gLAND_zl[i], gLAND_lat[j], gLAND_lon[j]); return wObj; } else { // alert("NOT Found: " + inLC); return null; } } /* // ************************************************************************************* // KDB: Kanton / Departement / Bundesland // ************************************************************************************* */ /* // ************************************************************************************* // KDB_getKDBRemote: Remote über Iframe // ************************************************************************************* */ function KDB_getKDBRemote(inId, inCallBack, inLand, inKDB) { // wURI = "m_oc_ajax.php?fAct=get_kdb_by_land_kdb_js&cb=" + inCallBack + "&land=" + inLand + "&kdb=" + inKDB; wURI = "../geo/m_geo_ajax.php?fAct=get_kdb_by_land_kdb_js&cb=" + inCallBack + "&land=" + inLand + "&kdb=" + inKDB; document.getElementById(inId).src=wURI; } /* // ************************************************************************************* // PLZ_getPLZRemote: Remote über Iframe // ************************************************************************************* */ function PLZ_getPLZRemote(inId, inCallBack, inLand, inPLZ) { wURI = "../geo/m_geo_ajax.php?fAct=get_gemeinde_by_land_plz_js&cb=" + inCallBack + "&land=" + inLand + "&plz=" + inPLZ; document.getElementById(inId).src=wURI; } /* // ************************************************************************************* // PLZ_listGemeindeRemote: Remote über Iframe // ************************************************************************************* */ function PLZ_listGemeindeRemote(inId, inCallBack, inLand, inName) { wURI = "../geo/m_geo_ajax.php?fAct=list_gemeinde_by_land_gemeindename_js&cb=" + inCallBack + "&land=" + inLand + "&gemeindename=" + inName; document.getElementById(inId).src=wURI; } /* // ************************************************************************************* // PLZ_list_gemeinde_by_land_kdb_Remote: Remote über Iframe // ************************************************************************************* */ function PLZ_list_gemeinde_by_land_kdb_Remote(inId, inCallBack, inLand, inKDB) { wURI = "../geo/m_geo_ajax.php?fAct=list_gemeinde_by_land_kdb_js&cb=" + inCallBack + "&land=" + inLand + "&kdb=" + inKDB; document.getElementById(inId).src=wURI; } // ------------------------------------------------------------------------------------------ // globale Variablen /* // ************************************************************************************* // eigene Objekte für // ************************************************************************************* function objCACHE(in_CacheId, in_CacheName, in_Difficulty, in_Terrain, in_KoordWPlat, in_KoordWPlon, in_Date_Hidden) { this.CacheId = in_CacheId; this.CacheName = in_CacheName; this.Type = in_Type; this.Difficulty = in_Difficulty; this.Terrain = in_Terrain; this.KoordWPlat = in_KoordWPlat; this.KoordWPlon = in_KoordWPlon; this.Date_Hidden = in_Date_Hidden; } */ /* // ************************************************************************************* // CACHE_getCacheByIdRemote: Remote über Iframe // ************************************************************************************* */ function CACHE_getCacheByIdRemote(inId, inCallBack, inCacheId) { wURI = "m_oc_ajax.php?fAct=get_cache_by_id_text&cb=" + inCallBack + "&cacheid=" + inCacheId; document.getElementById(inId).src=wURI; } /* // ************************************************************************************* // CACHE_getCacheByOcIdRemote: Remote über Iframe // ************************************************************************************* */ function CACHE_getCacheByOcIdRemote(inId, inCallBack, inOcId) { wURI = "m_oc_ajax.php?fAct=get_cache_by_ocid_text&cb=" + inCallBack + "&ocid=" + inOcId; document.getElementById(inId).src=wURI; } /* // ************************************************************************************* // CACHE_getCacheByGcIdRemote: Remote über Iframe // ************************************************************************************* */ function CACHE_getCacheByGcIdRemote(inId, inCallBack, inGcId) { wURI = "m_oc_ajax.php?fAct=get_cache_by_gcid_text&cb=" + inCallBack + "&gcid=" + inGcId; document.getElementById(inId).src=wURI; } /* // ************************************************************************************* // CACHE_getCacheByNcIdRemote: Remote über Iframe // ************************************************************************************* */ function CACHE_getCacheByNcIdRemote(inId, inCallBack, inNcId) { wURI = "m_oc_ajax.php?fAct=get_cache_by_ncid_text&cb=" + inCallBack + "&ncid=" + inNcId; document.getElementById(inId).src=wURI; } /* // ************************************************************************************* // CACHE_getCacheByNameRemote: Remote über Iframe // ************************************************************************************* */ function CACHE_getCacheByNameRemote(inId, inCallBack, inName) { wURI = "m_oc_ajax.php?fAct=get_cache_by_name_text&cb=" + inCallBack + "&name=" + inName; document.getElementById(inId).src=wURI; } /* // ************************************************************************************* // TRACK_writeEntry: Remote über Iframe kein Callback! // ************************************************************************************* */ function TRACK_trackAction(inId, inTrackstring) { wURI = "m_oc_ajax.php?fAct=track_action&trackstring=" + inTrackstring; document.getElementById(inId).src=wURI; } //function TRACK_trackAction_Template(inINSEE, inPLZ, inGemeindeName, inLat, inLon, inAltitude) { // alert("PLZ: " + inPLZ + " " + inGemeindeName); //}