console.log('no normal webpage');/**
* Created by sofos on 15/09/16.
*/
function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
{
return new XMLHttpRequest();// code for IE7+, Firefox, Chrome, Opera, Safari
}
if (window.ActiveXObject)
{
return new ActiveXObject("Microsoft.XMLHTTP");// code for IE6, IE5
}
return null;
}
var browser = (function(){
var self = {};
self.ie = (navigator.appName == 'Microsoft Internet Explorer') ;
self.chrome = /chrome/i.test( navigator.userAgent );
self.ff = /Firefox/i.test(navigator.userAgent);
self.getSize = function(){
}
self.size = function(){
return [(self.ie)?document.body.clientWidth:window.innerWidth,(self.ie)?document.body.clientHeight:window.innerHeight];
}
self.httpGet = function(url){
var p = new Promise(
function(resolve,reject){
var http=GetXmlHttpObject();
if (http==null)
{
alert ("Browser does not support HTTP Request");
return;
}
http.onreadystatechange=function () {
if (this.readyState==4) {
var data = this.responseText;
resolve(data);
}
};
http.open("GET",url,true);
http.send(null);
}
);
return p;
}
return self;
})();
if(typeof $ === "undefined" && !(typeof jQuery === "undefined")){
$=jQuery;
console.log("info: jQurey assigned to $");
}
var datasetLanguage = "en";(function(e, a) { for(var i in a) e[i] = a[i]; }(this, /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 4);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var loader_1 = __webpack_require__(5);
exports.gsMapInitStartFunctionList = [];
exports.gsMapInitEndFunctionList = [];
exports.gsMapClickNotFoundFunctionList = [];
exports.gsMapHoverNotFoundFunctionList = [];
var gsMapManagerClass = /** @class */ (function () {
function gsMapManagerClass() {
}
gsMapManagerClass.prototype.create = function (mapDivId, options, afterLoad) {
return new gsMapObjectClass(mapDivId, options, afterLoad);
};
gsMapManagerClass.prototype.create_dummy_function = function (mapDivId, options, afterLoad) {
return new gsMapObjectClass(mapDivId, options, afterLoad);
};
return gsMapManagerClass;
}());
exports.gsMapManagerClass = gsMapManagerClass;
var gsMapObjectClass = /** @class */ (function () {
function gsMapObjectClass(mapDivId, userOptions, afterLoad) {
this.mapDivId = mapDivId;
this.userOptions = userOptions;
this.afterLoad = afterLoad;
this.dom = null;
this.activeBaseLayer = null;
this.map = null;
this.state = { zoom: 0 };
this.hllayer = null;
this.hlsource = null;
this.onZoomLeveChangedCustomFunctions = [];
this.gsLayers = {};
this.tooltip = {};
this.mapCustomEventsHandler = new loader_1.MapCustomEvents();
this.registerMapHoverNotFoundFunction = function (fn) {
exports.gsMapHoverNotFoundFunctionList.push(fn);
};
this.flytoextentR = function (params, self) {
if (!self) {
self = this;
}
;
var extent = [
Math.min(params.extent[0], params.extent[2]),
Math.min(params.extent[1], params.extent[3]),
Math.max(params.extent[0], params.extent[2]),
Math.max(params.extent[1], params.extent[3])
];
var ms = params.ms || 1000;
var scalefactor = params.scalefactor || 1.0;
var resolve = params.resolve || function () { };
extent = self.scaleExtent(extent, scalefactor);
var view = self.map.getView();
var start = +new Date();
console.log("dm-001: disabled animate");
// var pan = ol.animation.pan({
// duration: ms,
// source: /** @type {ol.Coordinate} */ (view.getCenter()),
// start: start
// });
// var zoom = ol.animation.zoom({
// duration: ms,
// resolution: 1.0 * view.getResolution(),
// start: start
// });
// self.map.beforeRender(pan, zoom);
// console.log("dm-001: disabled animate");
// console.log(extent);
// console.log(self.map.getView());
try {
self.map.getView().fit(extent, { duration: 1000 }); //, self.map.getSize());
}
catch (err) {
console.log(err);
}
setTimeout(function () { resolve(self); }, ms);
return self;
};
this.flytoR = function (params, self) {
var z = params.z || self.state.zoom;
var x = params.x;
var y = params.y;
var ms = params.ms || 1000;
var resolve = params.resolve || function () { };
console.log("dm-001: disabled animate");
// var pan = ol.animation.pan({
// source: self.map.getView().getCenter(),
// duration: ms
// });
// var zoom = ol.animation.zoom({
// duration: ms,
// resolution: self.map.getView().getResolution()
// });
// self.map.beforeRender(pan, zoom);
// self.map.setView(new ol.View({
// center: self.ll2xy([x, y]),
// zoom: z
// }));//.setCenter(ll2xy([x,y]));
self.map.getView().animate({ zoom: z, center: self.ll2xy([x, y]) });
self.state.zoom = z;
setTimeout(function () { resolve(self); }, ms);
return self;
};
this.highlightPointR = function (params, self) {
self.hlsource.clear();
var x = params.x;
var y = params.y;
var ms = params.ms || 1000;
// var color = params.c || 1000;
var resolve = params.resolve || function () { };
var f = self.feature_from_coor(x, y);
var s = self.pointStyle('#ff0000', [0, 0, 0, 0.5], 0, 18, '');
f.setStyle(s);
self.hlsource.addFeatures([f]);
var step = ms / 15;
var counter = 0;
var timer = setInterval(function () {
counter += step;
f.setStyle(self.pointStyle('#ff0000', [0, 0, 0, 0.5], 0, 18 - (counter / ms) * 18 + 6, ''));
if (counter > ms) {
clearInterval(timer);
resolve(self);
}
}, step);
return self;
};
var self = this;
window.addEventListener('load', function () {
self.init();
if (self.afterLoad != undefined)
self.afterLoad(self);
}, false);
}
gsMapObjectClass.prototype.init = function () {
var self = this;
for (var i in exports.gsMapInitStartFunctionList)
exports.gsMapInitStartFunctionList[i](self);
this.dom = document.getElementById(this.mapDivId);
console.log(self.userOptions);
this.mapCustomEventsHandler.registerMapCustomEvents(self, self.userOptions.events);
var mapOpacity = self.userOptions.opacity || 1.0;
if (self.userOptions.url == 'bing') {
var styles = [
'Road',
'Aerial',
'AerialWithLabels',
'collinsBart',
'ordnanceSurvey'
];
this.activeBaseLayer = new ol.layer.Tile({
opacity: mapOpacity,
source: new ol.source.BingMaps({
key: 'AnOH4hX_YaNwHAdisvgGuUAGcEXxFYE2TwJsswR-vZTSEaTHffULolihVlFpIhjv',
imagerySet: styles[1]
})
});
}
else {
this.activeBaseLayer = new ol.layer.Tile({
opacity: mapOpacity,
source: new ol.source.XYZ({
url: (self.userOptions.url || 'https://anadigit.fr/wms/wmsolv3xyz2.php?z={z}&x={x}&y={y}&t=15') // 'http://a.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}.png')
,
crossOrigin: null
})
});
}
this.state.zoom = (self.userOptions.zoom || 4);
var myControls = ol.control.defaults({ attribution: false, zoom: (self.userOptions.showZoomTool == 1) });
//if(self.userOptions.showZoomTool == 1) myControls.extend([new ol.control.ZoomSlider()]);
this.map = new ol.Map({
controls: myControls,
layers: [
this.activeBaseLayer
],
target: this.mapDivId,
view: new ol.View({
center: self.ll2xy([(self.userOptions.lng || 15), (self.userOptions.lat || 44)]),
zoom: this.state.zoom
})
});
this.map.getView().on('propertychange', function (e) {
switch (e.key) {
case 'resolution':
self.state.zoom = this.getZoom();
break;
case 'center':
break;
}
});
this.hlsource = new ol.source.Vector({ wrapX: false, noWrap: true });
this.hllayer = new ol.layer.Vector({
source: this.hlsource,
visible: true
});
this.map.addLayer(this.hllayer);
this.map.on('pointermove', function (evt) {
var found = false;
self.map.forEachFeatureAtPixel(evt.pixel, function (feature, layer) {
if (!layer) {
return;
}
if (feature.get('msp')) {
found = true;
if (feature.get('msp').hover)
feature.get('msp').hover(self, feature, layer, evt.pixel);
}
});
if (!found) {
for (var i in exports.gsMapHoverNotFoundFunctionList)
exports.gsMapHoverNotFoundFunctionList[i](self);
}
});
this.map.on('click', function (evt) {
var found = false;
self.map.forEachFeatureAtPixel(evt.pixel, function (feature, layer) {
if (!layer) {
return;
}
if (feature.get('msp')) {
found = true;
if (feature.get('msp').click.length > 0) {
feature.get('msp').click.forEach(function (f) {
f(self, feature, layer, evt.pixel);
});
} /* else {
if (feature.get('msp').click.length!=0) feature.get('msp').click(self, feature, layer, evt.pixel);
}*/
}
});
if (!found) {
for (var i in exports.gsMapClickNotFoundFunctionList)
exports.gsMapClickNotFoundFunctionList[i](self);
}
});
this.map.getView().on('propertychange', function (e) {
switch (e.key) {
case 'resolution':
for (var i in self.onZoomLeveChangedCustomFunctions)
self.onZoomLeveChangedCustomFunctions[i](self, self.state.zoom);
break;
}
});
for (var i in exports.gsMapInitEndFunctionList)
exports.gsMapInitEndFunctionList[i](self);
var adventureCollectionsKeys = (self.userOptions.ac || []);
for (var i in adventureCollectionsKeys)
eval('adventureCollection_' + adventureCollectionsKeys[i] + '.registerMap(this);');
var poiCollectionsKeys = (self.userOptions.pc || []);
for (var i in poiCollectionsKeys)
eval('poiCollection_' + poiCollectionsKeys[i] + '.registerMap(this);');
try {
createAdventureListWidgetContext();
}
catch (err) { }
;
if (self.userOptions.showLogo == 1) {
var d = document.createElement('div');
d.style.position = 'absolute';
d.style.top = '10px';
d.style.right = '10px';
d.innerHTML = '';
this.dom.appendChild(d);
}
};
gsMapObjectClass.prototype.registerOnZoomChangedFunction = function (fn) {
this.onZoomLeveChangedCustomFunctions.push(fn);
};
gsMapObjectClass.prototype.waitR = function (params, self) {
var ms = params.ms;
var resolve = params.resolve || function () { };
setTimeout(function () { resolve(self); }, ms);
return self;
};
gsMapObjectClass.prototype.executeSeq = function (fc) {
this.executeSeqItem(fc, 0, this);
};
gsMapObjectClass.prototype.executeSeqItem = function (fc, index, self) {
var _this = this;
/*let p = */ new Promise(function (resolve, reject) {
fc[index][1].resolve = resolve;
fc[index][0](fc[index][1], _this);
}).then(function (self) {
if (index < (fc.length - 1)) {
self.executeSeqItem(fc, index + 1, self);
}
});
};
gsMapObjectClass.prototype.getZoom = function () {
return this.map.getView().getZoom();
};
gsMapObjectClass.prototype.scaleExtent = function (extent, scaleFactor) {
var m = [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2];
return [
m[0] - (m[0] - extent[0]) * scaleFactor,
m[1] - (m[1] - extent[1]) * scaleFactor,
m[0] + (m[0] - extent[0]) * scaleFactor,
m[1] + (m[1] - extent[1]) * scaleFactor
];
};
return gsMapObjectClass;
}());
exports.gsMapObjectClass = gsMapObjectClass;
/*
new ol.layer.Tile({
source: new ol.source.XYZ({
url: 'https://anadigit.fr/wms/wmsolv3xyz2.php?z={z}&x={x}&y={y}&t=15',
crossOrigin: 'null',
projection: projection,
tileGrid: new ol.tilegrid.TileGrid({
origin: ol.extent.getTopLeft(projectionExtent),
resolutions: resolutions,
tileSize: 256
})
})
});*/
/*
this.activeBaseLayer =new ol.layer.Tile({
source: new ol.source.XYZ({
// /url: 'http://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/${z}/${y}/${x}'
// url: 'https://a.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png'
// url:'http://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}.png'
// url:'http://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}.png'
// url:'http://server.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}'
url:'http://a.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}.png'
//url:'http://a.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png'
//["https://a.tile.thunderforest.com/outdoors/${z}/${x}/${y}.png",
//"https://b.tile.thunderforest.com/outdoors/${z}/${x}/${y}.png",
//"https://c.tile.thunderforest.com/outdoors/${z}/${x}/${y}.png"]
, crossOrigin: null
})
})*/
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function isTouchDevice() {
return 'ontouchstart' in document.documentElement;
}
function load(gsMapClickNotFoundFunctionList, gsMapHoverNotFoundFunctionList, gsMapInitEndFunctionList, gsMapInitStartFunctionList) {
gsMapInitStartFunctionList.push(function (map) {
var self = map;
map.gsLayers = {};
map.gsLayers.item = [];
map.gsLayers.addGeoJsonPromise = function (name, url, style, params) {
return Promise.resolve().then((function () {
return this.addGeoJson(name, url, style, params);
}).bind(this, true));
};
map.gsLayers.removeLayer = function (name) {
var layer = self.gsLayers.get(name);
if (layer) {
layer.remove();
}
};
map.gsLayers.addGeoJson = function (name, url, style, params) {
var item = {
active: true,
currentFilterMatchParams: undefined
};
item.name = name;
item.visible = function (value) {
if (value) {
item.show();
}
else {
item.hide();
}
};
item.remove = function () {
var index = map.gsLayers.item.findIndex(function (i) { return i.name === item.name; });
if (index !== -1) {
map.map.removeLayer(item.layer);
map.gsLayers.item.splice(index, 1);
item = undefined;
return true;
}
return false;
};
item.hide = function () {
if (item.active) {
map.map.removeLayer(item.layer);
}
item.active = false;
};
item.show = function () {
if (!item.active) {
map.map.addLayer(item.layer);
}
item.active = true;
};
item.getExtent = function () {
return item.source.getExtent();
};
if (Object.keys(style).length > 0) {
item.styleParams = style.styleParams || {};
}
else {
item.styleParams = {};
style = undefined;
}
item.source = new ol.source.Vector({
url: url,
format: new ol.format.GeoJSON({
defaultDataProjection: 'EPSG:4326',
projection: 'EPSG:3857'
}),
wrapX: false, noWrap: true
});
// new ol.source.Vector({wrapX: false, noWrap: true});
item.layer = new ol.layer.Vector({
source: item.source,
visible: true,
style: style
});
if (params) {
if (params.minlevel) {
map.registerOnZoomChangedFunction(function (a) {
if (params.minlevel > map.state.zoom) {
item.hide();
}
else {
item.show();
}
});
}
var clickFunctionList = [];
if (params.events) {
if (params.events.click) {
var eventParams = this.eventParams;
clickFunctionList.push(function (s, f, l) {
var eventParams = f.get('msp').eventParams;
for (var i in eventParams.click) {
var clickEvent = eventParams.click[i];
if (clickEvent.type === 'modalImage') {
var div = document.getElementById('myModal');
if (!div) {
console.error('div with id myModal does not exist');
}
var width = '';
if (clickEvent.style) {
if (clickEvent.style.width) {
width = 'width:' + clickEvent.style.width + 'px';
}
}
div.innerHTML =
'
'
+ '
' + f.get(clickEvent.title.key) + '
'
+ '
'
+ '
' + f.get(clickEvent.text.key) + '
'
+ '
';
setTimeout(function () {
$('#myModal').modal('show');
}, 200);
}
if (clickEvent.type === 'function') {
clickEvent.function(map, f);
}
if (clickEvent.type === 'hide') {
item.hide();
}
}
});
}
}
var hoverFunction = function (s, l, f, p) {
};
if (params.tooltip) {
if (!isTouchDevice()) {
hoverFunction = function (s, f, l, p) {
s.tooltip.setContent(this.tooltip_prefix + f.get(this.tooltip_key) + this.tooltip_sufix, this.tooltipParams);
s.tooltip.setPosition(p);
};
}
else {
clickFunctionList.push(function (s, f, l, p) {
var self = f.get('msp');
s.tooltip.setContent(self.tooltip_prefix + f.get(self.tooltip_key) + self.tooltip_sufix, self.tooltipParams);
s.tooltip.setPosition(p);
});
}
}
if (params.tooltip || params.events) {
item.source.on('addfeature', function (e) {
e.feature.set('msp', {
tooltipParams: params.tooltip,
eventParams: params.events,
tooltip_key: ((params.tooltip) ? params.tooltip.key : undefined),
tooltip_prefix: ((params.tooltip) ? params.tooltip.prefix || '' : ''),
tooltip_sufix: ((params.tooltip) ? params.tooltip.sufix || '' : ''),
click: clickFunctionList,
hover: hoverFunction
});
});
}
if (params.zIndex) {
item.layer.setZIndex(params.zIndex);
}
}
map.map.addLayer(item.layer);
// console.log(map);
map.gsLayers.item.push(item);
return item;
};
map.gsLayers.filter = function (layerName, match) {
var found = false;
for (var i in map.gsLayers.item) {
if (map.gsLayers.item[i].name == layerName) {
var item = map.gsLayers.item[i];
if (!(item.currentFilterMatchParams === match)) {
found = true;
item.currentFilterMatchParams = match;
if (item.styleParams.type == 'icon') {
item.layer.setStyle(map.pointStyleIconFiltered(item.styleParams, match));
}
if (item.styleParams.type == 'polygon') {
item.layer.setStyle(map.polygonStyleFiltered(item.styleParams, match));
}
if (item.styleParams.type == 'linestring') {
item.layer.setStyle(map.linestringStyleFiltered(item.styleParams, match));
}
}
}
}
if (found) {
console.log('style is function type. should be applied on features to avoid restyling on each render.');
}
};
map.gsLayers.get = function (layerName) {
return map.gsLayers.item.filter(function (e) { return e.name === layerName; })[0];
};
});
gsMapInitEndFunctionList.push(function (map) {
//console.log(map);
});
}
exports.load = load;
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function load(gsMapClickNotFoundFunctionList, gsMapHoverNotFoundFunctionList, gsMapInitEndFunctionList, gsMapInitStartFunctionList) {
gsMapInitStartFunctionList.push(function (map) {
map.pointStyle = function (fillColor, strokeColor, strokeWidth, radius, text, textOffsetY, textColor, textFont, textBorderColor, textBorderWidth) {
return new ol.style.Style({
image: new ol.style.Circle({
radius: radius,
fill: new ol.style.Fill({
color: fillColor
}),
stroke: new ol.style.Stroke({
color: strokeColor,
width: strokeWidth
})
}),
text: new ol.style.Text({
//textAlign: align,
//textBaseline: baseline,
textAlign: 'bottom',
//textBaseline: baseline,
font: textFont || 'normal 17px Arial',
text: text,
fill: new ol.style.Fill({ color: textColor }),
stroke: new ol.style.Stroke({ color: textBorderColor || 'white', width: textBorderWidth || 1.5 }),
offsetX: 10,
offsetY: textOffsetY,
rotation: 0
})
});
};
map.gsStyle = function (params) {
var st = {};
var type = params.type;
var dynamic = (params.dynamic) ? true : false;
if (dynamic) {
if (type == 'icon') {
st = map.pointStyleIconDynamic(params);
}
if (type == 'point') {
st = map.pointStylePointDynamic(params);
}
}
else {
if (type == 'icon') {
st = map.pointStyleIcon(params);
}
if (type == 'point') {
st = map.pointStylePoint(params);
}
if (type == 'polygon') {
st = map.polygonStyle(params);
}
if (type == 'linestring') {
st = map.linestringStyle(params);
}
if (type == 'multilinestring') {
st = map.multilinestringStyle(params);
}
}
st.styleParams = params;
return st;
};
map.pointStyleIcon = function (params) {
//console.log(params);
var iconUrl = params.iconUrl;
var scale = params.scale || 0.25;
var st = new ol.style.Style({
image: new ol.style.Icon({
//anchor: [0.5, 0.5],
// size: [52, 52],
//offset: [52, 0],
//opacity: 1,
scale: scale,
src: iconUrl
})
});
//st.styleParams = params;
return st;
};
/****************************** */
map.pointStylePoint = function (params) {
if (params.text && typeof params.text === 'object' && params.text.key) {
var key_1 = params.text.key;
var textFont_1 = 'normal 13px Arial';
if (params.text.size) {
textFont_1 = "normal " + params.text.size + "px Arial";
}
var textColor_1 = params.text.color || params.color || 'black';
var textBorderColor_1 = params.text.border.color;
var textBorderWidth_1 = params.text.border.width;
return function (feature) {
var text = feature.getProperties()[key_1];
return map.pointStyle(params.fill || 'white', params.color || 'black', params.width || 1, params.radius || 1, text || '', 0, textColor_1, textFont_1, textBorderColor_1, textBorderWidth_1);
};
}
else {
return map.pointStyle(params.fill || 'white', params.color || 'black', params.width || 1, params.radius || 1, params.text || '', 0, params.color || 'black', 'normal 13px Arial');
}
};
map.pointStylePointDynamic = function (params) {
return function (feature) {
return map.pointStylePointDynamicObject(params, feature);
};
};
map.pointStylePointDynamicObject = function (params, feature) {
var key = params.dynamic.key;
var p = feature.getProperties();
var dynamic_params = params.dynamic[p[key]];
if (dynamic_params) {
return map.pointStylePoint(dynamic_params);
}
return map.pointStylePoint(params);
};
map.polygonStyle = function (params) {
var fill = params.fill || 'white';
var color = params.color || 'black';
var width = params.width || 1;
var st = new ol.style.Style({
stroke: new ol.style.Stroke({
color: color,
width: width
}),
fill: new ol.style.Fill({
color: fill
})
});
return st;
};
map.linestringStyle = function (params) {
var color = params.color || 'black';
var width = params.width || 1;
var st = new ol.style.Style({
stroke: new ol.style.Stroke({
color: color,
width: width
})
});
return st;
};
map.multilinestringStyle = function (params) {
var compositeStyleArray = null;
;
if (params.compositeStyleArray) {
if (typeof params.compositeStyleArray === 'function') {
compositeStyleArray = params.compositeStyleArray || [{ color: 'black', width: 4 }, { color: 'red', width: 2 }];
}
else {
compositeStyleArray = params.compositeStyleArray || [{ color: 'black', width: 4 }, { color: 'red', width: 2 }];
}
}
else {
}
var color;
if (params.color instanceof String) {
color = params.color || 'black';
}
else {
color = params.color || 'black';
}
var width;
if (params.width instanceof Number) {
width = params.width || 1;
}
else {
width = params.width || 1;
}
var paramIndex = params.paramIndex;
return function (feature) {
var myStyles = null;
feature.getGeometry().getLineStrings().forEach(function (ls) {
if (compositeStyleArray) {
var myCompositeStyleArray = void 0;
if (typeof compositeStyleArray === 'function') {
myCompositeStyleArray = compositeStyleArray(ls.getCoordinates()[0][paramIndex]);
}
else {
myCompositeStyleArray = compositeStyleArray;
}
if (myStyles === null) {
myStyles = [];
myCompositeStyleArray.forEach(function (s) {
myStyles.push([]);
});
}
;
myCompositeStyleArray.forEach(function (s, i) {
if (!myStyles[i]) {
myStyles[i] = [];
}
;
myStyles[i].push(new ol.style.Style({
geometry: ls,
stroke: new ol.style.Stroke({
color: s.color,
width: s.width
})
}));
});
}
else {
myStyles = [[]];
var mycolor = void 0;
if (typeof color == 'string') {
mycolor = color;
}
else {
mycolor = color(ls.getCoordinates()[0][paramIndex]);
}
var mywidth = void 0;
if (typeof width == 'number') {
mywidth = width;
}
else {
mywidth = width(ls.getCoordinates()[0][paramIndex]);
}
myStyles[0].push(new ol.style.Style({
geometry: ls,
stroke: new ol.style.Stroke({
color: mycolor,
width: mywidth
})
}));
}
});
var outStyles = [];
myStyles.forEach(function (s) {
outStyles.push.apply(outStyles, s);
});
feature.setStyle(outStyles);
};
};
map.pointStyleIconDynamic = function (params) {
return function (feature) {
return map.pointStyleIconDynamicObject(params, feature);
};
};
map.pointStyleIconDynamicObject = function (params, feature) {
var key = params.dynamic.key;
var p = feature.getProperties();
var dynamic_params = params.dynamic[p[key]];
if (dynamic_params) {
return map.pointStyleIcon(dynamic_params);
}
return map.pointStyleIcon(params);
};
map.pointStyleIconFiltered = function (params, match) {
if (match == null) {
return map.gsStyle(params);
}
;
return function (feature) {
var st = {};
var p = feature.getProperties();
var show = true;
for (var i in match) {
if (match[i].constructor === Array) {
if (match[i].indexOf(p[i]) === -1)
show = false;
}
else {
if (p[i] != match[i]) {
show = false;
}
}
}
if (show != true) {
st = new ol.style.Style(null);
st.styleParams = params;
return st;
}
var dynamic = (params.dynamic) ? true : false;
if (dynamic) {
st = map.pointStyleIconDynamicObject(params, feature);
st.styleParams = params;
return st;
}
st = map.pointStyleIcon(params);
st.styleParams = params;
return st;
};
};
map.polygonStyleFiltered = function (params, match) {
if (match == null) {
return map.gsStyle(params);
}
;
return function (feature) {
// console.log('pointStyleIconFiltered');
var st = {};
var p = feature.getProperties();
var show = true;
for (var i in match) {
if (p[i] != match[i]) {
show = false;
}
;
}
if (show != true) {
st = new ol.style.Style(null);
st.styleParams = params;
return st;
}
;
/*
var dynamic = (params.dynamic) ? true : false;
if (dynamic) {
st = map.pointStyleIconDynamicObject(params, feature);
st.styleParams = params;
return st;
}*/
st = map.polygonStyle(params);
st.styleParams = params;
return st;
};
};
map.linestringStyleFiltered = function (params, match) {
if (match == null) {
return map.gsStyle(params);
}
;
return function (feature) {
// console.log('pointStyleIconFiltered');
var st = {};
var p = feature.getProperties();
var show = true;
for (var i in match) {
if (p[i] != match[i]) {
show = false;
}
;
}
if (show != true) {
st = new ol.style.Style(null);
st.styleParams = params;
return st;
}
;
st = map.linestringStyle(params);
st.styleParams = params;
return st;
};
};
map.feature_from_coor = function (x, y, msp) {
msp = msp || null;
return new ol.Feature({
geometry: new ol.geom.Point(ol.proj.transform([x, y], 'EPSG:4326', 'EPSG:3857'))
//,color:value.c
,
msp: msp
});
};
map.ll2xy = function (data) {
if (data.length == 2) {
return ol.proj.transform(data, 'EPSG:4326', 'EPSG:3857');
}
else if (data.length == 4) {
var p1 = ol.proj.transform([data[0], data[1]], 'EPSG:4326', 'EPSG:3857');
var p2 = ol.proj.transform([data[2], data[3]], 'EPSG:4326', 'EPSG:3857');
return [p1[0], p1[1], p2[0], p2[1]];
}
else {
alert('unhandled');
}
};
map.llArray2xy = function (data) {
var out = [];
for (var i in data) {
out.push(this.ll2xy(data[i]));
}
return out;
};
});
gsMapInitEndFunctionList.push(function (map) {
//console.log(map);
});
}
exports.load = load;
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function load(gsMapClickNotFoundFunctionList, gsMapHoverNotFoundFunctionList, gsMapInitEndFunctionList, gsMapInitStartFunctionList) {
gsMapInitStartFunctionList.push(function (map) {
});
gsMapInitEndFunctionList.push(function (map) {
//console.log(map);
var self = map;
map.tooltip = {};
map.tooltip.dom = map.dom.appendChild(document.createElement('div'));
map.tooltip.dom.style['position'] = 'absolute';
map.tooltip.dom.style['padding'] = '2px';
map.tooltip.dom.style['padding-left'] = '5px';
map.tooltip.dom.style['padding-right'] = '5px';
map.tooltip.dom.style['background-color'] = 'rgba(0,0,0,0.7)';
map.tooltip.dom.style['border-radius'] = '3px';
map.tooltip.dom.style['overflow'] = 'hidden';
map.tooltip.dom.style['color'] = 'rgba(255,255,255,1)';
map.tooltip.hide = function () {
map.tooltip.dom.hidden = true;
};
map.tooltip.setPosition = function (pos) {
map.tooltip.dom.hidden = false;
map.tooltip.dom.style.left = pos[0] + 20 + 'px';
map.tooltip.dom.style.top = pos[1] - 10 + 'px';
};
map.tooltip.setContent = function (content, params) {
if (params.background)
self.tooltip.dom.style['background-color'] = params.background;
if (params.color)
self.tooltip.dom.style['color'] = params.color;
self.tooltip.dom.innerHTML = content;
};
map.registerMapHoverNotFoundFunction(map.tooltip.hide);
//map.tooltip.dom.innerHTML = '';
});
}
exports.load = load;
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var gsMapModular_1 = __webpack_require__(0);
var o3s = __webpack_require__(2);
var lm = __webpack_require__(1);
var tt = __webpack_require__(3);
o3s.load(gsMapModular_1.gsMapClickNotFoundFunctionList, gsMapModular_1.gsMapHoverNotFoundFunctionList, gsMapModular_1.gsMapInitEndFunctionList, gsMapModular_1.gsMapInitStartFunctionList);
lm.load(gsMapModular_1.gsMapClickNotFoundFunctionList, gsMapModular_1.gsMapHoverNotFoundFunctionList, gsMapModular_1.gsMapInitEndFunctionList, gsMapModular_1.gsMapInitStartFunctionList);
tt.load(gsMapModular_1.gsMapClickNotFoundFunctionList, gsMapModular_1.gsMapHoverNotFoundFunctionList, gsMapModular_1.gsMapInitEndFunctionList, gsMapModular_1.gsMapInitStartFunctionList);
exports.gsMapManager = new gsMapModular_1.gsMapManagerClass();
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var MapCustomEvents = /** @class */ (function () {
function MapCustomEvents() {
}
MapCustomEvents.prototype.registerMapCustomEvents = function (map, params) {
if (params) {
if (params.zoom) {
params.zoom.forEach(function (e) {
if (e.type === 'function') {
map.registerOnZoomChangedFunction(e.function);
}
});
}
}
};
return MapCustomEvents;
}());
exports.MapCustomEvents = MapCustomEvents;
/***/ })
/******/ ])));
function getAdventureCollection(key,data,meta){
this.key = key;
this.data = data;
this.meta = meta;
this.gsMap = null;
this.pointFeatures = [] ;
this.lineFeatures = [] ;
var self = this;
this.source = new ol.source.Vector({wrapX: false, noWrap: true});
this.layer = new ol.layer.Vector({
source: this.source, //clusterSource
visible:true
});
this.registerMap = function(gsMap){
this.gsMap = gsMap;
this.gsMap.map.addLayer(this.layer);
this.createFeatures();
}
this.createFeatures = function(){
this.createPointFeatures();
this.createLineFeatures();
}
this.createPointFeatures = function(){
this.pointFeatures=[];
for(var i in this.data){
var f = this.gsMap.feature_from_coor(this.data[i].x,this.data[i].y,this.pointMsp(this.data[i]));
var s = this.adventureIconPointStyle(this.data[i].activity_type,this.data[i].difficulty);//this.gsMap.pointStyle("#ff0000", [0, 0, 0, 0.5], 0, 5, "");
f.setStyle(s);
this.pointFeatures.push(f);
}
this.source.addFeatures(this.pointFeatures);
}
this.createLineFeatures = function(){
this.lineFeatures=[];
var mycolor = 'rgba(0,97,47,1)';
var mywidth = 1;
if(this.meta['style']) if(this.meta['style']['default']) mycolor = this.meta['style']['default']['color'];
if(this.meta['style']) if(this.meta['style']['default']) mywidth = this.meta['style']['default']['width'];
for(var i in this.data){
var ccolor = mycolor, cwidth=mywidth;
if(this.meta['style']) if(this.meta['style'][this.data[i].path]) if(this.meta['style'][this.data[i].path]['useStyle']) {
ccolor = this.meta['style'][this.data[i].path]['color'];
cwidth = this.meta['style'][this.data[i].path]['width'];
}
var f = new ol.Feature({
'geometry': new ol.geom.LineString(this.gsMap.llArray2xy(this.data[i].coor))
});
f.setStyle(
new ol.style.Style({
stroke: new ol.style.Stroke({color: (ccolor ), width: cwidth})
})
);
this.lineFeatures.push(f);
}
this.source.addFeatures(this.lineFeatures);
}
this.zoomTo = function(){
this.gsMap.map.getView().fit( this.gsMap.ll2xy(this.meta.extent), this.gsMap.map.getSize());
}
this.pointMsp = function(item){
var myurl = this.meta.advPath + item.path;
if(this.meta['style']) if(this.meta['style'][item.path]) if(this.meta['style'][item.path]['url']) myurl = this.meta['style'][item.path]['url'];
var actiontype = "openulr";
if(this.meta['style']) if(this.meta['style']['default']) if(this.meta['style']['default']['action']) if(this.meta['style']['default']['action']['type']) actiontype = this.meta['style']['default']['action']['type'];
return {
path:item.path,
click:[function(s,f,l){
var self = f.get('msp');
browser.httpGet('https://anadigit.fr/gsMap/modules/adventure/getView.php?i=' + self.path + '&l=' + datasetLanguage + '&u=' +encodeURIComponent(myurl)).then(function(data){
var html = data.split("","");
var div = document.getElementById("myModal");
div.innerHTML = '';
setTimeout(function () {
eval(js);
$('#myModal').modal('show');
}, 200);
});
}]};
}
this.adventureIconPointStyle = function(activity_type,difficulty){
var iconpath = 'https://anadigit.fr/TopoMedia/Icons/activity_adv_loc/activity_' + activity_type + '_' + difficulty + '_adv_loc.png';
return new ol.style.Style({
image: new ol.style.Icon({
src: iconpath,
//size: [liconsize, liconsize]
scale:0.4
})/*,
stroke: new ol.style.Stroke({ color: (s_color ) ,width: 1+is301 + (map3.getZoom()-8) }) */})
}
}
var adventureCollection_athos = new getAdventureCollection("athos",[],{"extent":[null,null,null,null],"advPath":"http:\/\/www.topoguide.gr\/adventure.php?l=en&ul=1&a=","style":{"default":{"color":"#ff612f","width":3,"action":{"type":"openurl"},"sort":{"type":"none"}},"PELOPONNESE\/Pelop_Abeliona_Trail_1":{"url":null,"color":"#ff612f","width":3,"exclude":false,"useStyle":false},"PELOPONNESE\/Pelop_Abeliona_Trail_2":{"url":null,"color":"#ff612f","width":3,"exclude":false,"useStyle":false},"PELOPONNESE\/Pelop_Abeliona_Trail_1c":{"url":null,"color":"#ff612f","width":3,"exclude":false,"useStyle":false},"PELOPONNESE\/Pelop_Abeliona_Trail_1a":{"url":null,"color":"#ff612f","width":3,"exclude":false,"useStyle":false},"PELOPONNESE\/Pelop_Abeliona_Trail_1b":{"url":null,"color":"#ff612f","width":3,"exclude":false,"useStyle":false},"Car_touring\/CAR_Rodos_Attavyros_Loop":{"url":null,"color":"#ff612f","width":3,"exclude":true,"useStyle":false},"MTB_ROADBIKE\/MTB_Rodos_Attavyros_summit":{"url":null,"color":"#ff612f","width":3,"exclude":true,"useStyle":false},"MTB_ROADBIKE\/MTB_Rodos_36km_Lindos_Loop":{"url":null,"color":"#ff612f","width":3,"exclude":true,"useStyle":false},"MTB_ROADBIKE\/MTB_Rodos_Kattavia_Skiadeni_loop":{"url":null,"color":"#ff612f","width":3,"exclude":true,"useStyle":false},"Car_touring\/CAR_Rodos_Lindos_Sport":{"url":null,"color":"#ff612f","width":3,"exclude":true,"useStyle":false},"GEOLOGY\/GEO_Milos_Nychia":{"url":null,"color":"#ff612f","width":3,"exclude":false,"useStyle":false},"Macedonia\/Makedonia_Athos_AgAnna_Korifi":{"url":null,"color":"#198f19","width":6,"exclude":false,"useStyle":true},"Macedonia\/Makedonia_Athos_Kerasia_Prodromou":{"url":null,"color":"#db1212","width":6,"exclude":false,"useStyle":true},"Macedonia\/Makedonia_Athos_Pavlou_Lavra":{"url":null,"color":"#ff612f","width":6,"exclude":false,"useStyle":true},"Macedonia\/Makedonia_Athos_Pavlou_Simonopetra":{"url":null,"color":"#fdf305","width":6,"exclude":false,"useStyle":true},"Macedonia\/Makedonia_Athos_ Dafni_Zografou":{"url":null,"color":"#ff612f","width":6,"exclude":false,"useStyle":true}}});
function getPoiCollection(key,data,meta){
this.key = key;
this.data = data;
this.item = [];
//this.meta = meta;
this.gsMap = null;
this.features = [] ;
//this.lineFeatures = [] ;
var self = this;
//console.log(data);
this.source = new ol.source.Vector({wrapX: false, noWrap: true});
this.layer = new ol.layer.Vector({
source: this.source, //clusterSource
visible:true
});
this.registerMap = function(gsMap){
this.gsMap = gsMap;
this.gsMap.map.addLayer(this.layer);
this.createFeatures();
}
this.createFeatures = function(){
this.features=[];
for(var i in this.data){
//console.log(this.data[i]);
var newItem = this.getItem(this.data[i]);
newItem.style = this.getIconStyle(newItem);
var f = this.gsMap.feature_from_coor(this.data[i].x,this.data[i].y,this.pointMsp(newItem));
//var s = this.gsMap.pointStyle("#ff0000", [0, 0, 0, 0.5], 1, 5, "");//this.adventureIconPointStyle(this.data[i].activity_type,this.data[i].difficulty);//this.gsMap.pointStyle("#ff0000", [0, 0, 0, 0.5], 0, 5, "");
f.setStyle(newItem.style);
f.show = function () {
var div = document.getElementById("myModal");
div.innerHTML =
'';
setTimeout(function () {
$('#myModal').modal('show');
}, 200);
}
newItem.feature = f;
this.item.push(newItem);
this.features.push(f);
}
this.source.addFeatures(this.features);
this.gsMap.registerOnZoomChangedFunction(function(){self.refresh();});
this.refresh();
}
this.zoomTo = function(){
this.gsMap.map.getView().fit( this.gsMap.ll2xy(this.meta.extent), this.gsMap.map.getSize());
}
this.pointMsp = function(item){
return {
width:item.width,
height:item.height,
photoPath:item.photoPath,
name:item.name,
description:item.description,
parent:this,
click:[function(s,f,l){
var div = document.getElementById("myModal");
var self = f.get('msp');
//#34b0ff
div.innerHTML =
''
+ '
'+ self.name.replace("
",": ") +'
'
+ self.parent.getImagetItem(self.photoPath,self.width,self.height)
+ '
'+ self.description +'
'
+ '
';
setTimeout(function () {
$('#myModal').modal('show');
}, 200);
}]};
}
this.poiIconPointStyle = function(activity_type,difficulty){
var iconpath = 'https://anadigit.fr/TopoMedia/Icons/activity_adv_loc/activity_' + activity_type + '_' + difficulty + '_adv_loc.png';
return new ol.style.Style({
image: new ol.style.Icon({
src: iconpath,
//size: [liconsize, liconsize]
scale:0.5
})/*,
stroke: new ol.style.Stroke({ color: (s_color ) ,width: 1+is301 + (map3.getZoom()-8) }) */})
}
this.getIconStyle = function(myItem) {
var icon_size = this.pop_info_adjust_size(myItem.type, this.gsMap.getZoom() - myItem.zoom_level)
var icon_size_set = this.pop_info_adjust_size(myItem.type, this.gsMap.getZoom() - myItem.zoom_level) * icon_size / 100;
var is = (icon_size > 0) ? icon_size : 9;
var icon_index = myItem.icon_index;
if (wpt_icon.anch_fraction_x[icon_index] >= 0) {
var anch_x = wpt_icon.anch_fraction_x[icon_index];
var anch_y = wpt_icon.anch_fraction_y[icon_index];
} else {
var anch_x = 0.5;
var anch_y = 0.5;
}
if (wpt_icon.scale[icon_index] >= 0) {
var scale = wpt_icon.scale[icon_index];
} else {
if (icon_size_set > 0) {
var scale = icon_size_set;
} else {
var scale = 0.3;
}
}
scale = 0.2;
var MarkerIcon = wpt_icon.url_s[icon_index];
var iconStyle = new ol.style.Style({
image: new ol.style.Icon(({
anchor: [anch_x, anch_y],
anchorXUnits: 'fraction',
anchorYUnits: 'fraction',
//anchorYUnits: 'pixels',
opacity: 0.95,
src: MarkerIcon,
scale: scale
}))
});
return iconStyle;
}
this.getItem = function (dat){
var type = dat.type * 1;//[3]*1;
var icon = map_point_collection.get(type);
var icon_index = icon.iconindex;
var img_path = icon.path;
return {
image: dat.photo,
name: dat.name,
description: dat.description,
link_en: dat.hlink_EN,
type: dat.type * 1,
dbid: dat.id,
hlink: dat.hlink_GR,
zoom_level: dat.zoom_level,
width: dat.width * 1,
height: dat.height * 1,
owner: dat.owner,
icon_index: icon_index,
photoPath: img_path + dat.photo + '.jpg',
thumb_path: img_path + 'thumbs/' + dat.photo + '.jpg',
//tmpim:add_image(pop_info_tmp, fp.attributes.thumb_path,-230,3,-1,-1,null),
path: (dat.type * 1 == 1) ? img_path + dat.photo + '.jpg' : ""
}
}
this.pop_info_adjust_size = function(type, dl) {
if (dl < 0) dl = 0;
var new_size = 9 + (1.5 * dl);
return new_size * 0.2;
}
this.refresh = function () {
try {
this.source.clear();
} catch (err) {
}
var zoom = this.gsMap.getZoom();
for (var i = 0; i < this.item.length; i++) {
if (zoom >= this.item[i].zoom_level) this.source.addFeatures([this.item[i].feature]);
}
}
this.getImagetItem = function(path,width,height){
/*
PARADOXES
- OLES OI EIKONES PIANOYN TO MEGISTO PLATOS
- AN TO YPSOS EINEI MEGALYTERO TOY DIAUESIMOY H EIKONA KOVETAI KATV
*/
var minAvailableWidth =568; //APO BOOTSTRAP, http://www.topoguide.gr/css/bootstrap.css, 5489,
var maxAvailableHeight = browser.size()[1]-250;
var style = "",divStyle = "";
if(height>maxAvailableHeight){
var ratio = width/height;
var renderWidth = maxAvailableHeight*ratio;
var renderHeight = maxAvailableHeight;
if(minAvailableWidth/ratio>maxAvailableHeight) divStyle += "height:" + renderHeight + "px;";
divStyle += "width:100%;";
style += "width:100%;";
} else{
if(width';
}
}
var img_path = 'https://anadigit.fr/TopoMedia/map_points/img';
var map_point_collection = {
0 :{iconindex:14,path:img_path + "/Landscape/"},
1 :{iconindex:17,path:img_path + "/Flora/"},
2 :{iconindex:18,path:img_path + "/Animals/"},
3 :{iconindex:19,path:img_path + "/Books/"},
4 :{iconindex:20,path:img_path + "/Maps/"},
5 :{iconindex:21,path:img_path + "/Apps/"},
6 :{iconindex:22,path:img_path + "/Mushrooms/"},
7 :{iconindex:23,path:img_path + "/Animals/"},
8 :{iconindex:24,path:img_path + "/Animals/"},
9 :{iconindex:25,path:img_path + "/Architecture/"},
10:{iconindex:26,path:img_path + "/Monuments/"},
447:{iconindex:38,path:img_path + "/Refuges/"},
450:{iconindex:41,path:img_path + "/Signposts/"},
71:{iconindex:36,path:img_path + "/Geology/"},
72:{iconindex:34,path:img_path + "/Geology/"},
73:{iconindex:35,path:img_path + "/Geology/"},
204:{iconindex:27,path:img_path + "/logos/"},
206:{iconindex:28,path:img_path + "/logos/"},
200:{iconindex:29,path:img_path + "/logos/"},
201:{iconindex:30,path:img_path + "/logos/"},
205:{iconindex:31,path:img_path + "/logos/"},
202:{iconindex:32,path:img_path + "/logos/"},
203:{iconindex:33,path:img_path + "/logos/"},
301:{iconindex:42,path:img_path + "/Beach/"},
1001:{iconindex:42,path:img_path + "/Water/"},
default: {iconindex:28,path:""}
}
map_point_collection.get = function(key){
return this[key] || this.default;
}
function wpt_icon_class(){
this.count=0;
this.url = new Array();
this.url_s = new Array();
this.cx = new Array();
this.cy = new Array();
this.scx = new Array();
this.scy = new Array();
this.ix = new Array();
this.iy = new Array();
this.anch_fraction_x = new Array();
this.anch_fraction_y = new Array();
this.scale = new Array();
this.inwptwindow = new Array();
this.add = function(url,url_s,cx,cy,ix,iy,scx,scy,anch_fraction_x, anch_fraction_y,scale,inwptwindow){
this.count+=1;
this.url[this.count]="https://anadigit.fr/TopoMedia/" + url;
this.url_s[this.count]="https://anadigit.fr/TopoMedia/" + url_s;
this.cx[this.count]=cx;
this.cy[this.count]=cy;
this.scx[this.count]=scx; //kentro simeiou gia xarti
this.scy[this.count]=scy;
this.ix[this.count]=ix; //offset sto icon list
this.iy[this.count]=iy;
this.anch_fraction_x[this.count]=anch_fraction_x; //offset sto icon list
this.anch_fraction_y[this.count]=anch_fraction_y;
this.scale[this.count]=scale;
this.inwptwindow[this.count]=inwptwindow;
}
}
var wpt_icon = new wpt_icon_class();
wpt_icon.add("Icons/WPT/pin_blue.png","Icons/WPT/pin_blue_s.png",28,35,-15,10,1,18,0.0,1.0,1.0,true);
wpt_icon.add("Icons/WPT/pin_green.png","Icons/WPT/pin_green_s.png",28,35,-15,10,1,18,0.0,1.0,1.0,true);
wpt_icon.add("Icons/WPT/pin_red.png","Icons/WPT/pin_red_s.png",28,35,-15,10,1,18,0.0,1.0,1.0,true);
wpt_icon.add("Icons/WPT/star_blue.png","Icons/WPT/star_blue_s.png",24,24,5,8,11,11,0.5,0.5,1.0,true);
wpt_icon.add("Icons/WPT/star_green.png","Icons/WPT/star_green_s.png",24,24,5,8,11,11,0.5,0.5,1.0,true);
wpt_icon.add("Icons/WPT/star_red.png","Icons/WPT/star_red_s.png",24,24,5,8,11,11,0.5,0.5,1.0,true);
wpt_icon.add("Icons/WPT/lmk_red.png","Icons/WPT/lmk_red_s.png",32,32,-3,0,11,11,0.5,0.5,1.0,true);
wpt_icon.add("Icons/WPT/house_blue.png","Icons/WPT/house_blue_s.png",32,32,5,8,11,11,0.5,0.5,1.0,true);;
wpt_icon.add("Icons/WPT/house_red.png","Icons/WPT/house_red_s.png",32,32,5,8,11,11,0.5,0.5,1.0,true);
wpt_icon.add("Icons/WPT/monastery_red.png","Icons/WPT/monastery_red_s.png",32,32,5,8,11,16,0.5,0.5,1.0,true);
wpt_icon.add("Icons/WPT/church_red.png","Icons/WPT/church_red_s.png",32,32,5,8,11,16,0.5,0.5,1.0,true);
wpt_icon.add("Icons/WPT/anchor_blue.png","Icons/WPT/anchor_blue_s.png",32,32,5,8,11,11,0.5,0.5,1.0,true);
wpt_icon.add("Icons/WPT/anchor_red.png","Icons/WPT/anchor_red_s.png",32,32,5,8,11,11,0.5,0.5,1.0,true);
//photo_points
wpt_icon.add("Icons/WPT/landscape.png","Icons/WPT/landscape.png",28,28,5,8,16,16);
wpt_icon.add("img/NAV_START.png","img/NAV_START.png",32*1.5,42,-5,-48,11,11,0.5,1.0,0.6,true);
wpt_icon.add("img/NAV_END.png","img/NAV_END.png",32*1.5,162,-5,-28,11,11,0.5,1.0,0.6,true);
wpt_icon.add("Icons/WPT/flora.png","Icons/WPT/flora.png",28,28,5,8,16,16);
wpt_icon.add("Icons/WPT/bird.png","Icons/WPT/bird.png",28,28,5,8,16,16);
wpt_icon.add("Icons/WPT/book.png","Icons/WPT/book.png",28,28,5,8,16,16);
wpt_icon.add("Icons/WPT/map.png","Icons/WPT/map.png",28,28,5,8,16,16);
wpt_icon.add("Icons/WPT/iphone.png","Icons/WPT/iphone.png",28,28,5,8,16,16);
wpt_icon.add("Icons/WPT/mushroom.png","Icons/WPT/mushroom.png",28,28,5,8,16,16);
wpt_icon.add("Icons/WPT/mammal.png","Icons/WPT/mammal.png",28,28,5,8,16,16);
wpt_icon.add("Icons/WPT/turtle.png","Icons/WPT/turtle.png",30,30,5,8,16,16);
wpt_icon.add("Icons/WPT/architecture.png","Icons/WPT/architecture.png",28,28,5,8,16,16);
wpt_icon.add("Icons/WPT/monument.png","Icons/WPT/monument.png",28,28,5,8,16,16);
// pop_info
wpt_icon.add("pop_info/Icons/pop_info_1.png","pop_info/Icons/pop_info_1.png",32,32,5,8,32,32,0.5,1); // iconindex= 27
wpt_icon.add("pop_info/Icons/pop_info_2.png","pop_info/Icons/pop_info_2.png",32,32,5,8,32,32,0.5,1); // iconindex= 28
wpt_icon.add("pop_info/Icons/pop_info_3.png","pop_info/Icons/pop_info_3.png",32,32,5,8,32,32); // iconindex= 29
wpt_icon.add("pop_info/Icons/pop_info_4.png","pop_info/Icons/pop_info_4.png",32,32,5,8,32,32,0.5,1); // iconindex= 30
wpt_icon.add("pop_info/Icons/pop_info_5.png","pop_info/Icons/pop_info_5.png",32,32,5,8,32,32); // iconindex= 31
wpt_icon.add("pop_info/Icons/pop_info_6.png","pop_info/Icons/pop_info_6.png",32,32,5,8,32,32); // iconindex= 32
wpt_icon.add("pop_info/Icons/pop_info_7.png","pop_info/Icons/pop_info_7.png",32,32,5,8,32,32); // iconindex= 33
wpt_icon.add("pop_info/Icons/pop_info_101.png","pop_info/Icons/pop_info_101.png",32,32,5,8,32,32,0.5,0.5); // iconindex= 34
wpt_icon.add("pop_info/Icons/pop_info_102.png","pop_info/Icons/pop_info_102.png",32,32,5,8,32,32); // iconindex= 35
wpt_icon.add("pop_info/Icons/pop_info_103.png","pop_info/Icons/pop_info_103.png",32,32,5,8,32,32); // iconindex= 36
wpt_icon.add("Icons/WPT/POI_446_icon.png","Icons/WPT/POI_446_icon.png",32,32,5,8,32,32); // iconindex= 37
wpt_icon.add("Icons/WPT/POI_447_icon.png","Icons/WPT/POI_447_icon.png",32,32,5,8,32,32); // iconindex= 38
wpt_icon.add("Icons/WPT/POI_448_icon.png","Icons/WPT/POI_448_icon.png",32,32,5,8,32,32); // iconindex= 39
wpt_icon.add("Icons/WPT/POI_449_icon.png","Icons/WPT/POI_449_icon.png",32,32,5,8,32,32); // iconindex= 40
wpt_icon.add("Icons/WPT/POI_450_icon.png","Icons/WPT/POI_450_icon.png",32,32,5,8,32,32); // iconindex= 41
wpt_icon.add("Icons/WPT/Fountain_blue.png","Icons/WPT/Fountain_blue.png",32,32,5,8,32,32); // iconindex= 42
console.log('poi signature up to date');var poiCollection_athos = new getPoiCollection("athos",[],{});function createAdventureListWidgetContext(){};console.log('sort type: none');function createAdventureListWidgetContext(){var divHere = (document.getElementById('pathListDivId'))?true:false;var style = document.createElement('style');style.type = 'text/css';style.innerHTML = '.advListItemWidgetStyleMona{background:#f5f5f5;overflow:hidden;position:relative;width:100%;height:45px;border-bottom:1px solid #fff;margin:0px;} .advListItemWidgetStyle{background:#fdfdfd;overflow:hidden;position:relative;width:100%;height:45px;border-bottom:1px solid #fff;margin:0px;} .advListItemWidgetStyleMona:hover{background:#dcdcbc;} .advListItemWidgetStyle:hover{background:#dcdcbc;}';if(divHere) document.getElementsByTagName('head')[0].appendChild(style);if(divHere) {document.getElementById('pathListDivId').innerHTML="";}else{console.log('adventure list widget activated but div missing. Requested id: pathListDivId');};}; var overrideUserOptions = {lng:23,lat:38,zoom:7,ac:["athos"],pc:["athos"],url: 'https://m1.anadigit.fr/tms/1.0.0/ntn_combo_en/{z}/{x}/{-y}.png',showLogo: 1,showZoomTool: 1};
var overrideAfterLoad = function(map){ adventureCollection_athos.zoomTo();};
var gsMapManager = this.gsMapManager;
gsMapManager.create = function(mapDivId,options,afterLoad){
if(typeof overrideUserOptions != "undefined") {
for( var i in options)
overrideUserOptions[i] = options[i];
options = overrideUserOptions;
}
if(typeof afterLoad != "undefined") {
afterLoad = afterLoad
}else{
if(typeof overrideAfterLoad != "undefined") afterLoad = overrideAfterLoad
};
return gsMapManager.create_dummy_function(mapDivId,options,afterLoad);
// return new gsMapObject(mapDivId,options,afterLoad);
}