/**
* MapExtension for Wordpress
* Version 0.7
* Date 10.1.2007
* Copyright Exinit GmbH & Co KG
* Author Felix Gebhard
*/
/******************************************************************
_1aa4c2124a8e8fbf7f376e4087633fb9
*/
/*
_5c3bd1022a76e1657990d60c4d73d4f4
*/
function addOnDocumentLoaded(functionname) {
if (window.addEventListener)
window.addEventListener("load", functionname, false);
else if (window.attachEvent) window.attachEvent("onload", functionname);
else window.onload = functionname;
}
/******************************************************************
_ab9a3eb7f7b0d790e7299f38fdff6185
*/
var _99d02248a97ce2ff2157009f65f6d59e;
var map;
var _ca3568de240f6067d8284329449b6b04;
var _9ac54a8a5cd354bb869952d2e5f1f4e7;
var _440984a3bb8bd5dfeb44572d47891b47;
var _d2922e288ade3c19153a49b16c493886;
var _760fb0c4e59b7758d30ab756f6d37566;
var _cd69403a0fa3ffa0f5e46cb5486fbad6;
var more_cd69403a0fa3ffa0f5e46cb5486fbad6;
var _90da17ec7010e49f6a7f947bf31a3d7f;
var _b62366ab25acbed849ce517aba22fff9;
var _a46253462dd6ce2936bbb71b42d4ce36;
var _e6f3d4339699d1cc3f6b84a070c87554;
var _f48b12c32d2d9b053ba0e5e4ab67a88e = new Array();
var _48541a66f2963d9b76e897c46d35cd86;
var _5cd66cbc8c3e832cb388cceb0a61729e = true;
var route = new Array();
var _6c299a67fbfc86a77097347c802852f8 = new Array();
var _a326ea715bf91510780ead7b0c59a318 = new Array();
var _3d5518d299464376177d58feac3610b1 = new Array();
var _522fda37a0a945eec4691f8453fd8217;
var _9d399a008fa3cb91886adf7aebc76dc0;
var _96102a1a5145feb27dc50adc2ab2aae7;
var _7e10804cffad7a7c0b59524e71e6d764;
var _f02d12182a53063e70c15d37cfa2e300;
var _7c2699b46f85dc5ad8a56cf8f5bf3ddf;
var _37169795db31b672966153e7211a58e4;
var _4031e605aa31ea4bdec6f685247e9c66;
var _97a32ab870cadad2c6df57b779ee19ff;
var _d6a30f85daf15fc8e7155ad221dc4713;
var defaultZoom = 5;
var defaultLat = 57;
var defaultLng = 20;
/* MaxView: */
var _5c0c7117012cab75c3ae26d86e7b5278 = 66;
var _aa7fb224c937deb81faa641ef8b2d5bd = 1;
var _5f593bf92ec499a625a82e64c0735d1d = 48;
var _b097ca362ea06539119b10995e7e744c = 40;
var _3e845dcf9b9ab19d2a0eca8e43117c64;
function _67786b564b712df2bc48196657c50fee() {
GOverlay.call(this);
}
_67786b564b712df2bc48196657c50fee.prototype = {
initialize : function(map) {
this._99d02248a97ce2ff2157009f65f6d59e = map.getPane(G_MAP_FLOAT_PANE);
},
setMarker : function (aMarker) {
this.myMarker = aMarker;
},
setContent : function (aContent) {
this.myContent = aContent;
},
redraw : function() {
if (!this.drawn) {
this.myinfo = document.createElement('div');
this.myinfo.id = 'infobox';
var _4eb5d56a4d15b68c906b0c78e85c4e2a = 400; /* same as in styles.css for infobox! */
var _904c44e61e1e7993986862cce4f474aa = 200; /* same as in styles.css for infobox! */
_a26b8b7cc85ced61a2c9251f712ff266 = map.fromLatLngToDivPixel(this.myMarker.getPoint());
_2f410551098a122794414269fac662e7 = map.fromLatLngToDivPixel(map.getCenter());
var leftCorrecture = _4eb5d56a4d15b68c906b0c78e85c4e2a+_a26b8b7cc85ced61a2c9251f712ff266.x-_2f410551098a122794414269fac662e7.x+_b208fde888ca7760765250b1cba99a95()-map.getSize().width;
if ((leftCorrecture>0) && (editMode)) {
this.myinfo.style.left = _a26b8b7cc85ced61a2c9251f712ff266.x+20-leftCorrecture-_2f410551098a122794414269fac662e7.x+_b208fde888ca7760765250b1cba99a95()+'px';
}
else {
this.myinfo.style.left = _a26b8b7cc85ced61a2c9251f712ff266.x+20-_2f410551098a122794414269fac662e7.x+_b208fde888ca7760765250b1cba99a95()+'px';
}
var topCorrecture = _904c44e61e1e7993986862cce4f474aa+_a26b8b7cc85ced61a2c9251f712ff266.y-_2f410551098a122794414269fac662e7.y+_620d530479ee149a659fb3cb322a900b()-map.getSize().height;
if ((topCorrecture>0) && (editMode)) {
this.myinfo.style.top = _a26b8b7cc85ced61a2c9251f712ff266.y+20-topCorrecture-_2f410551098a122794414269fac662e7.y+_620d530479ee149a659fb3cb322a900b()+'px';
}
else {
this.myinfo.style.top = _a26b8b7cc85ced61a2c9251f712ff266.y+20-_2f410551098a122794414269fac662e7.y+_620d530479ee149a659fb3cb322a900b()+'px';
}
this.myinfo.innerHTML = this.myContent;
$('mapcontainer').appendChild(this.myinfo);
if (this.myinfo.addEventListener) {
this.myinfo.addEventListener('mouseover', function () {
if (_48541a66f2963d9b76e897c46d35cd86!=null) clearTimeout(_48541a66f2963d9b76e897c46d35cd86);
}, false);
}
else {
this.myinfo.attachEvent('onmouseover', function () {
if (_48541a66f2963d9b76e897c46d35cd86!=null) clearTimeout(_48541a66f2963d9b76e897c46d35cd86);
});
}
if (this.myinfo.addEventListener) {
this.myinfo.addEventListener('mouseout', function () {
if (_48541a66f2963d9b76e897c46d35cd86!=null) clearTimeout(_48541a66f2963d9b76e897c46d35cd86);
_48541a66f2963d9b76e897c46d35cd86 = setTimeout(function() {
map.removeOverlay(my_67786b564b712df2bc48196657c50fee);
},1000);
}, false);
}
else {
this.myinfo.attachEvent('onmouseout', function () {
if (_48541a66f2963d9b76e897c46d35cd86!=null) clearTimeout(_48541a66f2963d9b76e897c46d35cd86);
_48541a66f2963d9b76e897c46d35cd86 = setTimeout(function() {
map.removeOverlay(my_67786b564b712df2bc48196657c50fee);
},1000);
});
}
this.drawn = true;
}
},
remove : function() {
$('mapcontainer').removeChild(this.myinfo);
this.drawn = false;
}
}
function _d9c5e071e2ee777825e3653163ac7925() {
GOverlay.call(this);
}
_d9c5e071e2ee777825e3653163ac7925.prototype = {
initialize : function(map) {
this._99d02248a97ce2ff2157009f65f6d59e = map.getPane(G_MAP_FLOAT_PANE);
},
redraw : function() {
if (!this.drawn) {
GEvent.clearListeners(map, "click");
map.disableDragging();
map.disableInfoWindow();
this.mywaitbox = document.createElement('div');
this.mywaitbox.id = 'waitbox';
if (editMode) this.myContent = "
";
else this.myContent = "
";
this.mywaitbox.style.top = _620d530479ee149a659fb3cb322a900b()-17+'px';
this.mywaitbox.style.left = _b208fde888ca7760765250b1cba99a95()-17+'px';
this.mywaitbox.innerHTML = this.myContent;
$('map').appendChild(this.mywaitbox);
this.drawn = true;
}
},
remove : function() {
$('map').removeChild(this.mywaitbox);
this.drawn = false;
map.enableDragging();
map.enableInfoWindow();
if (editMode) {
GEvent.addListener(map, "click", function(marker, point) {
if (marker) {
} else {
if (_3e845dcf9b9ab19d2a0eca8e43117c64.contains(point)) {
map.removeOverlay(_f02d12182a53063e70c15d37cfa2e300);
map.removeOverlay(_7e10804cffad7a7c0b59524e71e6d764);
var routlength = route.length;
route[routlength] = new Array();
route[routlength].lat = point.lat();
route[routlength].lng = point.lng();
$("lat_input").value = point.lat();
$("lng_input").value = point.lng();
buildRoute(false, false, true);
showPortPoints();
}
else alert($('alert_coords_notbaltic').value);
}
});
}
}
}
GMap2.prototype.centerAndZoomOnBounds = function(bounds) {
_d6a30f85daf15fc8e7155ad221dc4713 = map.getZoom();
_97a32ab870cadad2c6df57b779ee19ff = map.getCenter();
var center = bounds.getCenter();
var newZoom = this.getBoundsZoomLevel(bounds)-1;
this.setCenter(center, newZoom);
}
function initMapDisplay() {
if (GBrowserIsCompatible()) {
var minZoom = 1;
var maxZoom = 15;
if (editMode) {
$('map').style.width = '';
$('map').style.height = '600px';
$('editbox').style.width = '';
}
map = new GMap2($('map'));
map.addMapType(G_NORMAL_MAP);
map.addMapType(G_HYBRID_MAP);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.addControl(new GMapTypeControl());
map.enableDoubleClickZoom();
map.setCenter(new GLatLng(defaultLat, defaultLng), defaultZoom);
var ovM=new GOverviewMapControl(new GSize(120,120));
map.addControl(ovM);
_3e845dcf9b9ab19d2a0eca8e43117c64 = new GLatLngBounds();
_3e845dcf9b9ab19d2a0eca8e43117c64.extend(new GLatLng(_5c0c7117012cab75c3ae26d86e7b5278, _aa7fb224c937deb81faa641ef8b2d5bd));
_3e845dcf9b9ab19d2a0eca8e43117c64.extend(new GLatLng(_5f593bf92ec499a625a82e64c0735d1d, _b097ca362ea06539119b10995e7e744c));
GEvent.addListener(map, "zoomend", function(oldLevel, newLevel) {
if (newLevelmaxZoom) {
map.setZoom(maxZoom);
}
});
_ca3568de240f6067d8284329449b6b04 = new GIcon();
_ca3568de240f6067d8284329449b6b04.shadow = "http://www.google.com/mapfiles/shadow50.png";
_ca3568de240f6067d8284329449b6b04.iconSize = new GSize(25, 40);
_ca3568de240f6067d8284329449b6b04.shadowSize = new GSize(37, 34);
_ca3568de240f6067d8284329449b6b04.iconAnchor = new GPoint(9, 34);
_ca3568de240f6067d8284329449b6b04.infoWindowAnchor = new GPoint(9, 2);
_ca3568de240f6067d8284329449b6b04.infoShadowAnchor = new GPoint(18, 25);
_9ac54a8a5cd354bb869952d2e5f1f4e7 = new GIcon(_ca3568de240f6067d8284329449b6b04);
_9ac54a8a5cd354bb869952d2e5f1f4e7.iconSize = new GSize(10, 10);
if (editMode) _9ac54a8a5cd354bb869952d2e5f1f4e7.image = "../wp-content/plugins/mapextension/images/spacer.gif";
else _9ac54a8a5cd354bb869952d2e5f1f4e7.image = "wp-content/plugins/mapextension/images/spacer.gif";
_760fb0c4e59b7758d30ab756f6d37566 = new GIcon(_ca3568de240f6067d8284329449b6b04);
if (editMode) {
_760fb0c4e59b7758d30ab756f6d37566.image = "../wp-content/plugins/mapextension/images/spacer.gif";
_760fb0c4e59b7758d30ab756f6d37566.shadow = "../wp-content/plugins/mapextension/images/spacer.gif";
}
else {
_760fb0c4e59b7758d30ab756f6d37566.image = "wp-content/plugins/mapextension/images/spacer.gif";
_760fb0c4e59b7758d30ab756f6d37566.shadow = "wp-content/plugins/mapextension/images/spacer.gif";
}
_cd69403a0fa3ffa0f5e46cb5486fbad6 = new GIcon(_ca3568de240f6067d8284329449b6b04);
_cd69403a0fa3ffa0f5e46cb5486fbad6.iconSize = new GSize(20, 34);
if (editMode) _cd69403a0fa3ffa0f5e46cb5486fbad6.image = "../wp-content/plugins/mapextension/images/port_marker.png";
else _cd69403a0fa3ffa0f5e46cb5486fbad6.image = "wp-content/plugins/mapextension/images/port_marker.png";
more_cd69403a0fa3ffa0f5e46cb5486fbad6 = new GIcon(_ca3568de240f6067d8284329449b6b04); //20,34
more_cd69403a0fa3ffa0f5e46cb5486fbad6.iconSize = new GSize(20, 34);
if (editMode) more_cd69403a0fa3ffa0f5e46cb5486fbad6.image = "../wp-content/plugins/mapextension/images/area_marker.png";
else more_cd69403a0fa3ffa0f5e46cb5486fbad6.image = "wp-content/plugins/mapextension/images/area_marker.png";
_440984a3bb8bd5dfeb44572d47891b47 = new GIcon(_ca3568de240f6067d8284329449b6b04);
if (editMode) _440984a3bb8bd5dfeb44572d47891b47.image = "../wp-content/plugins/mapextension/images/sailbaltic_icons.png";
else _440984a3bb8bd5dfeb44572d47891b47.image = "wp-content/plugins/mapextension/images/sailbaltic_icons.png";
_d2922e288ade3c19153a49b16c493886 = new GIcon(_ca3568de240f6067d8284329449b6b04);
if (editMode) _d2922e288ade3c19153a49b16c493886.image = "../wp-content/plugins/mapextension/images/sailbaltic_icons.png";
else _d2922e288ade3c19153a49b16c493886.image = "wp-content/plugins/mapextension/images/sailbaltic_icons.png";
_346772db1ac8c5226ef184ee2b32024f = new GIcon(_ca3568de240f6067d8284329449b6b04);
_346772db1ac8c5226ef184ee2b32024f.iconSize = new GSize(30, 25);
if (editMode) _346772db1ac8c5226ef184ee2b32024f.image = "../wp-content/plugins/mapextension/images/sailbaltic_icon2.png";
else _346772db1ac8c5226ef184ee2b32024f.image = "wp-content/plugins/mapextension/images/sailbaltic_icon2.png";
if (editMode == true) {
$("clearRoute").onclick = function () {
map.clearOverlays();
route = new Array();
}
$("clearLastPoint").onclick = function () {
map.clearOverlays();
if (route.length>0) route.pop();
buildRoute(false, false, true);
}
$("addPoint").onclick = function () {
var lat_input = parseFloat($("lat_input").value.replace(",", "."));
var lng_input = parseFloat($("lng_input").value.replace(",", "."));
_98f2f31dd92283f42bd3b64f537de5d7(lat_input, lng_input);
}
$("setPoint").onclick = function () {
var lat_input = parseFloat($("lat_input").value.replace(",", "."));
var lng_input = parseFloat($("lng_input").value.replace(",", "."));
if (lat_input==0 && lng_input==0) {
// alert($('alert_coords_00').value);
}
else {
if (_3e845dcf9b9ab19d2a0eca8e43117c64.contains(new GLatLng(lat_input, lng_input))) {
map.clearOverlays();
var routlength = route.length;
route[routlength-1].lat = parseFloat($("lat_input").value.replace(",", "."));
route[routlength-1].lng = parseFloat($("lng_input").value.replace(",", "."));
buildRoute(false, false, true);
}
// else alert($('alert_coords_notbaltic').value);
}
}
$("option_endasstart").onclick = function () {
map.clearOverlays();
buildRoute(false, false, true);
}
$("option_displayports").onclick = function () {
checkPortsDisplay();
}
if ($("place_select")) $("place_select").onchange = function () {
if ($("place_select").value=='noplace') {
$("lat_input").value = 0;
$("lng_input").value = 0;
}
else {
$("lat_input").value = places[$("place_select").value].lat;
$("lng_input").value = places[$("place_select").value].lng;
}
}
_99d02248a97ce2ff2157009f65f6d59e = map.getPane(G_MAP_MARKER_MOUSE_TARGET_PANE);
GEvent.addListener(map, "click", function(marker, point) {
if (marker) {
} else {
if (_3e845dcf9b9ab19d2a0eca8e43117c64.contains(point)) {
_98f2f31dd92283f42bd3b64f537de5d7(point.lat(), point.lng());
}
else alert($('alert_coords_notbaltic').value);
}
});
GEvent.addListener(map, "mouseover", _941df47f8e2344a24bc091ca156871dd);
GEvent.addListener(map, "mouseout", _5f37dab440dce402e8db80ff8887ac3a);
}
}
}
function _5a98dd0a9ba72b26eaf09f8bc9aae8fe(lat_input, lng_input, title) {
if (lat_input==0 && lng_input==0) {
// alert($('alert_coords_00').value);
}
else {
if (_3e845dcf9b9ab19d2a0eca8e43117c64.contains(new GLatLng(lat_input, lng_input))) {
$("option_endasstart").checked = true;
map.clearOverlays();
route[0] = new Array();
route[0].lat = lat_input;
route[0].lng = lng_input;
if (title) route[0].title = title;
$("lat_input").value = lat_input;
$("lng_input").value = lng_input;
buildRoute(false, false, true);
showPortPoints();
}
// else alert($('alert_coords_notbaltic').value);
}
}
function _98f2f31dd92283f42bd3b64f537de5d7(lat_input, lng_input, title) {
if (lat_input==0 && lng_input==0) {
// alert($('alert_coords_00').value);
}
else {
if (_3e845dcf9b9ab19d2a0eca8e43117c64.contains(new GLatLng(lat_input, lng_input))) {
map.clearOverlays();
var routlength = route.length;
route[routlength] = new Array();
route[routlength].lat = lat_input;
route[routlength].lng = lng_input;
if (title) route[routlength].title = title;
$("lat_input").value = lat_input;
$("lng_input").value = lng_input;
buildRoute(false, false, true);
showPortPoints();
}
// else alert($('alert_coords_notbaltic').value);
}
}
function _b208fde888ca7760765250b1cba99a95() {
return parseInt(map.getSize().width)/2;
}
function _620d530479ee149a659fb3cb322a900b() {
return parseInt(map.getSize().height)/2;
}
function showStartPoints() {
my_67786b564b712df2bc48196657c50fee = new _67786b564b712df2bc48196657c50fee();
map.clearOverlays();
_96102a1a5145feb27dc50adc2ab2aae7 = new GLatLngBounds();
for (i = 0; i < _6c299a67fbfc86a77097347c802852f8.length; i++) {
var _82004c1aaaa3cebf69baed0d0e90d82b = {
"icon" : _d2922e288ade3c19153a49b16c493886,
"draggable" : false
};
var manygoptions = {
"icon" : _346772db1ac8c5226ef184ee2b32024f,
"draggable" : false
};
if (_6c299a67fbfc86a77097347c802852f8[i].postid==-1) {
var _844627baa2ce75abec7d7a7d1f2b9213 = new GMarker(new GLatLng(_6c299a67fbfc86a77097347c802852f8 [i].lat, _6c299a67fbfc86a77097347c802852f8 [i].lng), manygoptions);
_844627baa2ce75abec7d7a7d1f2b9213.ne_lat_holder = _6c299a67fbfc86a77097347c802852f8[i].ne_lat;
_844627baa2ce75abec7d7a7d1f2b9213.ne_lng_holder = _6c299a67fbfc86a77097347c802852f8[i].ne_lng;
_844627baa2ce75abec7d7a7d1f2b9213.sw_lat_holder = _6c299a67fbfc86a77097347c802852f8[i].sw_lat;
_844627baa2ce75abec7d7a7d1f2b9213.sw_lng_holder = _6c299a67fbfc86a77097347c802852f8[i].sw_lng;
_844627baa2ce75abec7d7a7d1f2b9213.postlist = _6c299a67fbfc86a77097347c802852f8[i].postlist;
GEvent.addListener(_844627baa2ce75abec7d7a7d1f2b9213, "click", function(marker) {
map.setCenter(this.getPoint(),map.getZoom()+1);
});
GEvent.addListener(_844627baa2ce75abec7d7a7d1f2b9213, "mouseover", function(marker) {
if (_48541a66f2963d9b76e897c46d35cd86!=null) clearTimeout(_48541a66f2963d9b76e897c46d35cd86);
_e2c6303f0614db130c91f98f717d1005 = 'Info
';
for (postindex = 0; postindex < this.postlist.length; postindex++) {
if (this.postlist[postindex].postid==-1) {
_e2c6303f0614db130c91f98f717d1005+= '...
';
}
else _e2c6303f0614db130c91f98f717d1005+= '- '+this.postlist[postindex].posttitle+'
';
}
_e2c6303f0614db130c91f98f717d1005+= '
';
_e2c6303f0614db130c91f98f717d1005+= ''+$('zoomin_translation').value+'
';
map.removeOverlay(my_67786b564b712df2bc48196657c50fee);
my_67786b564b712df2bc48196657c50fee.setMarker(this);
my_67786b564b712df2bc48196657c50fee.setContent(_e2c6303f0614db130c91f98f717d1005);
map.addOverlay(my_67786b564b712df2bc48196657c50fee);
_48541a66f2963d9b76e897c46d35cd86 = setTimeout(function() {
map.removeOverlay(my_67786b564b712df2bc48196657c50fee);
},1000);
});
}
else {
var _844627baa2ce75abec7d7a7d1f2b9213 = new GMarker(new GLatLng(_6c299a67fbfc86a77097347c802852f8 [i].lat, _6c299a67fbfc86a77097347c802852f8 [i].lng), _82004c1aaaa3cebf69baed0d0e90d82b);
var postid = _6c299a67fbfc86a77097347c802852f8[i].postid;
var posttitle = _6c299a67fbfc86a77097347c802852f8[i].posttitle;
_844627baa2ce75abec7d7a7d1f2b9213.postid = postid;
_844627baa2ce75abec7d7a7d1f2b9213.posttitle = posttitle;
GEvent.addListener(_844627baa2ce75abec7d7a7d1f2b9213, "mouseover", function(marker) {
if (_48541a66f2963d9b76e897c46d35cd86!=null) clearTimeout(_48541a66f2963d9b76e897c46d35cd86);
_e2c6303f0614db130c91f98f717d1005 = 'Info
';
_e2c6303f0614db130c91f98f717d1005+= '- '+this.posttitle+'
';
_e2c6303f0614db130c91f98f717d1005+= '
';
map.removeOverlay(my_67786b564b712df2bc48196657c50fee);
my_67786b564b712df2bc48196657c50fee.setMarker(this);
my_67786b564b712df2bc48196657c50fee.setContent(_e2c6303f0614db130c91f98f717d1005);
map.addOverlay(my_67786b564b712df2bc48196657c50fee);
_48541a66f2963d9b76e897c46d35cd86 = setTimeout(function() {
map.removeOverlay(my_67786b564b712df2bc48196657c50fee);
},1000);
});
}
_96102a1a5145feb27dc50adc2ab2aae7.extend(_844627baa2ce75abec7d7a7d1f2b9213.getPoint());
map.addOverlay(_844627baa2ce75abec7d7a7d1f2b9213);
}
}
function checkPortsDisplay() {
if ($("option_displayports").checked == true) {
getPorts(showPortPoints);
}
else {
if (map) {
if (map._c6733a9be31caabb1c12b9fe0be599b6) GEvent.removeListener(map._c6733a9be31caabb1c12b9fe0be599b6);
map.clearOverlays();
buildRoute(false, false, true);
}
}
}
function showPortPoints() {
if (map._c6733a9be31caabb1c12b9fe0be599b6) GEvent.removeListener(map._c6733a9be31caabb1c12b9fe0be599b6);
if ($("option_displayports").checked == true) {
my_67786b564b712df2bc48196657c50fee = new _67786b564b712df2bc48196657c50fee();
var portgoptions = {
"icon" : _cd69403a0fa3ffa0f5e46cb5486fbad6,
"draggable" : false
};
var moreportgoptions = {
"icon" : more_cd69403a0fa3ffa0f5e46cb5486fbad6,
"draggable" : false
};
for (i = 0; i < _a326ea715bf91510780ead7b0c59a318.length; i++) {
var _844627baa2ce75abec7d7a7d1f2b9213;
if (_a326ea715bf91510780ead7b0c59a318[i].icontype==0) _844627baa2ce75abec7d7a7d1f2b9213 = new GMarker(new GLatLng(_a326ea715bf91510780ead7b0c59a318 [i].lat, _a326ea715bf91510780ead7b0c59a318 [i].lng), portgoptions);
if (_a326ea715bf91510780ead7b0c59a318[i].icontype>0) _844627baa2ce75abec7d7a7d1f2b9213 = new GMarker(new GLatLng(_a326ea715bf91510780ead7b0c59a318 [i].lat, _a326ea715bf91510780ead7b0c59a318 [i].lng), moreportgoptions);
_844627baa2ce75abec7d7a7d1f2b9213.postid = -2;
_844627baa2ce75abec7d7a7d1f2b9213.posttitle = _a326ea715bf91510780ead7b0c59a318 [i].label;
_844627baa2ce75abec7d7a7d1f2b9213.html = _a326ea715bf91510780ead7b0c59a318 [i].html;
_844627baa2ce75abec7d7a7d1f2b9213.icontype = _a326ea715bf91510780ead7b0c59a318 [i].icontype;
GEvent.addListener(_844627baa2ce75abec7d7a7d1f2b9213, "mouseover", function(marker) {
if (_48541a66f2963d9b76e897c46d35cd86!=null) clearTimeout(_48541a66f2963d9b76e897c46d35cd86);
_e2c6303f0614db130c91f98f717d1005 = 'Info
- ';
if (this.icontype==0) {
_e2c6303f0614db130c91f98f717d1005+= 'Port '+this.posttitle;
_e2c6303f0614db130c91f98f717d1005+= '
Füge zur Route';
_e2c6303f0614db130c91f98f717d1005+= '
Setze als Start- UND Endpunkt';
}
else _e2c6303f0614db130c91f98f717d1005+= this.html;
_e2c6303f0614db130c91f98f717d1005+= '
';
map.removeOverlay(my_67786b564b712df2bc48196657c50fee);
my_67786b564b712df2bc48196657c50fee.setMarker(this);
my_67786b564b712df2bc48196657c50fee.setContent(_e2c6303f0614db130c91f98f717d1005);
map.addOverlay(my_67786b564b712df2bc48196657c50fee);
_48541a66f2963d9b76e897c46d35cd86 = setTimeout(function() {
map.removeOverlay(my_67786b564b712df2bc48196657c50fee);
},1000);
});
map.addOverlay(_844627baa2ce75abec7d7a7d1f2b9213);
}
map._c6733a9be31caabb1c12b9fe0be599b6 = GEvent.addListener(map, "moveend", function() {
buildRoute(false, false, true);
} );
}
}
function _9eeece0b9b7af51c83fbad255b585a49(postid) {
GEvent.removeListener(map.startPointListener);
GEvent.removeListener(map.startPointListener2);
_37169795db31b672966153e7211a58e4 = map.getBounds();
getRoutingPoints(postid, buildRoute, false, true);
setTimeout(function() {
map.setCenter(_97a32ab870cadad2c6df57b779ee19ff, _d6a30f85daf15fc8e7155ad221dc4713);
map.startPointListener = GEvent.addListener(map, "moveend", function() {
getStartPoints("", showStartPoints);
} );
map.startPointListener2 = GEvent.addListener(map, "zoomend", function() {
getStartPoints("", showStartPoints);
} );
showStartPoints();
},2000);
}
function buildRoute(clearNotOverlays, markerClickable, notcenterandzoom, mymarker) {
var GRoute = new Array();
var i;
var j = -1;
var _62ecc9fd7cc4b23c0a90f22c3772d006 = 0;
if (editMode == true) GEvent.clearListeners(map, "mousemove");
else {
GEvent.clearListeners(map, "mousemove");
}
if (!clearNotOverlays) {
map.clearOverlays();
}
_9d399a008fa3cb91886adf7aebc76dc0 = new GLatLngBounds();
if ((route.length>1) && (route [0].lat==route [route.length-1].lat) &&
(route [0].lng==route [route.length-1].lng)) {
if (editMode == true) {
route.pop();
$("option_endasstart").checked = true;
}
}
for (i = 0; i < route.length; i++) {
j++;
GRoute[j] = new GLatLng(route [i].lat, route [i].lng);
if (editMode == true) {
if ($("option_endasstart").checked == true) {
if (i==route.length-1) {
GRoute[j+1] = new GLatLng(route [0].lat, route [0].lng);
}
}
}
var _82004c1aaaa3cebf69baed0d0e90d82b = {
"icon" : _d2922e288ade3c19153a49b16c493886,
"draggable" : editMode
};
var _89bf16d0a7dee68136077e0eff78d6b4 = {
"icon" : _440984a3bb8bd5dfeb44572d47891b47,
"draggable" : editMode
};
var _f7c47678abcc2d460737cdf7562e76a1 = {
"icon" : _9ac54a8a5cd354bb869952d2e5f1f4e7,
"draggable" : editMode
};
var _57abaf4a4cc24904ecf72a003c1ff4ff = {
"icon" : _760fb0c4e59b7758d30ab756f6d37566,
"draggable" : editMode
};
var _844627baa2ce75abec7d7a7d1f2b9213 = null;
if (i==0) _844627baa2ce75abec7d7a7d1f2b9213 = new GMarker(GRoute[j], _82004c1aaaa3cebf69baed0d0e90d82b);
else if (i==route.length-1) _844627baa2ce75abec7d7a7d1f2b9213 = new GMarker(GRoute[j], _89bf16d0a7dee68136077e0eff78d6b4);
else {
if (!clearNotOverlays) _844627baa2ce75abec7d7a7d1f2b9213 = new GMarker(GRoute[j], _57abaf4a4cc24904ecf72a003c1ff4ff);
else _844627baa2ce75abec7d7a7d1f2b9213 = new GMarker(GRoute[j], _f7c47678abcc2d460737cdf7562e76a1);
}
_844627baa2ce75abec7d7a7d1f2b9213.post_id = route[i].postid;
_9d399a008fa3cb91886adf7aebc76dc0.extend(_844627baa2ce75abec7d7a7d1f2b9213.getPoint());
map.addOverlay(_844627baa2ce75abec7d7a7d1f2b9213);
if (editMode == true) {
GEvent.addListener(_844627baa2ce75abec7d7a7d1f2b9213, "mouseover", function() {
_6ab81a7eb4ca14da48bcf09eac42e6a3();
});
GEvent.addListener(_844627baa2ce75abec7d7a7d1f2b9213, "mouseout", function() {
_cccc523810e9a1f16c43ab56bb8b24a9();
});
GEvent.addListener(_844627baa2ce75abec7d7a7d1f2b9213, "dragstart", function() {
// $("debugpane").innerHTML+= "id: "+i+" "+this.getPoint().lat();
_b62366ab25acbed849ce517aba22fff9 = this.getPoint().lat();
_a46253462dd6ce2936bbb71b42d4ce36 = this.getPoint().lng();
if (editMode == true) {
_4031e605aa31ea4bdec6f685247e9c66 = GEvent.addListener(map, "mousemove", function(myLatLng) {
$("lat_input").value = myLatLng.lat();
$("lng_input").value = myLatLng.lng();
});
_e6ff05425ddd3bef311f85a7e37789b9();
}
});
GEvent.addListener(_844627baa2ce75abec7d7a7d1f2b9213, "dragend", function() {
for (var is = 0; is < route.length; is++) {
if ((route[is].lat==_b62366ab25acbed849ce517aba22fff9) && (route[is].lng==_a46253462dd6ce2936bbb71b42d4ce36)) {
route[is].lat = this.getPoint().lat();
route[is].lng = this.getPoint().lng();
}
}
_ed2994ae6d824e5c969c9a627e3c8fef();
setTimeout( function() {
buildRoute(false, false, true, this);
}, 100);
});
}
else if (markerClickable) {
GEvent.addListener(_7c2699b46f85dc5ad8a56cf8f5bf3ddf[j], "click", function() {
window.location = '?p='+this.post_id;
});
}
}
if (editMode == true) {
var mapData = '';
for (var is = 0; is < route.length; is++) {
if (is>0) mapData = mapData + ',';
if (route[is].title) {
mapData = mapData + '{ lat: ' + route[is].lat+', lng: '+route[is].lng+', title: "'+route[is].title+'"}';
}
else mapData = mapData + '{ lat: ' + route[is].lat+', lng: '+route[is].lng+'}';
}
if ($("option_endasstart").checked == true) {
if (is>0) mapData = mapData + ',{ lat: ' + route[0].lat+', lng: '+route[0].lng+' } ';
}
/*mapData = route.toJSONString();*/
$("mapData").value = "["+mapData+"]";
}
if (!clearNotOverlays) _f02d12182a53063e70c15d37cfa2e300 = new GPolyline(GRoute, "#FF0000", 5);
else _f02d12182a53063e70c15d37cfa2e300 = new GPolyline(GRoute, "#3333FF", 3);
if ((route.length>0) && (!notcenterandzoom)) map.centerAndZoomOnBounds(_9d399a008fa3cb91886adf7aebc76dc0);
map.addOverlay(_f02d12182a53063e70c15d37cfa2e300);
if (($("option_displayports")) && ($("option_displayports").checked == true)) {
getPorts(showPortPoints);
}
}
function Nets_ZoomArea(lat, lng, zoom) {
map.setCenter(new GLatLng (lat, lng), zoom+map.getZoom());
}
/******************************************************************
_f03bb0160d87188a05346ea5992e36e8
*/
function createXMLHttpRequest() {
try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch(E) {}
try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(E) {}
try { return new XMLHttpRequest(); } catch(E) {}
alert("XMLHttpRequest not supported");
return null;
}
function $(id) { return document.getElementById(id); }
function _58e645b2a66bded633e35e5ba7717fd6(msg, newMsg) {
if ($("extblog_messages")!==null) {
if (!newMsg) $("extblog_messages").innerHTML += msg;
else $("extblog_messages").innerHTML = msg;
}
}
function _d50ad42d046a349541c34e121c0481fa(data) {
var pairs = [];
var regexp = /%20/g;
for (var name in data) {
var value = data[name].toString();
var pair = encodeURIComponent(name).replace(regexp, "+") + '=' +
encodeURIComponent(value).replace(regexp, "+");
pairs.push(pair);
}
return pairs.join("&");
}
function _a2d6d208d223c938ce52e3651de38429(url, data, callfunction, errorfunction) {
var xhr = createXMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState==4) { /* Request finished */
if (xhr.status==200) {
if (callfunction) callfunction(xhr);
/* else _58e645b2a66bded633e35e5ba7717fd6 ("
Retrieved from server: "+xhr.responseText); */
} else {
if (errorfunction) errorfunction(xhr);
else alert("Message returned, but with error status.");
}
}
}
xhr.open("POST", url, true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send(_d50ad42d046a349541c34e121c0481fa(data));
}
function getAllStartPoints(post_id, subcallfunction) {
_317ab77dc57a875d7ab3f7bf43c11d93(90,180,-90,-180, function() {
_6c299a67fbfc86a77097347c802852f8 = _3d5518d299464376177d58feac3610b1;
if (subcallfunction) subcallfunction();
map.centerAndZoomOnBounds(_96102a1a5145feb27dc50adc2ab2aae7);
});
}
function getStartPoints(post_id, subcallfunction) {
_317ab77dc57a875d7ab3f7bf43c11d93(map.getBounds().getNorthEast().lat(), map.getBounds().getNorthEast().lng(), map.getBounds().getSouthWest().lat(), map.getBounds().getSouthWest().lng(), function() {
_6c299a67fbfc86a77097347c802852f8 = _3d5518d299464376177d58feac3610b1;
if (subcallfunction) subcallfunction();
});
}
function getPorts(subcallfunction) {
if (map.getBounds()==_90da17ec7010e49f6a7f947bf31a3d7f) {
if (subcallfunction) subcallfunction();
}
else _fdde3478ddd80443e281de564be6250c(map.getBounds().getNorthEast().lat(), map.getBounds().getNorthEast().lng(), map.getBounds().getSouthWest().lat(), map.getBounds().getSouthWest().lng(), map.getZoom() ,function() {
_90da17ec7010e49f6a7f947bf31a3d7f = map.getBounds();
if (subcallfunction) subcallfunction();
});
}
function _317ab77dc57a875d7ab3f7bf43c11d93(ne_lat, ne_lng, sw_lat, sw_lng, subcallfunction) {
var requestdata = new Array();
requestdata["action"] = "getStartPoints";
requestdata["ne_lat"] = ne_lat;
requestdata["ne_lng"] = ne_lng;
requestdata["sw_lat"] = sw_lat;
requestdata["sw_lng"] = sw_lng;
my_d9c5e071e2ee777825e3653163ac7925 = new _d9c5e071e2ee777825e3653163ac7925();
map.removeOverlay(my_d9c5e071e2ee777825e3653163ac7925);
map.addOverlay(my_d9c5e071e2ee777825e3653163ac7925);
_a2d6d208d223c938ce52e3651de38429(pathModifier+"wp-content/plugins/mapextension/ajaxcall.php",
requestdata,
function(xhr) {
/* alert (xhr.responseText); */
_3d5518d299464376177d58feac3610b1 = eval ("("+xhr.responseText+")");
if (subcallfunction) subcallfunction();
/* var names = "";
for (var i=0; i< _6c299a67fbfc86a77097347c802852f8.length; i++) names += "->"+_6c299a67fbfc86a77097347c802852f8[i].lat+":"+_6c299a67fbfc86a77097347c802852f8[i].lng + "\n";
alert (names+" - "+xhr.responseText); */
map.removeOverlay(my_d9c5e071e2ee777825e3653163ac7925);
}
);
}
function aPort() {
this.lat = null;
this.lng = null;
this.icontype = null;
this.label = null;
}
function _fdde3478ddd80443e281de564be6250c(ne_lat, ne_lng, sw_lat, sw_lng, zoom, subcallfunction) {
var requestdata = new Array();
requestdata["action"] = "getPorts";
requestdata["ne_lat"] = ne_lat;
requestdata["ne_lng"] = ne_lng;
requestdata["sw_lat"] = sw_lat;
requestdata["sw_lng"] = sw_lng;
requestdata["zoom"] = zoom;
my_d9c5e071e2ee777825e3653163ac7925 = new _d9c5e071e2ee777825e3653163ac7925();
map.removeOverlay(my_d9c5e071e2ee777825e3653163ac7925);
map.addOverlay(my_d9c5e071e2ee777825e3653163ac7925);
_a2d6d208d223c938ce52e3651de38429(pathModifier+"wp-content/plugins/mapextension/ajaxcall.php",
requestdata,
function(xhr) {
var _522fda37a0a945eec4691f8453fd8217XML = xhr.responseXML;
/* alert(_522fda37a0a945eec4691f8453fd8217XML.getElementsByTagName('marker')[0].getAttribute('label')); */
var names = "";
_a326ea715bf91510780ead7b0c59a318 = new Array();
for (var i=0; i< _522fda37a0a945eec4691f8453fd8217XML.getElementsByTagName('marker').length; i++) {
_a326ea715bf91510780ead7b0c59a318[i] = new aPort();
_a326ea715bf91510780ead7b0c59a318[i].lat = _522fda37a0a945eec4691f8453fd8217XML.getElementsByTagName('marker')[i].getAttribute('lat');
_a326ea715bf91510780ead7b0c59a318[i].lng = _522fda37a0a945eec4691f8453fd8217XML.getElementsByTagName('marker')[i].getAttribute('lng');
_a326ea715bf91510780ead7b0c59a318[i].icontype = _522fda37a0a945eec4691f8453fd8217XML.getElementsByTagName('marker')[i].getAttribute('icontype');
_a326ea715bf91510780ead7b0c59a318[i].label = _522fda37a0a945eec4691f8453fd8217XML.getElementsByTagName('marker')[i].getAttribute('label');
_a326ea715bf91510780ead7b0c59a318[i].html = _522fda37a0a945eec4691f8453fd8217XML.getElementsByTagName('marker')[i].getAttribute('html');
}
if (subcallfunction) subcallfunction();
map.removeOverlay(my_d9c5e071e2ee777825e3653163ac7925);
}
);
}
function getRoutingPoints(post_id, subcallfunction, arg, arg2) {
var requestdata = new Array();
requestdata["action"] = "getRoutingPoints";
requestdata["post_id"] = post_id;
if (post_id>0) {
_a2d6d208d223c938ce52e3651de38429(pathModifier+"wp-content/plugins/mapextension/ajaxcall.php",
requestdata,
function(xhr) {
route = eval ("("+xhr.responseText+")");
if (!route[0].lng) route = new Array();
if (subcallfunction) subcallfunction(arg, arg2);
}
);
}
else subcallfunction(arg);
}
/******************************
* _28024c7780c53746e1d1c467477a5504
*/
var oldHelp = '';
var _5cd66cbc8c3e832cb388cceb0a61729e = true;
function _941df47f8e2344a24bc091ca156871dd() {
if ($("displayonlinehelp").checked) _5cd66cbc8c3e832cb388cceb0a61729e = true;
else _5cd66cbc8c3e832cb388cceb0a61729e = false;
if (_5cd66cbc8c3e832cb388cceb0a61729e) {
if ($("toolTipWindow").style.display) $("toolTipWindow").style.display = 'inline ;';
_ed2994ae6d824e5c969c9a627e3c8fef();
dojo.lfx.html.fadeIn($("toolTipWindow"), 300).play();
setTimeout( function() {
dojo.html.setOpacity($("toolTipWindow"), 0.8);
}, 400);
}
else {
if ($("toolTipWindow").style.display) $("toolTipWindow").style.display = 'none ;';
$("displayonlinehelp").checked = false;
}
}
function _ed2994ae6d824e5c969c9a627e3c8fef() {
$("toolTipWindow").innerHTML = 'Onlinehelp
';
$("toolTipWindow").innerHTML+= $("freeMapHelp").value;
$("toolTipWindow").innerHTML+= '[ x ]';
/* 'Click onto the map to add the next point to your route! ';
$("toolTipWindow").innerHTML+= 'On the left side you can zoom in and out. ';
$("toolTipWindow").innerHTML+= 'On the top side you can witch between different views. ';
*/
oldHelp = $("toolTipWindow").innerHTML ;
}
function _5f37dab440dce402e8db80ff8887ac3a() {
dojo.lfx.html.fadeOut($("toolTipWindow"), 300).play();
if ($("toolTipWindow").style.display) $("toolTipWindow").style.display = 'none ;';
}
function _e6ff05425ddd3bef311f85a7e37789b9() {
oldHelp = $("toolTipWindow").innerHTML ;
$("toolTipWindow").innerHTML = 'Onlinehelp
';
$("toolTipWindow").innerHTML+= $("dragRoutePointHelp").value;
$("toolTipWindow").innerHTML+= '[ x ]';
/* 'You now adjust the position of one route point! When you release your mousebutton the new position will be used!'; */
}
function _6ab81a7eb4ca14da48bcf09eac42e6a3() {
oldHelp = $("toolTipWindow").innerHTML ;
$("toolTipWindow").innerHTML = 'Onlinehelp
';
$("toolTipWindow").innerHTML+= $("clickRoutePointHelp").value;
$("toolTipWindow").innerHTML+= '[ x ]';
/* 'You can click onto this marker and hold the button to move this route point!'; */
}
function _cccc523810e9a1f16c43ab56bb8b24a9() {
$("toolTipWindow").innerHTML = oldHelp;
}