// --------------------------------------------------------------------------------------------
// GoogleMaps Hotspots
// --------------------------------------------------------------------------------------------
var gMap = "";
var gHost = "";
// Mittelpunkt Init
var gCenterInitLat = "46.9472";
var gCenterInitLon = "7.4393";
// Search Lat Lon
var gSearchLat = "";
var gSearchLon = "";
var gPL = "";
var gHotspotArrayLabel = new Array();
var gHotspotArrayMarker = new Array();
var gHotspotArrayHotspot = new Array();
var gZoomLevelOld = 0;
var gSearch = "";
var gDemoProd = "";
var gPan = "";
function openBrWindowFP(inPLZ, inAdresse) {
// Track Search-Items
TRACK_trackAction("id_gcxt_3", gFileName + " - open: " + inPLZ + " " + inAdresse);
// open full browser window
wP1 = 'http://map.search.ch/';
features = 'status=yes,scrollbars=yes,toolbar=yes,menubar=yes,location=yes,resizable=yes,width=950,height=500,top=0,left=20';
window.open(wP1 + inPLZ + '/' + inAdresse, '',features);
// window.open(wP1 + inP2, '');
}
function initGM3(inId1, inId2, inId3) {
if (inId3 == 'id_gcxt_9') {
gDemoProd = 'demo';
}
else {
gDemoProd = '';
}
}
function initMap() {
if (gHost != 'localhost') {
if (GBrowserIsCompatible()) {
gMap = new GMap2(document.getElementById("id_map"));
// centerMapLand('DE');
centerMapCH();
gMap.addControl(new GLargeMapControl());
gMap.addControl(new GMapTypeControl());
gMap.addControl(new GScaleControl());
gMap.addControl(new GOverviewMapControl());
if (gFileName == 'g_fon_gm.php') {
GEvent.addListener(gMap, "zoomend", drawLabelHotspot2 );
GEvent.addListener(gMap, "moveend", getBounds );
}
else {
GEvent.addListener(gMap, "zoomend", drawLabelHotspot2 );
GEvent.addListener(gMap, "moveend", drawLabelHotspot2 );
}
}
else {
alert("Browser is not compatible for Google Map");
}
}
else {
// centerMapLand('DE');
centerMapCH();
}
}
function unloadMap() {
if (gHost != 'localhost') {
GUnload();
}
}
function centerMapCH() {
if (gHost != 'localhost') {
if (gFileName == 'g_fon_gm_pf.php') {
gMap.setCenter(new GLatLng (gCenterInitLat, gCenterInitLon), 14, G_NORMAL_MAP);
}
else {
gMap.setCenter(new GLatLng (gCenterInitLat, gCenterInitLon), 14, G_HYBRID_MAP);
}
getBounds();
}
else {
alert("geht nicht, localhost");
}
}
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();
if (gFileName == 'g_fon_gm_pf.php') {
gMap.setCenter(new GLatLng (wObj.Lat.valueOf(), wObj.Lon.valueOf()), wZL, G_NORMAL_MAP);
}
else {
gMap.setCenter(new GLatLng (wObj.Lat.valueOf(), wObj.Lon.valueOf()), wZL, G_HYBRID_MAP);
}
}
}
else {
if (gHost != 'localhost') {
if (gFileName == 'g_fon_gm_pf.php') {
gMap.setCenter(new GLatLng (gCenterInitLat, gCenterInitLon), 6, G_NORMAL_MAP);
}
else {
gMap.setCenter(new GLatLng (gCenterInitLat, gCenterInitLon), 6, G_HYBRID_MAP);
}
}
}
getBounds();
}
function centerLocation(inLat, inLon) {
if (gHost != 'localhost') {
gMap.setCenter(new GLatLng(inLat, inLon), 13);
getBounds();
}
else {
alert("geht nicht, localhost");
}
}
function getBounds() {
if (gHost != 'localhost') {
wZL = gMap.getZoom();
// alert("ZL old: " + gZoomLevelOld + " ZL new: " + wZL);
if (gZoomLevelOld == 11 && wZL == 12) {
removeAllLabelHotspot();
}
if (gZoomLevelOld == 12 && wZL == 11) {
removeAllLabelHotspot();
}
if (gZoomLevelOld == 12 && wZL == 13) {
removeAllLabelHotspot();
}
if (gZoomLevelOld == 13 && wZL == 12) {
removeAllLabelHotspot();
}
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 ;
wLatw = convertLL(wLat);
wLonw = convertLL(wLon);
wKoordXY = convertToCH1903(wLatw, wLonw);
document.getElementById('id_1').innerHTML = "Center: " + wLatw + " / " + wLonw + " (" + wKoordXY + ")";
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 = 43.2266;
wMinX = 6.438;
wMaxY = 43.3142;
wMaxX = 6.6636;
}
// alert(gSearchLat + "/" + gSearchLon + " " + wMinY + "/" + wMinX + " - " + wMaxY + "/" + wMaxX);
}
doMapHotspot(wMinY, wMinX, wMaxY, wMaxX);
}
function convertLL(inLL) {
wDV = parseFloat(inLL);
wLL = inLL.toString();
wLLarray = wLL.split('.');
wGrad = parseFloat(wLLarray[0]);
wDV = wDV - wGrad;
wDV = wDV / 1.6666666666;
wDV = wDV * 100;
wDV = Math.round(wDV * 1000) / 1000;
wDVw = wDV.toString();
wLLarray = wDVw.split('.');
//alert("0: " + wLLarray[0] + " 1: " + wLLarray[1]);
if (wLLarray[1] == null) {
wDVw = wDVw + ".000";
}
else {
if (wLLarray[1].length == 1) {
wDVw = wDVw + "00";
}
if (wLLarray[1].length == 2) {
wDVw = wDVw + "0";
}
}
//alert ("wDVw: " + wDVw + " len: " + wDVw.length);
wOut = wGrad + " " + wDVw;
return wOut;
}
function convertToCH1903(inLat, inLon) {
var gradB = "";
var minuteB = "";
var gradL = "";
var minuteL = "";
wLatArray = inLat.split(' ');
gradB = wLatArray[0];
minuteB = wLatArray[1];
wLonArray = inLon.split(' ');
gradL = wLonArray[0];
minuteL = wLonArray[1];
p = (((gradB * 3600) + (minuteB * 60) ) - 169028.66) / 10000;
l = (((gradL * 3600) + (minuteL * 60) ) - 26782.5) / 10000;
swiss2 = 200147.07 + 308807.95 * p + 3745.25 * l * l + 76.63 * p * p + 119.79 * p * p * p - 194.56 * p * l *l;
swiss2 = Math.round(swiss2)
swiss1 = 600072.37 + 211455.93 * l - 10938.51 * l * p - 0.36 * l * p * p - 44.54 * l * l * l;
swiss1 = Math.round(swiss1)
swissmapsearch1=(swiss1-662000)/0.8
swissmapsearch2=-(swiss2-190000)/0.8
swissgrid = "Swissgrid: " + swiss1 + "/" + swiss2;
return swissgrid;
}
/*
// *************************************************************************************
// 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 PLZ (mit iframe)
// *************************************************************************************
*/
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);
}
}
else {
// alert(inPLZ + " " + inGemeindeName + " " + inLat + "/" + inLon);
}
getBounds();
}
/*
// *************************************************************************************
// Handle Settings
// *************************************************************************************
*/
function handleSettings(inSaveRecall, inPersonId, inFileName, inID) {
switch (inSaveRecall) {
case 'B':
// Beispiel
document.frmInput.chkHotspotsFON.checked = true;
document.frmInput.chkPreLoad.checked = false;
// Zoomlevel
wZL = 14;
wZL2 = parseInt(wZL);
// Basel
wLat = 47.5604;
wLon = 7.6044;
if (gHost != 'localhost') {
gMap.setCenter(new GLatLng (wLat, wLon), wZL2, G_NORMAL_MAP);
// gMap.setCenter(new GLatLng (wLat, wLon), wZL);
}
getBounds();
break;
}
}
/*
// *************************************************************************************
// 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;
}
/*
// *************************************************************************************
// Hotspot
// *************************************************************************************
*/
function drawLabelHotspot() {
// läuft im IE
// wV=document.frmInput.getElementById('chkHotspotsFON').checked;
// läuft im IE + Firefox!
wHotspotsFON=document.frmInput.chkHotspotsFON.checked;
wHotspotsDIV=document.frmInput.chkHotspotsDIV.checked;
if (wHotspotsFON == true || wHotspotsDIV == 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 = " ";
removeAllLabelHotspot();
}
if (wHotspotsFON == true || wHotspotsDIV == true) {
getBounds();
}
}
function drawLabelHotspot2() {
// läuft im IE
// wV=document.frmInput.getElementById('chkHotspotsFON').checked;
// läuft im IE + Firefox!
wHotspotsFON=document.frmInput.chkHotspotsFON.checked;
wHotspotsDIV=document.frmInput.chkHotspotsDIV.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 = " ";
removeAllLabelHotspot();
if (wHotspotsFON == true || wHotspotsDIV == true) {
getBounds();
}
}
function addLabelHotspot(inObj_hotspot, inIx) {
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';
// orange
var wBGcolorOrange = '#FF8040';
// rot dunkel
var wBGcolor2 = '#FF0000';
// alert ("Update: " + inObj_hotspot.hotspot_update);
switch (inObj_hotspot.hotspot_update) {
// LL
case 'L':
case 'LL':
wBGcolor = wBGcolorYellow;
wStar = "*";
break;
default:
wBGcolor = wBGcolorOrange;
wStar = "";
break;
}
if (document.frmInput.chkUpdate.checked != true) {
// wenn not checked: original lat/lon & orange!
wBGcolor = wBGcolorOrange;
}
if (inObj_hotspot.hotspot_provider == "Swisshotspots") {
wBGcolor = wBGcolorGreen;
}
if (gHost != 'localhost') {
wZL = gMap.getZoom();
}
else {
wZL = 13;
// Test!
}
if (inObj_hotspot.hotspot_provider == "Swisshotspots") {
wData = '(' + wStar + inObj_hotspot.hotspot_adresse + ')
' + inObj_hotspot.hotspot_namehs + '';
}
else {
wData = '(' + wStar + inObj_hotspot.hotspot_adresse + ')
' + inObj_hotspot.hotspot_plz + ' ' + inObj_hotspot.hotspot_ort + '';
}
var wContent = "";
wContent = '
';
if (wZL < 13) {
// wContent = '' + inObj_hotspot.hotspot_id + '
';
wContent = '';
}
if (wZL < 12) {
wContent = '';
// wContent = '';
}
// alert(wContent);
wLabelId = 'id_' + inObj_hotspot.hotspot_id;
if (gHost != 'localhost') {
var wLabel = new TLabel();
wLabel.id = wLabelId;
// alert("Orig: " + inObj_hotspot.hotspot_lon_ok + "/" + inObj_hotspot.hotspot_lat_ok + " OK: " + inObj_hotspot.hotspot_lon_ok + "/" + inObj_hotspot.hotspot_lat_ok);
if (document.frmInput.chkUpdate.checked == true || document.frmInput.chkHotspotsDIV.checked == true) {
wUseLat = inObj_hotspot.hotspot_lat_ok;
wUseLon = inObj_hotspot.hotspot_lon_ok;
wLabel.anchorLatLng = new GLatLng(wUseLat, wUseLon);
}
else {
wUseLat = inObj_hotspot.hotspot_lat;
wUseLon = inObj_hotspot.hotspot_lon;
wLabel.anchorLatLng = new GLatLng (wUseLat, wUseLon);
}
wLabel.anchorPoint = wAnchor;
wLabel.content = wContent;
wLabel.percentOpacity = 90;
wPoint = new GLatLng (wUseLat, wUseLon);
if (gHost != 'localhost') {
wMarker = createMarker(wPoint, inIx);
}
// Label auf map
if (gFileName == 'g_fon_gm.php') {
gMap.addTLabel(wLabel);
}
else {
if (gHost != 'localhost') {
gMap.addOverlay(wMarker);
}
}
}
// Label in Array sicherstellen
gHotspotArrayLabel.push(wLabel);
if (gHost != 'localhost') {
gHotspotArrayMarker.push(wMarker);
}
gHotspotArrayHotspot.push(inObj_hotspot);
return;
}
function createMarker(inPoint, inNumber) {
if (gHost != 'localhost') {
// Create a base icon for all of our markers that specifies the
// shadow, icon dimensions, etc.
var gBaseIcon = new GIcon();
//gBaseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
gBaseIcon.iconSize = new GSize(20, 34);
//gBaseIcon.shadowSize = new GSize(37, 34);
gBaseIcon.iconAnchor = new GPoint(9, 34);
gBaseIcon.infoWindowAnchor = new GPoint(9, 2);
//wBaseIcon.infoShadowAnchor = new GPoint(18, 25);
}
wNumber = inNumber + 1;
var wIcon = new GIcon(gBaseIcon);
wIcon.image = "http://www.geocodezip.com/mapIcons/marker" + wNumber + ".png";
var wMarker = new GMarker(inPoint, wIcon);
return wMarker;
}
function removeAllLabelHotspot() {
if (gHost != 'localhost') {
if (gFileName == 'g_fon_gm.php') {
for (i=0; i < gHotspotArrayLabel.length; ++i) {
wLabel = gHotspotArrayLabel[i];
gMap.removeTLabel(wLabel);
}
}
else {
gMap.clearOverlays();
}
}
// Array löschen
gHotspotArrayLabel = new Array();
gHotspotArrayMarker = new Array();
gHotspotArrayHotspot = new Array();
return;
}
function removeLabelHotspot(inLabel) {
if (gHost != 'localhost') {
gMap.removeTLabel(inLabel);
}
return;
}
function removeMarkerHotspot(inMarker) {
if (gHost != 'localhost') {
gMap.removeOverlay(inMarker);
}
return;
}
function doMapHotspot(inLatMin, inLonMin, inLatMax, inLonMax)
{
// alert ("LatMin: " + inLatMin + " LonMin: " + inLonMin + "LatMax: " + inLatMax + " LonMax: " + inLonMax);
wZL = 0;
if (gHost != 'localhost') {
wZL = gMap.getZoom();
if (wZL < 11) {
return;
}
}
else {
// Default Zoom-Level
wZL = 14;
}
wHotspotsFON=document.frmInput.chkHotspotsFON.checked;
wHotspotsDIV=document.frmInput.chkHotspotsDIV.checked;
if (wHotspotsFON == true && wHotspotsDIV == true) {
wHotspot = "";
}
else {
if (wHotspotsFON == true) {
wHotspot = "FON";
}
if (wHotspotsDIV == true) {
wHotspot = "Swisshotspots";
}
}
// document.getElementById('id_status').innerHTML = "loading Hotspots ...";
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;
}
HOTSPOT_getHotspotRange("id_gcxt_1", "handleHotspotsRemote", inLatMin, inLonMin, inLatMax, inLonMax, wHotspot);
}
function handleHotspotsRemote(inHotspotArray)
{
// Listbox referenzieren
var w_lstResultC = document.forms[0].lstResultC;
// Listbox löschen
w_lstResultC.options.length = 0;
wI = 0;
wHotspotArrayNew = new Array();
wLen = inHotspotArray.length;
// alert ("wLen: " + wLen);
if (wLen > 0) {
inHotspotArray.sort(compareEntries);
}
if (gFileName == 'g_fon_gm_pf.php') {
wNrCount = 0;
var w_id_resultC = document.getElementById('id_resultC');;
// Listbox löschen
w_id_resultC.innerHTML = "";
wOut = "";
wOut = wOut + "";
wOut = wOut + "";
wOut = wOut + "";
wOut = wOut + "| Nr | ";
wOut = wOut + "Land | ";
wOut = wOut + "Adresse | ";
wOut = wOut + "PLZ | ";
wOut = wOut + "Ort | ";
wOut = wOut + "Dist km | ";
wOut = wOut + "Dir | ";
wOut = wOut + "ISP | ";
wOut = wOut + "
";
wOut = wOut + "";
}
for (var j=0; j < wLen; j++) {
wHobj = inHotspotArray[j];
// alert ("Id: " + wHobj.Id);
// Id
wId = wHobj.Id;
// Land
wLand = wHobj.Land;
// NameHS
wNameHS= wHobj.NameHS;
// PLZ
wPLZ = wHobj.PLZ;
// Ort
wOrt = wHobj.Ort;
// Adresse
wAdresse = wHobj.Adresse;
// Lat
wLat = wHobj.Lat;
// Lon
wLon = wHobj.Lon;
// Lat_OK
wLat_OK = wHobj.Lat_OK;
// Lon_OK
wLon_OK = wHobj.Lon_OK;
// Dist
wDist = wHobj.Dist;
// Dir
wDir = wHobj.Dir;
// Update
wUpdate = wHobj.Update;
// Provider
wProvider = wHobj.Provider;
// SSID
wSSID = wHobj.SSID;
// if (wId == 73) {
// alert("Id: " + wId + wOrt + " Update: " + wUpdate);
// }
wHobj = new objHotspot(wId, wLand, wNameHS, wPLZ, wOrt, wAdresse, wLat, wLon, wLat_OK, wLon_OK, wDist, wDir, wUpdate, wProvider, wSSID);
// Hotspot in Array sicherstellen
wHotspotArrayNew.push(wHobj);
// Values in Listbox lstResult abfüllen
wI = j + 1;
// wHotspot = wI + " - " + wId + " " + wPLZ + " " + wOrt + " " + wAdresse + " (" + wDist + "km " + wDir + ")";
wHotspot = wI + " - " + wLand + "-" + wPLZ + " " + wOrt + " " + wAdresse + " (" + wDist + "km " + wDir + ")";
wData = "C;" + wId + ";" + wLand + ";" + wDist + ";" + wDir + ";" + wLat + ";" + wLon;
// alert("Hotspot: " + wHotspot + " " + wData);
w_lstResultC.options[j] = new Option(wHotspot,wData);
if (gFileName == 'g_fon_gm_pf.php') {
wP = " ";
if (wProvider == "FON") {
wP = "FON";
}
wNrCount++;
wOut = wOut + "";
wOut = wOut + "| " + wNrCount + " | ";
wOut = wOut + "" + wLand + " | ";
wOut = wOut + "" + wAdresse + " | ";
wOut = wOut + "" + wPLZ + " | ";
wOut = wOut + "" + wOrt + " | ";
wOut = wOut + "" + wDist + " | ";
wOut = wOut + " | ";
wOut = wOut + "" + wP + " | ";
wOut = wOut + "
";
}
}
if (gFileName == 'g_fon_gm_pf.php') {
wOut = wOut + "
";
w_id_resultC.innerHTML = w_id_resultC.innerHTML + wOut;
// alert (w_id_resultC.innerHTML);
}
// if (wLen == 1) {
// w_lstResultC.disabled = true;
// }
// else {
w_lstResultC.disabled = false;
// }
updateMapHotspot(wHotspotArrayNew);
}
function compareEntries(inA, inB) {
if (inA.Dist < inB.Dist)
return -1;
if (inA.Dist > inB.Dist)
return 1;
// a must be equal to b
return 0;
}
/*
function handleHotspots()
{
wHotspotArrayNew = new Array();
wLen = gHOTSPOT_WpIdR.length;
// alert ("wLen: " + wLen);
for (var j=0; j < wLen; j++) {
// WpId
wWpId = gHOTSPOT_WpIdR[j];
// CacheName
wCachename = gHOTSPOT_CacheNameR[j];
// Cache_lat
wKoordwplat = gHOTSPOT_KoordWPlatR[j];
// Cache_lon
wKoordwplon = gHOTSPOT_KoordWPlonR[j];
// VersteckDatum
wVD = gHOTSPOT_Versteck_DatumR[j];
// Status
wStatus = gHOTSPOT_StatusR[j];
wHobj = new objHotspot(wWpId, wCachename, wCacheType, wKoordwplat, wKoordwplon, wVD, wStatus);
// Cache in Array sicherstellen
wHotspotArrayNew.push(wHobj);
}
updateMapHotspot(wHotspotArrayNew);
}
*/
function updateMapHotspot(inHotspotArrayNew)
{
// Arrays alt sicherstellen
wHotspotArrayOld = gHotspotArrayHotspot;
wHotspotArrayLabelOld = gHotspotArrayLabel;
wHotspotArrayMarkerOld = gHotspotArrayMarker;
// Arrays alt löschen
gHotspotArrayHotspot = new Array();
gHotspotArrayLabel = new Array();
gHotspotArrayMarker = new Array();
// Anzahl Einträge
wLenN = inHotspotArrayNew.length;
wLenO = wHotspotArrayOld.length;
// Vergleiche Arrays neu / alt
for (i=0; i < wLenN; ++i) {
wHotspot_idN = inHotspotArrayNew[i].hotspot_id;
wFound = "";
for (j=0; j < wLenO; ++j) {
wHotspot_idO = wHotspotArrayOld[j].hotspot_id;
if (wHotspot_idN == wHotspot_idO) {
wFound = "y";
// Label in Array sicherstellen
gHotspotArrayLabel.push(wHotspotArrayLabelOld[j]);
gHotspotArrayMarker.push(wHotspotArrayMarkerOld[j]);
gHotspotArrayHotspot.push(wHotspotArrayOld[j]);
j = wLenO;
// alert("keep: " + wHotspot_idN);
}
}
if (wFound == "") {
// add Hotspot
wHobj = inHotspotArrayNew[i];
addLabelHotspot(wHobj, i);
}
}
// Vergleiche Arrays alt / neu
for (i=0; i < wLenO; ++i) {
wHotspot_idO = wHotspotArrayOld[i].hotspot_id;
wFound = "";
for (j=0; j < wLenN; ++j) {
wHotspot_idN = inHotspotArrayNew[j].hotspot_id;
if (wHotspot_idO == wHotspot_idN) {
wFound = "y";
j = wLenN;
// alert("keep: " + wHotspot_idO);
}
}
if (wFound == "") {
if (gFileName == 'g_fon_gm.php') {
// remove Label Hotspot
wLabel = wHotspotArrayLabelOld[i];
removeLabelHotspot(wLabel);
}
else {
// remove Marker Hotspot
wMarker = wHotspotArrayMarkerOld[i];
removeMarkerHotspot(wMarker);
}
}
}
wLA = gHotspotArrayHotspot.length;
// wLL = gHotspotArrayLabel.length;
document.getElementById('id_rows_caches').innerHTML = "(" + wLA + ") ";
if (gHost != 'localhost') {
wZL = gMap.getZoom();
}
else {
wZL = "n/a";
}
// document.getElementById('id_zl').innerHTML = "Zoomlevel: " + wZL;
// document.getElementById('id_status').innerHTML = "Hotspots loaded";
wDebug = '';
if (wDebug == 'y') {
wString = "";
wLen = wHotspotArrayOld.length;
for (i=0; i < wLen; ++i) {
wHotspot_id = wHotspotArrayOld[i].hotspot_id;
wHotspot_plz = wHotspotArrayOld[i].hotspot_plz;
wString = wString + wHotspot_id + " " + wHotspot_plz + "\n";
}
alert("Alte Hotspots " + wLen + "\n\n" + wString);
}
wDebug = '';
if (wDebug == 'y') {
wString = "";
wLen = inHotspotArrayNew.length;
for (i=0; i < wLen; ++i) {
wHotspot_id = inHotspotArrayNew[i].hotspot_id;
wHotspot_plz = inHotspotArrayNew[i].hotspot_land;
wString = wString + wHotspot_id + " " + wHotspot_plz + "\n";
}
alert("Neue Hotspots Input: " + wLen + "\n\n" + wString);
}
wDebug = '';
if (wDebug == 'y') {
wString = "";
wLen = gHotspotArrayHotspot.length;
for (i=0; i < wLen; ++i) {
wHotspot_id = gHotspotArrayHotspot[i].hotspot_id;
wHotspot_plz = gHotspotArrayHotspot[i].hotspot_land;
wString = wString + wHotspot_id + " " + wHotspot_plz + "\n";
}
alert("Neue HotspotS Array: " + wLen + "\n\n" + wString);
}
}
/*
// *************************************************************************************
// eigene Objekte
// *************************************************************************************
*/
function objHotspot(in_hotspot_id, in_hotspot_land, in_hotspot_namehs, in_hotspot_plz, in_hotspot_ort, in_hotspot_adresse, in_hotspot_lat, in_hotspot_lon, in_hotspot_lat_ok, in_hotspot_lon_ok, in_hotspot_dist, in_hotspot_dir, in_hotspot_update, in_hotspot_provider, in_hotspot_ssid) {
this.hotspot_id = in_hotspot_id;
this.hotspot_land = in_hotspot_land;
this.hotspot_namehs = in_hotspot_namehs;
this.hotspot_plz = in_hotspot_plz;
this.hotspot_ort = in_hotspot_ort;
this.hotspot_adresse = in_hotspot_adresse;
this.hotspot_lat = in_hotspot_lat;
this.hotspot_lon = in_hotspot_lon;
this.hotspot_lat_ok = in_hotspot_lat_ok;
this.hotspot_lon_ok = in_hotspot_lon_ok;
this.hotspot_dist = in_hotspot_dist;
this.hotspot_dir = in_hotspot_dir;
this.hotspot_update = in_hotspot_update;
this.hotspot_provider = in_hotspot_provider;
this.hotspot_ssid = in_hotspot_ssid;
}
/*
// *************************************************************************************
// Code für Tests
// *************************************************************************************
*/
function dumpArrayC() {
wString = "";
wLen = gHotspotArrayHotspot.length;
for (i=0; i < wLen; ++i) {
wId = gHotspotArrayHotspot[i].hotspot_id;
wC_land = gHotspotArrayHotspot[i].hotspot_land;
wC_plz = gHotspotArrayHotspot[i].hotspot_plz;
wC_ort = gHotspotArrayHotspot[i].hotspot_ort;
wC_adresse = gHotspotArrayHotspot[i].hotspot_adresse;
wC_dist = gHotspotArrayHotspot[i].hotspot_dist;
wC_dir = gHotspotArrayHotspot[i].hotspot_dir;
wC_update = gHotspotArrayHotspot[i].hotspot_update;
wString = wString + wId + " " + wC_plz + " " + wC_ort + " " + wC_adresse + " " + wC_dist + " " + wC_dir + " " + wC_update + "\n";
}
alert("Hotspot Array: " + wLen + "\n\n" + wString);
}
function dumpArrayCL() {
if (gHost != 'localhost') {
wString = "";
wLen = gHotspotArrayLabel.length;
for (i=0; i < wLen; ++i) {
wId = gHotspotArrayLabel[i].id;
wString = wString + wId + "\n";
}
alert("Hotspot Array Label: " + wLen + "\n\n" + wString);
}
else {
alert("geht nicht, localhost!");
}
}
/*
// *************************************************************************************
// Search
// *************************************************************************************
*/
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_gcxt_3", gFileName + " - Search: " + gSearch);
if (gSearch.length == 2) {
// Search Kantonshauptort
wObj = KT_searchKT(gSearch);
if (wObj != null) {
wOutput = "Suche nach Kanton, gefunden: " + wObj.KT + " - " + wObj.Ort + " [" + wObj.Lat + " / " + wObj.Lon + "]";
document.getElementById('id_status').innerHTML = wOutput;
// Lat Lon save
gSearchLat = wObj.Lat;
gSearchLon = wObj.Lon;
handlePLZ2("","", wObj.KT, wObj.Lat, wObj.Lon);
return;
}
// else {
// alert ("KT not found");
// }
}
if (IsNumeric(gSearch) == true) {
// Search PLZ
if (gSearch.length == 4){
PLZ_getPLZRemote("id_gcxt_1", "PLZ_handleGetPLZ", "CH", gSearch);
return;
}
else {
alert ("PLZ muss 4 Stellen lang sein!");
return;
}
}
wW = gSearch.substr(0,2);
wS = gSearch.substr(2);
switch (wW) {
default:
wW = gSearch.substr(0,3);
wS = gSearch.substr(3);
switch (wW) {
case 'll=':
case 'LL=':
wLL = wS.split("/");
wLat = wLL[0];
wLon = wLL[1];
wOutput = "Suche nach Latitude/Longitude: " + wLat + " / " + wLon;
document.getElementById('id_status').innerHTML = wOutput;
handlePLZ2("","", "", wLat, wLon);
break;
default:
// PLZ_getOrtRemote("id_gcxt_1", "handleGetOrt", gSearch);
PLZ_listGemeindeRemote("id_gcxt_1", "PLZ_handleListOrt", "CH", gSearch);
}
}
}
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_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 + ")";
wOrt = wI + " - " + 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 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 handleGetOrt2(inElem) {
wEntry = inElem.split(";");
wType = wEntry[0];
if (wType == "O") {
wINSEE = wEntry[1];
wPLZ = wEntry[2];
wOrt = wEntry[3];
wDepName = wEntry[4];
wLatitude = wEntry[5];
wLongitude = wEntry[6];
wAltitude = wEntry[7];
// Lat Lon save
gSearchLat = wLatitude;
gSearchLon = wLongitude;
// Track Search-Items
TRACK_trackAction("id_gcxt_2", gFileName + " - Positionierung Ort: " + wPLZ + " - " + wOrt);
wOutput = "Suche nach Ort, gefunden: " + wPLZ + " - " + wOrt + " " + " (" + wDepName + ") [" + wLatitude + " / " + wLongitude + "] ";
document.getElementById('id_status').innerHTML = wOutput;
handlePLZ2(wPLZ, "", wOrt, wLatitude, wLongitude);
}
else {
wId = wEntry[1];
wLand = wEntry[2];
wDist = wEntry[3];
wDir = wEntry[4];
wLatitude = wEntry[5];
wLongitude = wEntry[6];
// Lat Lon save
gSearchLat = wLatitude;
gSearchLon = wLongitude;
// Track Search-Items
TRACK_trackAction("id_gcxt_2", gFileName + " - Positionierung Id: " + wId + " " + wPLZ + " - " + wOrt);
wOutput = "Positioniert auf Id: " + wId + " [" + wLatitude + " / " + wLongitude + "]";
document.getElementById('id_status').innerHTML = wOutput;
handlePLZ2("", wId, wLand, 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 handleListOrt(inPLZArray)
{
// Listbox referenzieren
var w_lstResult = document.forms[0].lstResult;
wLen = inPLZArray.length;
// document.getElementById('id_entries').innerHTML = wLen;
// alert ("wLen: " + wLen);
if (wLen == 0) {
alert("Ort: " + gSearch + " nicht gefunden");
wOutput = "Suche nach Ort, nicht gefunden ";
document.getElementById('id_status').innerHTML = wOutput;
return;
}
for (var j=0; j < wLen; j++) {
wObj = inPLZArray[j];
// alert ("INSEE: " + wHobj.INSEE);
// Values in Listbox lstResult abfüllen
wI = j + 1;
wOrt = wI + " - " + wObj.Ort + " (" + wObj.DepName + ")";
wData = "O;" + wObj.INSEE + ";" + wObj.PLZ + ";" + wObj.Ort + ";" + wObj.DepName + ";" + wObj.Latitude + ";" + wObj.Longitude + ";" + wObj.Altitude;
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 CACHE_handleGetCacheByWpIdRemote(inObj) {
if (inObj.WpId == null) {
alert("WpId: " + gSearch + " nicht gefunden");
}
else {
wOutput = "Suche nach WpId, gefunden: " + inObj.WpId + " - " + inObj.CacheName + " [" + inObj.Latitude + " / " + inObj.Longitude + "]";
document.getElementById('id_status').innerHTML = wOutput;
handlePLZ2(inObj.WpId, '', inObj.CacheName, inObj.Latitude, inObj.Longitude);
}
}
function CACHE_handleGetCacheByNameRemote(inObj) {
if (inObj.WpId == null) {
alert("CacheName: " + gSearch + " nicht gefunden");
}
else {
wOutput = "Suche nach CacheName, gefunden: " + inObj.WpId + " - " + inObj.CacheName + " [" + inObj.Latitude + " / " + inObj.Longitude + "]";
document.getElementById('id_status').innerHTML = wOutput;
handlePLZ2(inObj.WpId, '', inObj.CacheName, inObj.Latitude, inObj.Longitude);
}
}
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
gKT_kt = new Array();
gKZ_ort = new Array();
gKT_lat = new Array();
gKT_lon = new Array();
gKT_loaded = 'n';
/*
// *************************************************************************************
// eigene Objekte für
// *************************************************************************************
*/
function objKT(in_KT, in_Ort, in_Lat, in_Lon) {
this.KT = in_KT;
this.Ort = in_Ort;
this.Lat = in_Lat;
this.Lon = in_Lon;
}
/*
// *************************************************************************************
// KT_Load: interne Tabelle laden
// *************************************************************************************
*/
function KT_load() {
gKT_loaded = 'y';
i=0;
gKT_kt[i] = "CH";
gKZ_ort[i] = "CH";
gKT_lat[i] = "46.801216"
gKT_lon[i] = "8.2267";
i++;
gKT_kt[i] = "AG";
gKZ_ort[i] = "Aarau";
gKT_lat[i] = "47.3888";
gKT_lon[i] = "8.0483";
i++;
gKT_kt[i] = "AI";
gKZ_ort[i] = "Herisau";
gKT_lat[i] = "47.3366";
gKT_lon[i] = "9.4126";
i++;
gKT_kt[i] = "AR";
gKZ_ort[i] = "Appenzell";
gKT_lat[i] = "47.3829";
gKT_lon[i] = "9.2741";
i++;
gKT_kt[i] = "BE";
gKZ_ort[i] = "Bern";
gKT_lat[i] = "46.9476";
gKT_lon[i] = "7.4065";
i++;
gKT_kt[i] = "BL";
gKZ_ort[i] = "Liestal";
gKT_lat[i] = "47.4854";
gKT_lon[i] = "7.7257";
i++;
gKT_kt[i] = "BS";
gKZ_ort[i] = "Basel";
gKT_lat[i] = "47.5577";
gKT_lon[i] = "7.5936";
i++;
gKT_kt[i] = "FR";
gKZ_ort[i] = "Fribourg";
gKT_lat[i] = "46.8042";
gKT_lon[i] = "7.1597";
i++;
gKT_kt[i] = "GE";
gKZ_ort[i] = "Genève";
gKT_lat[i] = "46.2058";
gKT_lon[i] = "6.1416";
i++;
gKT_kt[i] = "GL";
gKZ_ort[i] = "Glarus";
gKT_lat[i] = "47.021";
gKT_lon[i] = "8.979";
i++;
gKT_kt[i] = "GR";
gKZ_ort[i] = "Chur";
gKT_lat[i] = "46.8521";
gKT_lon[i] = "9.5296";
i++;
gKT_kt[i] = "JU";
gKZ_ort[i] = "Delémont";
gKT_lat[i] = "47.3751";
gKT_lon[i] = "7.3329";
i++;
gKT_kt[i] = "LU";
gKZ_ort[i] = "Luzern";
gKT_lat[i] = "47.0471";
gKT_lon[i] = "8.3252";
i++;
gKT_kt[i] = "NE";
gKZ_ort[i] = "Neuchâtel";
gKT_lat[i] = "47.0094";
gKT_lon[i] = "6.9381";
i++;
gKT_kt[i] = "NW";
gKZ_ort[i] = "Stans";
gKT_lat[i] = "46.9589";
gKT_lon[i] = "8.3633";
i++;
gKT_kt[i] = "OW";
gKZ_ort[i] = "Sarnen";
gKT_lat[i] = "46.8984";
gKT_lon[i] = "8.1765";
i++;
gKT_kt[i] = "SG";
gKZ_ort[i] = "St. Gallen";
gKT_lat[i] = "47.4221";
gKT_lon[i] = "9.3756";
i++;
gKT_kt[i] = "SH";
gKZ_ort[i] = "Schaffhausen";
gKT_lat[i] = "47.7157";
gKT_lon[i] = "8.6411";
i++;
gKT_kt[i] = "SO";
gKZ_ort[i] = "Solothurn";
gKT_lat[i] = "47.2084";
gKT_lon[i] = "7.5301";
i++;
gKT_kt[i] = "SZ";
gKZ_ort[i] = "Schwyz";
gKT_lat[i] = "47.0234";
gKT_lon[i] = "8.6746";
i++;
gKT_kt[i] = "TG";
gKZ_ort[i] = "Frauenfeld";
gKT_lat[i] = "47.558";
gKT_lon[i] = "8.8964";
i++;
gKT_kt[i] = "TI";
gKZ_ort[i] = "Bellinzona";
gKT_lat[i] = "46.1999";
gKT_lon[i] = "9.0225";
i++;
gKT_kt[i] = "UR";
gKZ_ort[i] = "Altdorf";
gKT_lat[i] = "46.8883";
gKT_lon[i] = "8.6409";
i++;
gKT_kt[i] = "VD";
gKZ_ort[i] = "Lausanne";
gKT_lat[i] = "46.552";
gKT_lon[i] = "6.6523";
i++;
gKT_kt[i] = "VS";
gKZ_ort[i] = "Sion";
gKT_lat[i] = "46.2304";
gKT_lon[i] = "7.366";
i++;
gKT_kt[i] = "ZG";
gKZ_ort[i] = "Zug";
gKT_lat[i] = "47.15";
gKT_lon[i] = "8.5232";
i++;
gKT_kt[i] = "ZH"
gKZ_ort[i] = "Zürich";
gKT_lat[i] = "47.3828";
gKT_lon[i] = "8.5307";
i++;
gKT_kt[i] = "FL"
gKZ_ort[i] = "Vaduz";
gKT_lat[i] = "47.1333";
gKT_lon[i] = "9.51667";
}
/*
// *************************************************************************************
// KT_searchKT: search in interner Tabelle
// *************************************************************************************
*/
function KT_searchKT(inKT) {
if (gKT_loaded == "n") {
KT_load();
}
i = 0;
j = -1;
wLen = gKT_kt.length;
wKT = inKT.toUpperCase();
while (i < wLen) {
if (gKT_kt[i] == wKT) {
j=i;
break;
}
i++;
}
if (j > -1) {
wObj = new objKT(gKT_kt[j], gKZ_ort[i], gKT_lat[j], gKT_lon[j]);
return wObj;
}
else {
// alert("NOT Found: " + inKT);
return null;
}
}
/*
// *************************************************************************************
// 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;
// alert(wURI);
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;
}
/*
// *************************************************************************************
// HOTSPOT_getHotspotByWpIdRemote: Remote über Iframe
// *************************************************************************************
*/
/*
function HOTSPOT_getHotspotByWpIdRemote(inId, inCallBack, inId) {
wURI = "m_hs_ajax.php?fAct=get_hotspot_by_wpid_text&cb=" + inCallBack + "&id=" + inId;
document.getElementById(inId).src=wURI;
}
*/
/*
// *************************************************************************************
// HOTSPOT_getHotspotRange: Remote über Iframe
// *************************************************************************************
*/
function HOTSPOT_getHotspotRange(inId, inCallBack, inMinLat,inMinLon,inMaxLat,inMaxLon,inProvider) {
var wDate= new Date();
wSec = wDate.getSeconds();
wMS = wDate.getMilliseconds();
wTS = wSec * wMS;
wURI = "m_hs_ajax.php?fAct=get_hotspot_by_range_text&cb=" + inCallBack + "×tamp=" + wTS + "&minlat=" + inMinLat + " &minlon=" + inMinLon + "&maxlat=" + inMaxLat + "&maxlon=" + inMaxLon + "&provider=" + inProvider;
// alert(wURI);
document.getElementById(inId).src=wURI;
}
/*
// *************************************************************************************
// HOTSPOT_getHotspotNotGeocoded: Remote über Iframe
// *************************************************************************************
*/
function HOTSPOT_getHotspotNotGeocoded(inId, inCallBack, inProvider) {
var wDate= new Date();
wSec = wDate.getSeconds();
wMS = wDate.getMilliseconds();
wTS = wSec * wMS;
wURI = "m_hs_ajax.php?fAct=get_hotspot_not_geocoded&cb=" + inCallBack + "×tamp=" + wTS + "&provider=" + inProvider;
// alert(wURI);
document.getElementById(inId).src=wURI;
}
/*
// *************************************************************************************
// HOTSPOT_updateHotspot: Iframe
// *************************************************************************************
*/
function HOTSPOT_updateHotspot(inId, inCallBack, inHSId, inLand_OK, inPLZ_OK, inOrt_OK, inAdresse_OK, inLat_OK, inLon_OK) {
var wDate= new Date();
wSec = wDate.getSeconds();
wMS = wDate.getMilliseconds();
wTS = wSec * wMS;
wURI = "m_hs_ajax.php?fAct=update_hotspot&cb=" + inCallBack + "×tamp=" + wTS + "&id=" + inHSId + "&land_ok=" + inLand_OK + " &plz_ok=" + inPLZ_OK + "&ort_ok=" + inOrt_OK + "&adresse_ok=" + inAdresse_OK + "&lat_ok=" + inLat_OK + "&lon_ok=" + inLon_OK;
// alert(wURI);
document.getElementById(inId).src=wURI;
}
/*
// *************************************************************************************
// TRACK_writeEntry: Remote über Iframe kein Callback!
// *************************************************************************************
*/
function TRACK_trackAction(inId, inTrackstring) {
wURI = "m_hs_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);
//}