\r\n'},function(t){t.exports=JSON.parse('{"tooltip":"Mirror Comparison","title":"Mirror Maps","modViz0":"Standard map","modViz1":"Vertical two maps","modViz2":"Horizontal two maps","modViz3":"Vertical three maps","modViz4":"Vertical four maps","modViz5":"Mosaic maps","modViz6":"Horizontal four maps","modViz7":"Vertical 2-1-1 proportional maps","modViz8":"One map above and two below","modViz9":"Two maps above and one below"}')},function(t){t.exports=JSON.parse('{"tooltip":"Comparador de mapas espejo","title":"Mapas espejo","modViz0":"Mapa standard","modViz1":"Dos mapas en vertical","modViz2":"Dos mapas en horizontal","modViz3":"Tres mapas en vertical","modViz4":"Cuatro mapas en vertical","modViz5":"Mosaico de mapas","modViz6":"Cuatro mapas en horizontal","modViz7":"Tres mapas en proporción 2-1-1","modViz8":"Un mapa arriba y dos abajo","modViz9":"Dos mapas arriba y uno abajo"}')},function(t){t.exports=JSON.parse('{"url":{"name":"mirrorpanel","separator":"*!"},"constructor":"M.plugin.Mirrorpanel","parameters":[{"type":"object","properties":[{"type":"simple","name":"position","possibleValues":["TL","TR","BL","BR"],"position":0},{"type":"boolean","name":"collapsed","position":1},{"type":"boolean","name":"collapsible","position":2},{"type":"simple","name":"modeViz","position":3},{"type":"boolean","name":"enabledKeyFunctions","position":4},{"type":"boolean","name":"showCursors","position":5},{"type":"simple","name":"mirrorLayers","position":6},{"type":"simple","name":"defaultBaseLyrs","position":7},{"type":"boolean","name":"interface","position":8}]}],"files":{"ol":{"scripts":["mirrorpanel.ol.min.js"],"styles":["mirrorpanel.ol.min.css"]}},"metadata":{"uuid_plugin":"","uuid_version_plugin":"","version_ficha_metadatos":"","name":"Mirrorpanel","description":"Plugin que permite comparar varias capas dividiendo la pantalla en varias partes.","text":"Plugin que permite comparar varias capas dividiendo la pantalla en varias partes. Los mapas tienen sus vistas sincronizadas, y podemos ver la representación de una misma zona por distintas capas.","version":"1.0.0","date":"Julio, 2020","author":"","org":"","tags":"mapea,plugin","icon":"./facade/assets/icons/icons.svg","buttons":[{"title":"","description":"","querySelector":""},{"title":"","description":"","querySelector":""}],"dependencies":{"modules":["",""],"plugins":[{"uuid":"","name":""}],"services":[{"name":"","description":""}]}}}')},function(t,e,o){},function(t,e,o){"use strict";o.r(e);o(4);function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:y(),o=h(e),r="";return M.utils.isNullOrEmpty(o)?console.warn("The translation '".concat(e,"' has not been defined.")):r=t.split(".").reduce((function(t,e){return t[e]}),o),r};function v(t){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{};O(this,i),(t=n.call(this)).name_="mirrorpanel",t.map_=null,t.controls_=[],t.className="m-plugin-mirrorpanel";var o=["TR","TL","BL","BR"];return t.position=o.includes(e.position)?e.position:"TR",t.collapsed=e.collapsed,void 0===t.collapsed&&(t.collapsed=!0),t.collapsible=e.collapsible,void 0===t.collapsible&&(t.collapsible=!0),t.modeViz=e.modeViz,void 0===t.modeViz&&(t.modeViz=0),t.enabledKeyFunctions=e.enabledKeyFunctions,void 0===t.enabledKeyFunctions&&(t.enabledKeyFunctions=!0),t.showCursors=e.showCursors,void 0===t.showCursors&&(t.showCursors=!0),t.mirrorLayers=[],void 0!==e.mirrorLayers&&(Array.isArray(e.mirrorLayers)?t.mirrorLayers=e.mirrorLayers:t.mirrorLayers=e.mirrorLayers.split(",")),t.defaultBaseLyrs=[],void 0!==e.defaultBaseLyrs&&(Array.isArray(e.defaultBaseLyrs)?t.defaultBaseLyrs=e.defaultBaseLyrs:t.defaultBaseLyrs=e.defaultBaseLyrs.split(",")),t.interface=void 0===e.interface||e.interface,t.tooltip_=e.tooltip||b("tooltip"),t.metadata_=B.metadata,t}return e=i,(o=[{key:"addTo",value:function(t){var e=this,o={pluginOnLeft:!!["TL","BL"].includes(this.position),collapsible:this.collapsible,collapsed:this.collapsed,modeViz:this.modeViz,showCursors:this.showCursors,mirrorLayers:this.mirrorLayers,defaultBaseLyrs:this.defaultBaseLyrs};this.control_=new _(o),this.controls_.push(this.control_),this.map_=t,this.panel_=new M.ui.Panel("panelMirrorpanel",{collapsible:this.collapsible,collapsed:this.collapsed,position:M.ui.position[this.position],modeViz:this.modeViz,showCursors:this.showCursors,className:this.interface?"m-plugin-panelMirrorpanel":"m-plugin-panelMirrorpanel hidden",collapsedButtonClass:"mirrorpanel-icon",tooltip:this.tooltip_}),this.panel_.addControls(this.controls_),t.addPanels(this.panel_),document.addEventListener("keydown",(function(t){if(e.enabledKeyFunctions){for(var o=0;o<10;o++)t.ctrlKey&&t.shiftKey&&t.key==="F"+(o+1)&&e.control_.manageVisionPanelByCSSGrid(o);var r=["Control","Shift","Alt","Meta"].includes(t.key)?"":t.key;"Escape"==(t.ctrlKey?"Control ":"")+(t.shiftKey?"Shift ":"")+(t.altKey?"Alt ":"")+(t.metaKey?"Meta ":"")+r&&e.control_.manageVisionPanelByCSSGrid(0)}}))}},{key:"destroy",value:function(){document.removeEventListener("keydown",(function(t){})),this.control_.removeMaps(),this.control_.destroyMapsContainer(),this.map_.removeControls([this.control_]);var t=[null,null,null,null,null,null,null,null,null,null,null];this.control_=t[0],this.panel_=t[1],this.map_=t[2],this.collapsible=t[3],this.collapsed=t[4],this.modeViz=t[5],this.enabledKeyFunctions=t[6],this.showCursors=t[7],this.mirrorLayers=t[8],this.defaultBaseLyrs=t[9],this.interface=t[10]}},{key:"getMetadata",value:function(){return this.metadata_}},{key:"getAPIRest",value:function(){return"".concat(this.name,"=").concat(this.position,"*!").concat(this.collapsed,"*!").concat(this.collapsible,"*!").concat(this.modeViz,"*!").concat(this.enabledKeyFunctions,"*!").concat(this.showCursors,"*!").concat(this.mirrorLayers,"*!").concat(this.defaultBaseLyrs,"*!").concat(this.interface)}},{key:"activate",value:function(){this.control_.activate()}},{key:"deactivate",value:function(){this.control_.deactivate()}},{key:"name",get:function(){return this.name_}}])&&S(e.prototype,o),r&&S(e,r),i}();window.M.plugin||(window.M.plugin={}),window.M.control||(window.M.control={}),window.M.impl||(window.M.impl={}),window.M.impl.control||(window.M.impl.control={}),window.M.plugin.Mirrorpanel=I,window.M.control.MirrorpanelControl=_,window.M.impl.control.MirrorpanelControl=p}]);
+!function(t){var e={};function o(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=e,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(r,n,function(e){return t[e]}.bind(null,n));return r},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=5)}([function(t,e){t.exports='
\r\n
{{translations.title}}
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n'},function(t){t.exports=JSON.parse('{"tooltip":"Mirror Comparison","title":"Mirror Maps","modViz0":"Standard map","modViz1":"Vertical two maps","modViz2":"Horizontal two maps","modViz3":"Vertical three maps","modViz4":"Vertical four maps","modViz5":"Mosaic maps","modViz6":"Horizontal four maps","modViz7":"Vertical 2-1-1 proportional maps","modViz8":"One map above and two below","modViz9":"Two maps above and one below"}')},function(t){t.exports=JSON.parse('{"tooltip":"Comparador de mapas espejo","title":"Mapas espejo","modViz0":"Mapa standard","modViz1":"Dos mapas en vertical","modViz2":"Dos mapas en horizontal","modViz3":"Tres mapas en vertical","modViz4":"Cuatro mapas en vertical","modViz5":"Mosaico de mapas","modViz6":"Cuatro mapas en horizontal","modViz7":"Tres mapas en proporción 2-1-1","modViz8":"Un mapa arriba y dos abajo","modViz9":"Dos mapas arriba y uno abajo"}')},function(t){t.exports=JSON.parse('{"url":{"name":"mirrorpanel","separator":"*!"},"constructor":"M.plugin.Mirrorpanel","parameters":[{"type":"object","properties":[{"type":"simple","name":"position","possibleValues":["TL","TR","BL","BR"],"position":0},{"type":"boolean","name":"collapsed","position":1},{"type":"boolean","name":"collapsible","position":2},{"type":"simple","name":"modeViz","position":3},{"type":"boolean","name":"enabledKeyFunctions","position":4},{"type":"boolean","name":"showCursors","position":5},{"type":"simple","name":"mirrorLayers","position":6},{"type":"simple","name":"defaultBaseLyrs","position":7},{"type":"boolean","name":"interface","position":8},{"type":"boolean","name":"showToc","position":9}]}],"files":{"ol":{"scripts":["mirrorpanel.ol.min.js"],"styles":["mirrorpanel.ol.min.css"]}},"metadata":{"uuid_plugin":"","uuid_version_plugin":"","version_ficha_metadatos":"","name":"Mirrorpanel","description":"Plugin que permite comparar varias capas dividiendo la pantalla en varias partes.","text":"Plugin que permite comparar varias capas dividiendo la pantalla en varias partes. Los mapas tienen sus vistas sincronizadas, y podemos ver la representación de una misma zona por distintas capas.","version":"1.0.0","date":"Julio, 2020","author":"","org":"","tags":"mapea,plugin","icon":"./facade/assets/icons/icons.svg","buttons":[{"title":"","description":"","querySelector":""},{"title":"","description":"","querySelector":""}],"dependencies":{"modules":["",""],"plugins":[{"uuid":"","name":""}],"services":[{"name":"","description":""}]}}}')},function(t,e,o){},function(t,e,o){"use strict";o.r(e);o(4);function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:y(),o=h(e),r="";return M.utils.isNullOrEmpty(o)?console.warn("The translation '".concat(e,"' has not been defined.")):r=t.split(".").reduce((function(t,e){return t[e]}),o),r};function v(t){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){for(var o=0;o0&&(this.mapL.A.addLayers(this.mirrorLayers),this.mapL.A.getLayers().forEach((function(t){0!==t.zindex_&&t.setVisible(!1)}))),this.showCursors&&this.addLayerCursor("A"),new Promise((function(t,o){var r;r={jsonp:!0,vars:{translations:{title:b("title"),modViz0:b("modViz0"),modViz1:b("modViz1"),modViz2:b("modViz2"),modViz3:b("modViz3"),modViz4:b("modViz4"),modViz5:b("modViz5"),modViz6:b("modViz6"),modViz7:b("modViz7"),modViz8:b("modViz8"),modViz9:b("modViz9")}}},e.template=M.template.compileSync(d.a,r),e.template.querySelectorAll('button[id^="set-mirror-"]').forEach((function(t,o){t.addEventListener("click",(function(t){e.manageVisionPanelByCSSGrid(o)}))})),e.manageVisionPanelByCSSGrid(e.modeViz),t(e.template)}))}},{key:"activate",value:function(){L(V(i.prototype),"activate",this).call(this)}},{key:"deactivate",value:function(){L(V(i.prototype),"deactivate",this).call(this)}},{key:"createMapContainers",value:function(){var t=document.createElement("div");t.id="lienzo",t.classList.add("mirrorpanel-grid");var e=document.getElementById("mapjs")||document.getElementById("map");document.body.insertBefore(t,e),e.classList.add("mirror1"),t.appendChild(e);var o=document.createElement("div");o.id="mapjsB",o.classList.add("mirror2"),t.appendChild(o);var r=document.createElement("div");r.id="mapjsC",r.classList.add("mirror3"),t.appendChild(r);var n=document.createElement("div");n.id="mapjsD",n.classList.add("mirror4"),t.appendChild(n)}},{key:"manageVisionPanelByCSSGrid",value:function(t){var e=this.modeViz;(document.getElementById("mapjs")||document.getElementById("map")).style.display="none",document.getElementById("mapjsB").style.display="none",document.getElementById("mapjsC").style.display="none",document.getElementById("mapjsD").style.display="none",this.template.querySelector("#set-mirror-"+e).classList.remove("buttom-pressed");for(var o=0;o<10;o++)document.getElementById("lienzo").classList.remove("modeViz"+o);document.getElementById("lienzo").classList.add("modeViz"+t),[1,2].includes(t)&&null==this.mapL.B&&this.createMapObjects("B"),[3,7,8,9].includes(t)&&(null==this.mapL.B&&this.createMapObjects("B"),null==this.mapL.C&&this.createMapObjects("C")),[4,5,6].includes(t)&&(null==this.mapL.B&&this.createMapObjects("B"),null==this.mapL.C&&this.createMapObjects("C"),null==this.mapL.D&&this.createMapObjects("D")),this.modeViz=t,this.template.querySelector("#set-mirror-"+t).classList.add("buttom-pressed"),this.map_.refresh(),null!==this.mapL.B&&this.mapL.B.refresh(),null!==this.mapL.C&&this.mapL.C.refresh(),null!==this.mapL.D&&this.mapL.D.refresh()}},{key:"createMapObjects",value:function(t){var e=null;switch(t){case"B":this.defaultBaseLyrs[1]&&(e=this.defaultBaseLyrs[0]);break;case"C":this.defaultBaseLyrs[2]&&(e=this.defaultBaseLyrs[1]);break;case"D":this.defaultBaseLyrs[3]&&(e=this.defaultBaseLyrs[2]);break;default:e=this.map_.getLayers()[0].setMap(this)}this.mapL[t]=M.map({container:"mapjs"+t,layers:e,controls:this.showTOC?["layerswitcher"]:"",center:this.map_.getCenter(),projection:this.map_.getProjection().code+"*"+this.map_.getProjection().units,zoom:this.map_.getZoom()}),this.mapL[t].getMapImpl().setView(this.map_.getMapImpl().getView()),this.showCursors&&this.addLayerCursor(t),this.mirrorLayers.length>0&&(this.mapL[t].addLayers(this.mirrorLayers),this.mapL[t].getLayers().forEach((function(t){0!==t.zindex_&&t.setVisible(!1)}))),this.mapL[t].refresh()}},{key:"addLayerCursor",value:function(t){var e=this;this.lyrCursor[t]=new M.layer.Vector({name:"Coordenadas centro "+t},{displayInLayerSwitcher:!1}),this.featureLyrCursor[t]=new M.Feature("Center"+t,{type:"Feature",properties:{},geometry:{type:"Point",coordinates:this.mapL[t].getCenter()}}),this.lyrCursor[t].addFeatures([this.featureLyrCursor[t]]),this.lyrCursor[t].setStyle(this.styleCursor),this.lyrCursor[t].setZIndex(5e3),this.mapL[t].addLayers(this.lyrCursor[t]),this.mapL[t].getMapImpl().on("pointermove",(function(o){e.lyrCursor[t].setVisible(!1),Object.keys(e.featureLyrCursor).forEach((function(r){e.mapL[r]&&e.mapL[r].getMapImpl().setView(e.mapL[t].getMapImpl().getView()),r!=t&&null!==e.featureLyrCursor[r]&&(e.lyrCursor[r].setVisible(!0),e.featureLyrCursor[r].setGeometry({type:"Point",coordinates:o.coordinate}))}))}))}},{key:"removeMaps",value:function(){this.mapL.B=null,this.mapL.C=null,this.mapL.D=null}},{key:"destroyMapsContainer",value:function(){document.getElementById("mapjsB").remove(),document.getElementById("mapjsC").remove(),document.getElementById("mapjsD").remove();var t=document.getElementById("lienzo"),e=document.getElementById("mapjs")||document.getElementById("map");e.style.display="block",e.classList.remove("mirror1"),document.body.insertBefore(e,t),document.getElementById("lienzo").remove()}},{key:"equals",value:function(t){return t instanceof i}}])&&g(e.prototype,o),r&&g(e,r),i}(),O=o(3);function B(t){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function j(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function S(t,e){for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{};j(this,i),(t=n.call(this)).name_="mirrorpanel",t.map_=null,t.controls_=[],t.className="m-plugin-mirrorpanel";var o=["TR","TL","BL","BR"];return t.position=o.includes(e.position)?e.position:"TR",t.collapsed=e.collapsed,void 0===t.collapsed&&(t.collapsed=!0),t.collapsible=e.collapsible,void 0===t.collapsible&&(t.collapsible=!0),t.modeViz=e.modeViz,void 0===t.modeViz&&(t.modeViz=0),t.enabledKeyFunctions=e.enabledKeyFunctions,void 0===t.enabledKeyFunctions&&(t.enabledKeyFunctions=!0),t.showCursors=e.showCursors,void 0===t.showCursors&&(t.showCursors=!0),t.mirrorLayers=[],void 0!==e.mirrorLayers&&(Array.isArray(e.mirrorLayers)?t.mirrorLayers=e.mirrorLayers:t.mirrorLayers=e.mirrorLayers.split(",")),t.defaultBaseLyrs=[],void 0!==e.defaultBaseLyrs&&(Array.isArray(e.defaultBaseLyrs)?t.defaultBaseLyrs=e.defaultBaseLyrs:t.defaultBaseLyrs=e.defaultBaseLyrs.split(",")),t.interface=void 0===e.interface||e.interface,t.showTOC=e.showTOC,void 0===t.showTOC&&(t.showTOC=!0),t.tooltip_=e.tooltip||b("tooltip"),t.metadata_=O.metadata,t}return e=i,(o=[{key:"addTo",value:function(t){var e=this,o={pluginOnLeft:!!["TL","BL"].includes(this.position),collapsible:this.collapsible,collapsed:this.collapsed,modeViz:this.modeViz,showCursors:this.showCursors,mirrorLayers:this.mirrorLayers,defaultBaseLyrs:this.defaultBaseLyrs,showTOC:this.showTOC};this.control_=new _(o),this.controls_.push(this.control_),this.map_=t,this.panel_=new M.ui.Panel("panelMirrorpanel",{collapsible:this.collapsible,collapsed:this.collapsed,position:M.ui.position[this.position],modeViz:this.modeViz,showCursors:this.showCursors,className:this.interface?"m-plugin-panelMirrorpanel":"m-plugin-panelMirrorpanel hidden",collapsedButtonClass:"mirrorpanel-icon",tooltip:this.tooltip_}),this.panel_.addControls(this.controls_),t.addPanels(this.panel_),document.addEventListener("keydown",(function(t){if(e.enabledKeyFunctions){for(var o=0;o<10;o++)t.ctrlKey&&t.shiftKey&&t.key==="F"+(o+1)&&e.control_.manageVisionPanelByCSSGrid(o);var r=["Control","Shift","Alt","Meta"].includes(t.key)?"":t.key;"Escape"==(t.ctrlKey?"Control ":"")+(t.shiftKey?"Shift ":"")+(t.altKey?"Alt ":"")+(t.metaKey?"Meta ":"")+r&&e.control_.manageVisionPanelByCSSGrid(0)}}))}},{key:"destroy",value:function(){document.removeEventListener("keydown",(function(t){})),this.control_.removeMaps(),this.control_.destroyMapsContainer(),this.map_.removeControls([this.control_]);var t=[null,null,null,null,null,null,null,null,null,null,null,null];this.control_=t[0],this.panel_=t[1],this.map_=t[2],this.collapsible=t[3],this.collapsed=t[4],this.modeViz=t[5],this.enabledKeyFunctions=t[6],this.showCursors=t[7],this.mirrorLayers=t[8],this.defaultBaseLyrs=t[9],this.interface=t[10],this.showTOC=t[11]}},{key:"getMetadata",value:function(){return this.metadata_}},{key:"getAPIRest",value:function(){return"".concat(this.name,"=").concat(this.position,"*!").concat(this.collapsed,"*!").concat(this.collapsible,"*!").concat(this.modeViz,"*!").concat(this.enabledKeyFunctions,"*!").concat(this.showCursors,"*!").concat(this.mirrorLayers,"*!").concat(this.defaultBaseLyrs,"*!").concat(this.interface,"*!").concat(this.showTOC)}},{key:"activate",value:function(){this.control_.activate()}},{key:"deactivate",value:function(){this.control_.deactivate()}},{key:"name",get:function(){return this.name_}}])&&S(e.prototype,o),r&&S(e,r),i}();window.M.plugin||(window.M.plugin={}),window.M.control||(window.M.control={}),window.M.impl||(window.M.impl={}),window.M.impl.control||(window.M.impl.control={}),window.M.plugin.Mirrorpanel=R,window.M.control.MirrorpanelControl=_,window.M.impl.control.MirrorpanelControl=p}]);
//# sourceMappingURL=mirrorpanel.ol.min.js.map
\ No newline at end of file
diff --git a/dist/mirrorpanel.ol.min.js.map b/dist/mirrorpanel.ol.min.js.map
index 91e22a8..b18c62d 100644
--- a/dist/mirrorpanel.ol.min.js.map
+++ b/dist/mirrorpanel.ol.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/templates/mirrorpanel.html","webpack:///./src/impl/ol/js/mirrorpanelcontrol.js","webpack:///./src/facade/js/i18n/language.js","webpack:///./src/facade/js/mirrorpanelcontrol.js","webpack:///./src/facade/js/mirrorpanel.js","webpack:///./src/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","MirrorpanelControl","M","impl","Control","map","html","getMapImpl","getInteractions","forEach","interaction","ol","DoubleClickZoom","dblClickInteraction_","translations","en","es","getLang","res","language","getTranslation","lang","getValue","keyPath","translation","utils","isNullOrEmpty","console","warn","split","reduce","prev","current","values","isUndefined","MirrorpanelImplControl","exception","template","modeViz","showCursors","mapL","A","B","C","D","lyrCursor","featureLyrCursor","styleCursor","style","Point","icon","form","CIRCLE","fontsize","radius","rotation","rotate","offset","color","fill","gradientcolor","opacity","defaultBaseLyrs","mirrorLayers","createMapContainers","compileSync","string","options","parseToHtml","templateVars","vars","htmlText","Handlebars","compile","templateFn","stringToHtml","this","addLayerCursor","Promise","success","fail","templateOptions","jsonp","title","getValueTranslate","modViz0","modViz1","modViz2","modViz3","modViz4","modViz5","modViz6","modViz7","modViz8","modViz9","querySelectorAll","button","addEventListener","evt","manageVisionPanelByCSSGrid","bigContainer","document","createElement","id","classList","add","mapjsA","getElementById","body","insertBefore","appendChild","mapjsB","mapjsC","mapjsD","oldModeViz","display","querySelector","remove","includes","createMapObjects","map_","refresh","mapLyr","defLyr","getLayers","setMap","container","layers","center","getCenter","projection","getProjection","code","units","zoom","getZoom","setView","getView","layer","Vector","displayInLayerSwitcher","Feature","type","properties","geometry","coordinates","addFeatures","setStyle","setZIndex","addLayers","on","event","setVisible","keys","k","setGeometry","coordinate","lienzo","control","Mirrorpanel","Plugin","name_","controls_","className","positions","position","collapsed","undefined","collapsible","enabledKeyFunctions","Array","isArray","tooltip_","tooltip","metadata_","api","metadata","pluginOnLeft","control_","push","panel_","ui","Panel","collapsedButtonClass","addControls","addPanels","zEvent","ctrlKey","shiftKey","keyStr","altKey","metaKey","removeEventListener","removeMaps","destroyMapsContainer","removeControls","activate","deactivate","window","plugin","M$plugin$Mirrorpanel","M$control$MirrorpanelControl","M$impl$control$MirrorpanelControl"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,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MmM,OAAOpM,EAAEC,KAAO,IAC/BmM,OAAOpM,EAAEC,KAAK2J,UAASwC,OAAOpM,EAAEC,KAAK2J,QAAU,IACpDwC,OAAOpM,EAAEqM,OAAOxC,YAAcyC,EAC9BF,OAAOpM,EAAE4J,QAAQ7J,mBAAqBwM,EACtCH,OAAOpM,EAAEC,KAAK2J,QAAQ7J,mBAAqByM","file":"mirrorpanel.ol.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n","module.exports = \"
\\r\\n
{{translations.title}}
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n\\r\\n
\\r\\n\";","/**\r\n * @module M/impl/control/MirrorpanelControl\r\n */\r\nexport default class MirrorpanelControl extends M.impl.Control {\r\n /**\r\n * This function adds the control to the specified map\r\n *\r\n * @public\r\n * @function\r\n * @param {M.Map} map to add the plugin\r\n * @param {HTMLElement} html of the plugin\r\n * @api stable\r\n */\r\n addTo(map, html) {\r\n // obtengo la interacción por defecto del dblclick para manejarla\r\n const olMap = map.getMapImpl();\r\n olMap.getInteractions().forEach((interaction) => {\r\n if (interaction instanceof ol.interaction.DoubleClickZoom) {\r\n this.dblClickInteraction_ = interaction;\r\n }\r\n });\r\n super.addTo(map, html);\r\n }\r\n}\r\n","import en from './en';\nimport es from './es';\n\n/**\n * Default object with es and en translate.\n *\n * @const\n * @type {object}\n */\nconst translations = {\n en,\n es,\n};\n\nconst getLang = () => {\n let res = 'es';\n if (typeof M.language.getLang === 'function') {\n res = M.language.getLang();\n }\n\n return res;\n};\n\n/**\n * This function sets a new language translate.\n * @param {string} lang\n * @param {JSON} json\n * @public\n * @api\n */\nexport const addTranslation = (lang, json) => {\n translations[lang] = json;\n};\n\n/**\n * This function gets a language translate.\n *\n * @param {string} lang\n * @return {JSON}\n * @public\n * @api\n */\nexport const getTranslation = (lang) => {\n return translations[lang];\n};\n\n/**\n * This function gets a language value from key\n *\n * @public\n * @param {string}\n * @param {string}\n * @return {string}\n * @public\n * @api\n */\n\nexport const getValue = (keyPath, lang = getLang()) => {\n const translation = getTranslation(lang);\n let value = '';\n if (M.utils.isNullOrEmpty(translation)) {\n /* eslint-disable no-console */\n console.warn(`The translation '${lang}' has not been defined.`);\n } else {\n value = keyPath.split('.').reduce((prev, current) => prev[current], translation);\n }\n\n return value;\n};\n","/**\r\n * @module M/control/MirrorpanelControl\r\n */\r\n\r\nimport MirrorpanelImplControl from 'impl/mirrorpanelcontrol';\r\nimport template from 'templates/mirrorpanel';\r\nimport { getValue as getValueTranslate } from './i18n/language';\r\n\r\nexport default class MirrorpanelControl extends M.Control {\r\n /**\r\n * @classdesc\r\n * Main constructor of the class. Creates a PluginControl\r\n * control\r\n *\r\n * @constructor\r\n * @extends {M.Control}\r\n * @api stable\r\n */\r\n constructor(values) {\r\n // 1. checks if the implementation can create PluginControl\r\n if (M.utils.isUndefined(MirrorpanelImplControl)) {\r\n M.exception('La implementación usada no puede crear controles MirrorpanelControl');\r\n }\r\n // 2. implementation of this control\r\n const impl = new MirrorpanelImplControl();\r\n super(impl, 'Mirrorpanel');\r\n\r\n /**\r\n * Template\r\n * @public\r\n * @type { HTMLElement }\r\n */\r\n this.template = null;\r\n\r\n /**\r\n * Visual mode\r\n * @private\r\n * @type {Number}\r\n */\r\n this.modeViz = values.modeViz;\r\n\r\n /**\r\n * Mirror maps with plugins\r\n * @private\r\n * @type {boolean}\r\n */\r\n this.showCursors = values.showCursors;\r\n\r\n /**\r\n * Defining mirror maps variables\r\n */\r\n this.mapL = {\r\n A: null,\r\n B: null,\r\n C: null,\r\n D: null,\r\n }\r\n this.lyrCursor = {\r\n A: null,\r\n B: null,\r\n C: null,\r\n D: null,\r\n }\r\n this.featureLyrCursor = {\r\n A: null,\r\n B: null,\r\n C: null,\r\n D: null,\r\n }\r\n\r\n /**\r\n * Defining cursor style\r\n */\r\n this.styleCursor = new M.style.Point({\r\n icon: {\r\n form: M.style.form.CIRCLE,\r\n fontsize: 0.5,\r\n radius: 5,\r\n rotation: 0,\r\n rotate: false,\r\n offset: [0, 0],\r\n color: 'black',\r\n fill: 'red',\r\n gradientcolor: '#088A85',\r\n opacity: 0.8\r\n }\r\n });\r\n\r\n /**\r\n * Default layers for mirror maps\r\n * @public\r\n * @public {Array}\r\n */\r\n this.defaultBaseLyrs = values.defaultBaseLyrs;\r\n\r\n /**\r\n * All layers\r\n * @public\r\n * @public {Array}\r\n */\r\n this.mirrorLayers = values.mirrorLayers;\r\n\r\n this.createMapContainers();\r\n }\r\n\r\n\r\n /**\r\n * This function creates the view\r\n *\r\n * @public\r\n * @function\r\n * @param {M.Map} map to add the control\r\n * @api stable\r\n */\r\n createView(map) {\r\n if (!M.template.compileSync) {\r\n M.template.compileSync = (string, options) => {\r\n let templateCompiled;\r\n let templateVars = {};\r\n let parseToHtml;\r\n if (!M.utils.isUndefined(options)) {\r\n templateVars = M.utils.extends(templateVars, options.vars);\r\n parseToHtml = options.parseToHtml;\r\n }\r\n const templateFn = Handlebars.compile(string);\r\n const htmlText = templateFn(templateVars);\r\n if (parseToHtml !== false) {\r\n templateCompiled = M.utils.stringToHtml(htmlText);\r\n } else {\r\n templateCompiled = htmlText;\r\n }\r\n return templateCompiled;\r\n };\r\n }\r\n\r\n this.mapL['A'] = map;\r\n\r\n if (this.showCursors) { this.addLayerCursor('A'); }\r\n return new Promise((success, fail) => {\r\n let templateOptions = '';\r\n templateOptions = {\r\n jsonp: true,\r\n vars: {\r\n translations: {\r\n title: getValueTranslate('title'),\r\n modViz0: getValueTranslate('modViz0'),\r\n modViz1: getValueTranslate('modViz1'),\r\n modViz2: getValueTranslate('modViz2'),\r\n modViz3: getValueTranslate('modViz3'),\r\n modViz4: getValueTranslate('modViz4'),\r\n modViz5: getValueTranslate('modViz5'),\r\n modViz6: getValueTranslate('modViz6'),\r\n modViz7: getValueTranslate('modViz7'),\r\n modViz8: getValueTranslate('modViz8'),\r\n modViz9: getValueTranslate('modViz9')\r\n }\r\n }\r\n };\r\n\r\n this.template = M.template.compileSync(template, templateOptions);\r\n\r\n // Button's click events\r\n this.template.querySelectorAll('button[id^=\"set-mirror-\"]')\r\n .forEach((button, modeViz) => {\r\n button.addEventListener('click', evt => {\r\n this.manageVisionPanelByCSSGrid(modeViz);\r\n })\r\n });\r\n\r\n // Apply default vision\r\n this.manageVisionPanelByCSSGrid(this.modeViz);\r\n success(this.template);\r\n });\r\n\r\n }\r\n\r\n /**\r\n * This function is called on the control activation\r\n *\r\n * @public\r\n * @function\r\n * @api stable\r\n */\r\n activate() {\r\n super.activate();\r\n }\r\n /**\r\n * This function is called on the control deactivation\r\n *\r\n * @public\r\n * @function\r\n * @api stable\r\n */\r\n deactivate() {\r\n super.deactivate();\r\n }\r\n\r\n /**\r\n * Initial configurations for applying CSS grid.\r\n * \r\n */\r\n createMapContainers() {\r\n const bigContainer = document.createElement('div');\r\n bigContainer.id = \"lienzo\";\r\n bigContainer.classList.add('mirrorpanel-grid');\r\n\r\n const mapjsA = document.getElementById(\"mapjs\") || document.getElementById(\"map\");\r\n document.body.insertBefore(bigContainer, mapjsA);\r\n mapjsA.classList.add('mirror1');\r\n bigContainer.appendChild(mapjsA);\r\n\r\n const mapjsB = document.createElement('div');\r\n mapjsB.id = \"mapjsB\";\r\n mapjsB.classList.add('mirror2');\r\n bigContainer.appendChild(mapjsB);\r\n\r\n const mapjsC = document.createElement('div');\r\n mapjsC.id = \"mapjsC\";\r\n mapjsC.classList.add('mirror3');\r\n bigContainer.appendChild(mapjsC);\r\n\r\n const mapjsD = document.createElement('div');\r\n mapjsD.id = \"mapjsD\";\r\n mapjsD.classList.add('mirror4');\r\n bigContainer.appendChild(mapjsD);\r\n }\r\n\r\n /**\r\n * This function shows/hides panel for differents viz options.\r\n * The mirror maps are launched from here\r\n * \r\n */\r\n manageVisionPanelByCSSGrid(modeViz) {\r\n let oldModeViz = this.modeViz;\r\n let map0 = document.getElementById('mapjs') || document.getElementById('map');\r\n map0.style.display = 'none';\r\n document.getElementById('mapjsB').style.display = 'none';\r\n document.getElementById('mapjsC').style.display = 'none';\r\n document.getElementById('mapjsD').style.display = 'none';\r\n this.template.querySelector('#set-mirror-' + oldModeViz).classList.remove('buttom-pressed');\r\n\r\n for (let i = 0; i < 10; i++) {\r\n document.getElementById('lienzo').classList.remove('modeViz' + i);\r\n }\r\n document.getElementById('lienzo').classList.add('modeViz' + modeViz);\r\n\r\n //Create map objects by modeviz\r\n if ([1, 2].includes(modeViz)) {\r\n if (this.mapL['B'] == null) {\r\n this.createMapObjects('B');//Create MapB\r\n }\r\n }\r\n if ([3, 7, 8, 9].includes(modeViz)) {\r\n if (this.mapL['B'] == null) {\r\n this.createMapObjects('B');//Create MapB\r\n }\r\n if (this.mapL['C'] == null) {\r\n this.createMapObjects('C');//Create MapC\r\n }\r\n }\r\n if ([4, 5, 6].includes(modeViz)) {\r\n if (this.mapL['B'] == null) {\r\n this.createMapObjects('B');//Create MapB\r\n }\r\n if (this.mapL['C'] == null) {\r\n this.createMapObjects('C');//Create MapC\r\n }\r\n if (this.mapL['D'] == null) {\r\n this.createMapObjects('D');//Create MapD\r\n }\r\n }\r\n\r\n this.modeViz = modeViz;\r\n this.template.querySelector('#set-mirror-' + modeViz).classList.add('buttom-pressed');\r\n this.map_.refresh();\r\n if (this.mapL['B'] !== null) { this.mapL['B'].refresh(); }\r\n if (this.mapL['C'] !== null) { this.mapL['C'].refresh(); }\r\n if (this.mapL['D'] !== null) { this.mapL['D'].refresh(); }\r\n }\r\n\r\n /**\r\n * Create mirror map object synchro with the main map\r\n */\r\n createMapObjects(mapLyr) {\r\n let defLyr = null;\r\n switch (mapLyr) {\r\n case 'B':\r\n if (this.defaultBaseLyrs[1]) defLyr = this.defaultBaseLyrs[0];\r\n break;\r\n case 'C':\r\n if (this.defaultBaseLyrs[2]) defLyr = this.defaultBaseLyrs[1];\r\n break;\r\n case 'D':\r\n if (this.defaultBaseLyrs[3]) defLyr = this.defaultBaseLyrs[2];\r\n break;\r\n default:\r\n defLyr = this.map_.getLayers()[0].setMap(this);\r\n break;\r\n }\r\n this.mapL[mapLyr] = M.map({\r\n container: 'mapjs' + mapLyr,\r\n layers: defLyr,\r\n center: this.map_.getCenter(),\r\n projection: this.map_.getProjection().code + '*' + this.map_.getProjection().units,\r\n zoom: this.map_.getZoom(),\r\n });\r\n this.mapL[mapLyr].getMapImpl().setView(this.map_.getMapImpl().getView());\r\n\r\n if (this.showCursors) { this.addLayerCursor(mapLyr); }\r\n this.mapL[mapLyr].refresh();\r\n }\r\n\r\n /**\r\n * Adding a layer for cursor on Map\r\n */\r\n addLayerCursor(mapLyr) {\r\n // Cursor Layer\r\n this.lyrCursor[mapLyr] = new M.layer.Vector({\r\n name: 'Coordenadas centro ' + mapLyr,\r\n }, { displayInLayerSwitcher: false });\r\n\r\n this.featureLyrCursor[mapLyr] = new M.Feature('Center' + mapLyr, {\r\n type: 'Feature',\r\n properties: {},\r\n geometry: {\r\n type: 'Point',\r\n coordinates: this.mapL[mapLyr].getCenter(),\r\n },\r\n });\r\n\r\n this.lyrCursor[mapLyr].addFeatures([this.featureLyrCursor[mapLyr]]);\r\n this.lyrCursor[mapLyr].setStyle(this.styleCursor);\r\n this.lyrCursor[mapLyr].setZIndex(5000);\r\n this.mapL[mapLyr].addLayers(this.lyrCursor[mapLyr]);\r\n\r\n this.mapL[mapLyr].getMapImpl().on('pointermove', (event) => {\r\n this.lyrCursor[mapLyr].setVisible(false);\r\n Object.keys(this.featureLyrCursor).forEach(k => {\r\n if (this.mapL[k]) {\r\n this.mapL[k].getMapImpl().setView(this.mapL[mapLyr].getMapImpl().getView());\r\n }\r\n if (k != mapLyr) {\r\n if (this.featureLyrCursor[k] !== null) {\r\n this.lyrCursor[k].setVisible(true);\r\n this.featureLyrCursor[k].setGeometry({\r\n type: 'Point',\r\n coordinates: event.coordinate,\r\n });\r\n }\r\n }\r\n })\r\n });\r\n\r\n }\r\n\r\n /**\r\n * This function is called to remove the effects\r\n *\r\n * @public\r\n * @function\r\n * @api stable\r\n */\r\n removeMaps() {\r\n this.mapL['B'] = null;\r\n this.mapL['C'] = null;\r\n this.mapL['D'] = null;\r\n }\r\n\r\n destroyMapsContainer() {\r\n // Remove mirrors containers\r\n document.getElementById(\"mapjsB\").remove();\r\n document.getElementById(\"mapjsC\").remove();\r\n document.getElementById(\"mapjsD\").remove();\r\n\r\n // Take the main map out of the container\r\n const lienzo = document.getElementById(\"lienzo\");\r\n const mapjsA = document.getElementById(\"mapjs\") || document.getElementById(\"map\");\r\n mapjsA.style.display = \"block\";\r\n mapjsA.classList.remove('mirror1');\r\n document.body.insertBefore(mapjsA, lienzo);\r\n\r\n // Load the main container\r\n document.getElementById(\"lienzo\").remove();\r\n }\r\n\r\n /**\r\n * This function compares controls\r\n *\r\n * @public\r\n * @function\r\n * @param {M.Control} control to compare\r\n * @api stable\r\n */\r\n equals(control) {\r\n return control instanceof MirrorpanelControl;\r\n }\r\n}\r\n","/**\r\n * @module M/plugin/Mirrorpanel\r\n */\r\nimport 'assets/css/mirrorpanel';\r\nimport MirrorpanelControl from './mirrorpanelcontrol';\r\nimport api from '../../api';\r\nimport { getValue } from './i18n/language'; //e2m: Multilanguage support\r\n\r\nexport default class Mirrorpanel extends M.Plugin {\r\n /**\r\n * @classdesc\r\n * Main facade plugin object. This class creates a plugin\r\n * object which has an implementation Object\r\n *\r\n * @constructor\r\n * @extends {M.Plugin}\r\n * @param {Object} impl implementation object\r\n * @api stable\r\n */\r\n constructor(options = {}) {\r\n super();\r\n\r\n /**\r\n * Name plugin\r\n * @private\r\n * @type {String}\r\n */\r\n this.name_ = 'mirrorpanel';\r\n\r\n /**\r\n * Facade of the map\r\n * @private\r\n * @type {M.Map}\r\n */\r\n this.map_ = null;\r\n\r\n /**\r\n * Array of controls\r\n * @private\r\n * @type {Array}\r\n */\r\n this.controls_ = [];\r\n\r\n /**\r\n * Class name of the html view Plugin\r\n * @public\r\n * @type {string}\r\n */\r\n this.className = 'm-plugin-mirrorpanel';\r\n\r\n /**\r\n * Position of the Plugin\r\n * @public\r\n * Posible values: TR | TL | BL | BR\r\n * @type {String}\r\n */\r\n const positions = ['TR', 'TL', 'BL', 'BR'];\r\n this.position = positions.includes(options.position) ? options.position : 'TR';\r\n\r\n /**\r\n * Collapsed attribute\r\n * @public\r\n * @type {boolean}\r\n */\r\n this.collapsed = options.collapsed;\r\n if (this.collapsed === undefined) this.collapsed = true;\r\n\r\n /**\r\n * Collapsible attribute\r\n * @public\r\n * @type {boolean}\r\n */\r\n this.collapsible = options.collapsible;\r\n if (this.collapsible === undefined) this.collapsible = true;\r\n\r\n /**\r\n * Modo de visualización\r\n * Value: number in range 0 - 9\r\n * @type {number}\r\n * @public\r\n */\r\n this.modeViz = options.modeViz;\r\n if (this.modeViz === undefined) this.modeViz = 0;\r\n\r\n /**\r\n * Enabled key functions\r\n * @type {boolean}\r\n * @public\r\n */\r\n this.enabledKeyFunctions = options.enabledKeyFunctions;\r\n if (this.enabledKeyFunctions === undefined) this.enabledKeyFunctions = true;\r\n\r\n /**\r\n * Enabled synchro cursors\r\n * @type {boolean}\r\n * @public\r\n */\r\n this.showCursors = options.showCursors;\r\n if (this.showCursors === undefined) this.showCursors = true;\r\n\r\n /**\r\n * Layer names that will have effects\r\n * @public\r\n * Value: the names separated with coma\r\n * @type {string}\r\n */\r\n\r\n this.mirrorLayers = [];\r\n if (options.mirrorLayers !== undefined) {\r\n if (Array.isArray(options.mirrorLayers)) {\r\n this.mirrorLayers = options.mirrorLayers;\r\n } else {\r\n this.mirrorLayers = options.mirrorLayers.split(\",\");\r\n }\r\n }\r\n\r\n /**\r\n * Layer base for the three mirror maps\r\n * @public\r\n * Value: the names separated with coma\r\n * @type {string}\r\n */\r\n\r\n this.defaultBaseLyrs = [];\r\n if (options.defaultBaseLyrs !== undefined) {\r\n if (Array.isArray(options.defaultBaseLyrs)) {\r\n this.defaultBaseLyrs = options.defaultBaseLyrs;\r\n } else {\r\n this.defaultBaseLyrs = options.defaultBaseLyrs.split(\",\");\r\n }\r\n }\r\n\r\n /** \r\n * Show interface\r\n *@public\r\n *@type{boolean}\r\n */\r\n this.interface = options.interface === undefined ? true : options.interface;\r\n\r\n\r\n /**\r\n *@private\r\n *@type { string }\r\n */\r\n this.tooltip_ = options.tooltip || getValue('tooltip');\r\n\r\n\r\n /**\r\n * Metadata from api.json\r\n * @private\r\n * @type {Object}\r\n */\r\n this.metadata_ = api.metadata;\r\n }\r\n\r\n /**\r\n * This function adds this plugin into the map\r\n *\r\n * @public\r\n * @function\r\n * @param {M.Map} map the map to add the plugin\r\n * @api stable\r\n */\r\n addTo(map) {\r\n const pluginOnLeft = !!(['TL', 'BL'].includes(this.position));\r\n\r\n const values = {\r\n pluginOnLeft,\r\n collapsible: this.collapsible,\r\n collapsed: this.collapsed,\r\n modeViz: this.modeViz,\r\n showCursors: this.showCursors,\r\n mirrorLayers: this.mirrorLayers,\r\n defaultBaseLyrs: this.defaultBaseLyrs,\r\n };\r\n\r\n this.control_ = new MirrorpanelControl(values);\r\n this.controls_.push(this.control_);\r\n this.map_ = map;\r\n\r\n this.panel_ = new M.ui.Panel('panelMirrorpanel', {\r\n collapsible: this.collapsible,\r\n collapsed: this.collapsed,\r\n position: M.ui.position[this.position],\r\n modeViz: this.modeViz,\r\n showCursors: this.showCursors,\r\n className: this.interface ? 'm-plugin-panelMirrorpanel' : 'm-plugin-panelMirrorpanel hidden',\r\n collapsedButtonClass: 'mirrorpanel-icon',\r\n tooltip: this.tooltip_,\r\n });\r\n this.panel_.addControls(this.controls_);\r\n map.addPanels(this.panel_);\r\n\r\n // Keybindings for Ctrl + Shift + (F1-F8) / ESC\r\n document.addEventListener('keydown', (zEvent) => {\r\n if (!this.enabledKeyFunctions) {\r\n return;\r\n }\r\n for (let i = 0; i < 10; i++) {\r\n if (zEvent.ctrlKey && zEvent.shiftKey && zEvent.key === \"F\" + (i + 1)) { // case sensitive\r\n this.control_.manageVisionPanelByCSSGrid(i);\r\n }\r\n }\r\n var keyStr = [\"Control\", \"Shift\", \"Alt\", \"Meta\"].includes(zEvent.key) ? \"\" : zEvent.key;\r\n\r\n var combinedKeys = (zEvent.ctrlKey ? \"Control \" : \"\") +\r\n (zEvent.shiftKey ? \"Shift \" : \"\") +\r\n (zEvent.altKey ? \"Alt \" : \"\") +\r\n (zEvent.metaKey ? \"Meta \" : \"\") + keyStr;\r\n if (combinedKeys === \"Escape\") {\r\n this.control_.manageVisionPanelByCSSGrid(0);\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n /**\r\n * This function destroys this plugin\r\n *\r\n * @public\r\n * @function\r\n * @api stable\r\n */\r\n destroy() {\r\n document.removeEventListener('keydown', (zEvent) => { });\r\n this.control_.removeMaps();\r\n this.control_.destroyMapsContainer();\r\n this.map_.removeControls([this.control_]);\r\n [this.control_, this.panel_, this.map_, this.collapsible, this.collapsed, this.modeViz, this.enabledKeyFunctions, this.showCursors, this.mirrorLayers, this.defaultBaseLyrs, this.interface] = [null, null, null, null, null, null, null, null, null, null, null];\r\n }\r\n\r\n /**\r\n * This function gets name plugin\r\n * @getter\r\n * @public\r\n * @returns {string}\r\n * @api stable\r\n */\r\n get name() {\r\n return this.name_;\r\n }\r\n\r\n /**\r\n * This function gets metadata plugin\r\n *\r\n * @public\r\n * @function\r\n * @api stable\r\n */\r\n getMetadata() {\r\n return this.metadata_;\r\n }\r\n\r\n /**\r\n * Get the API REST Parameters of the plugin\r\n *\r\n * @function\r\n * @public\r\n * @api\r\n */\r\n getAPIRest() {\r\n return `${this.name}=${this.position}*!${this.collapsed}*!${this.collapsible}*!${this.modeViz}*!${this.enabledKeyFunctions}*!${this.showCursors}*!${this.mirrorLayers}*!${this.defaultBaseLyrs}*!${this.interface}`;\r\n }\r\n\r\n /**\r\n * Activate plugin\r\n *\r\n * @function\r\n * @public\r\n * @api\r\n */\r\n activate() {\r\n this.control_.activate();\r\n }\r\n\r\n /**\r\n * Desactivate plugin\r\n *\r\n * @function\r\n * @public\r\n * @api\r\n */\r\n deactivate() {\r\n this.control_.deactivate();\r\n }\r\n\r\n\r\n}\r\n","import M$plugin$Mirrorpanel from '/home/irenevinas/m5/mapea-publico/src/plugins/v5/mirrorpanel/src/facade/js/mirrorpanel';\nimport M$control$MirrorpanelControl from '/home/irenevinas/m5/mapea-publico/src/plugins/v5/mirrorpanel/src/facade/js/mirrorpanelcontrol';\nimport M$impl$control$MirrorpanelControl from '/home/irenevinas/m5/mapea-publico/src/plugins/v5/mirrorpanel/src/impl/ol/js/mirrorpanelcontrol';\n\nif (!window.M.plugin) window.M.plugin = {};\nif (!window.M.control) window.M.control = {};\nif (!window.M.impl) window.M.impl = {};\nif (!window.M.impl.control) window.M.impl.control = {};\nwindow.M.plugin.Mirrorpanel = M$plugin$Mirrorpanel;\nwindow.M.control.MirrorpanelControl = M$control$MirrorpanelControl;\nwindow.M.impl.control.MirrorpanelControl = M$impl$control$MirrorpanelControl;\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/templates/mirrorpanel.html","webpack:///./src/impl/ol/js/mirrorpanelcontrol.js","webpack:///./src/facade/js/i18n/language.js","webpack:///./src/facade/js/mirrorpanelcontrol.js","webpack:///./src/facade/js/mirrorpanel.js","webpack:///./src/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","MirrorpanelControl","M","impl","Control","map","html","getMapImpl","getInteractions","forEach","interaction","ol","DoubleClickZoom","dblClickInteraction_","translations","en","es","getLang","res","language","getTranslation","lang","getValue","keyPath","translation","utils","isNullOrEmpty","console","warn","split","reduce","prev","current","values","isUndefined","MirrorpanelImplControl","exception","template","modeViz","showCursors","mapL","A","B","C","D","lyrCursor","featureLyrCursor","styleCursor","style","Point","icon","form","CIRCLE","fontsize","radius","rotation","rotate","offset","color","fill","gradientcolor","opacity","defaultBaseLyrs","mirrorLayers","showTOC","createMapContainers","compileSync","string","options","parseToHtml","templateVars","vars","htmlText","Handlebars","compile","templateFn","stringToHtml","this","length","addLayers","getLayers","zindex_","setVisible","addLayerCursor","Promise","success","fail","templateOptions","jsonp","title","getValueTranslate","modViz0","modViz1","modViz2","modViz3","modViz4","modViz5","modViz6","modViz7","modViz8","modViz9","querySelectorAll","button","addEventListener","evt","manageVisionPanelByCSSGrid","bigContainer","document","createElement","id","classList","add","mapjsA","getElementById","body","insertBefore","appendChild","mapjsB","mapjsC","mapjsD","oldModeViz","display","querySelector","remove","includes","createMapObjects","map_","refresh","mapLyr","defLyr","setMap","container","layers","controls","center","getCenter","projection","getProjection","code","units","zoom","getZoom","setView","getView","layer","Vector","displayInLayerSwitcher","Feature","type","properties","geometry","coordinates","addFeatures","setStyle","setZIndex","on","event","keys","k","setGeometry","coordinate","lienzo","control","Mirrorpanel","Plugin","name_","controls_","className","positions","position","collapsed","undefined","collapsible","enabledKeyFunctions","Array","isArray","tooltip_","tooltip","metadata_","api","metadata","pluginOnLeft","control_","push","panel_","ui","Panel","collapsedButtonClass","addControls","addPanels","zEvent","ctrlKey","shiftKey","keyStr","altKey","metaKey","removeEventListener","removeMaps","destroyMapsContainer","removeControls","activate","deactivate","window","plugin","M$plugin$Mirrorpanel","M$control$MirrorpanelControl","M$impl$control$MirrorpanelControl"],"mappings":"aACE,IAAIA,E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A+HhG,KAAKtC,YAApI,aAAoJsC,KAAKd,aAAzJ,aAA0Kc,KAAKf,gBAA/K,aAAmMe,KAAA,UAAnM,aAAsNA,KAAKb,W,iCAW3Na,KAAKyG,SAASkB,a,mCAWd3H,KAAKyG,SAASmB,e,2BA5Cd,OAAO5H,KAAKwF,W,gCCrPXqC,OAAOxM,EAAEyM,SAAQD,OAAOxM,EAAEyM,OAAS,IACnCD,OAAOxM,EAAEgK,UAASwC,OAAOxM,EAAEgK,QAAU,IACrCwC,OAAOxM,EAAEC,OAAMuM,OAAOxM,EAAEC,KAAO,IAC/BuM,OAAOxM,EAAEC,KAAK+J,UAASwC,OAAOxM,EAAEC,KAAK+J,QAAU,IACpDwC,OAAOxM,EAAEyM,OAAOxC,YAAcyC,EAC9BF,OAAOxM,EAAEgK,QAAQjK,mBAAqB4M,EACtCH,OAAOxM,EAAEC,KAAK+J,QAAQjK,mBAAqB6M","file":"mirrorpanel.ol.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n","module.exports = \"
\\r\\n
{{translations.title}}
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n\\r\\n
\\r\\n\";","/**\r\n * @module M/impl/control/MirrorpanelControl\r\n */\r\nexport default class MirrorpanelControl extends M.impl.Control {\r\n /**\r\n * This function adds the control to the specified map\r\n *\r\n * @public\r\n * @function\r\n * @param {M.Map} map to add the plugin\r\n * @param {HTMLElement} html of the plugin\r\n * @api stable\r\n */\r\n addTo(map, html) {\r\n // obtengo la interacción por defecto del dblclick para manejarla\r\n const olMap = map.getMapImpl();\r\n olMap.getInteractions().forEach((interaction) => {\r\n if (interaction instanceof ol.interaction.DoubleClickZoom) {\r\n this.dblClickInteraction_ = interaction;\r\n }\r\n });\r\n super.addTo(map, html);\r\n }\r\n}\r\n","import en from './en';\nimport es from './es';\n\n/**\n * Default object with es and en translate.\n *\n * @const\n * @type {object}\n */\nconst translations = {\n en,\n es,\n};\n\nconst getLang = () => {\n let res = 'es';\n if (typeof M.language.getLang === 'function') {\n res = M.language.getLang();\n }\n\n return res;\n};\n\n/**\n * This function sets a new language translate.\n * @param {string} lang\n * @param {JSON} json\n * @public\n * @api\n */\nexport const addTranslation = (lang, json) => {\n translations[lang] = json;\n};\n\n/**\n * This function gets a language translate.\n *\n * @param {string} lang\n * @return {JSON}\n * @public\n * @api\n */\nexport const getTranslation = (lang) => {\n return translations[lang];\n};\n\n/**\n * This function gets a language value from key\n *\n * @public\n * @param {string}\n * @param {string}\n * @return {string}\n * @public\n * @api\n */\n\nexport const getValue = (keyPath, lang = getLang()) => {\n const translation = getTranslation(lang);\n let value = '';\n if (M.utils.isNullOrEmpty(translation)) {\n /* eslint-disable no-console */\n console.warn(`The translation '${lang}' has not been defined.`);\n } else {\n value = keyPath.split('.').reduce((prev, current) => prev[current], translation);\n }\n\n return value;\n};\n","/**\r\n * @module M/control/MirrorpanelControl\r\n */\r\n\r\nimport MirrorpanelImplControl from 'impl/mirrorpanelcontrol';\r\nimport template from 'templates/mirrorpanel';\r\nimport { getValue as getValueTranslate } from './i18n/language';\r\n\r\nexport default class MirrorpanelControl extends M.Control {\r\n /**\r\n * @classdesc\r\n * Main constructor of the class. Creates a PluginControl\r\n * control\r\n *\r\n * @constructor\r\n * @extends {M.Control}\r\n * @api stable\r\n */\r\n constructor(values) {\r\n // 1. checks if the implementation can create PluginControl\r\n if (M.utils.isUndefined(MirrorpanelImplControl)) {\r\n M.exception('La implementación usada no puede crear controles MirrorpanelControl');\r\n }\r\n // 2. implementation of this control\r\n const impl = new MirrorpanelImplControl();\r\n super(impl, 'Mirrorpanel');\r\n\r\n /**\r\n * Template\r\n * @public\r\n * @type { HTMLElement }\r\n */\r\n this.template = null;\r\n\r\n /**\r\n * Visual mode\r\n * @private\r\n * @type {Number}\r\n */\r\n this.modeViz = values.modeViz;\r\n\r\n /**\r\n * Mirror maps with plugins\r\n * @private\r\n * @type {boolean}\r\n */\r\n this.showCursors = values.showCursors;\r\n\r\n /**\r\n * Defining mirror maps variables\r\n */\r\n this.mapL = {\r\n A: null,\r\n B: null,\r\n C: null,\r\n D: null,\r\n }\r\n this.lyrCursor = {\r\n A: null,\r\n B: null,\r\n C: null,\r\n D: null,\r\n }\r\n this.featureLyrCursor = {\r\n A: null,\r\n B: null,\r\n C: null,\r\n D: null,\r\n }\r\n\r\n /**\r\n * Defining cursor style\r\n */\r\n this.styleCursor = new M.style.Point({\r\n icon: {\r\n form: M.style.form.CIRCLE,\r\n fontsize: 0.5,\r\n radius: 5,\r\n rotation: 0,\r\n rotate: false,\r\n offset: [0, 0],\r\n color: 'black',\r\n fill: 'red',\r\n gradientcolor: '#088A85',\r\n opacity: 0.8\r\n }\r\n });\r\n\r\n /**\r\n * Default layers for mirror maps\r\n * @public\r\n * @public {Array}\r\n */\r\n this.defaultBaseLyrs = values.defaultBaseLyrs;\r\n\r\n /**\r\n * All layers\r\n * @public\r\n * @public {Array}\r\n */\r\n this.mirrorLayers = values.mirrorLayers;\r\n\r\n /**\r\n * Enable layerswitcher control\r\n * @public\r\n * @public {Array}\r\n */\r\n this.showTOC = values.showTOC;\r\n\r\n this.createMapContainers();\r\n }\r\n\r\n\r\n /**\r\n * This function creates the view\r\n *\r\n * @public\r\n * @function\r\n * @param {M.Map} map to add the control\r\n * @api stable\r\n */\r\n createView(map) {\r\n if (!M.template.compileSync) {\r\n M.template.compileSync = (string, options) => {\r\n let templateCompiled;\r\n let templateVars = {};\r\n let parseToHtml;\r\n if (!M.utils.isUndefined(options)) {\r\n templateVars = M.utils.extends(templateVars, options.vars);\r\n parseToHtml = options.parseToHtml;\r\n }\r\n const templateFn = Handlebars.compile(string);\r\n const htmlText = templateFn(templateVars);\r\n if (parseToHtml !== false) {\r\n templateCompiled = M.utils.stringToHtml(htmlText);\r\n } else {\r\n templateCompiled = htmlText;\r\n }\r\n return templateCompiled;\r\n };\r\n }\r\n\r\n this.mapL['A'] = map;\r\n if (this.mirrorLayers.length > 0) {\r\n this.mapL['A'].addLayers(this.mirrorLayers);\r\n this.mapL['A'].getLayers().forEach((l) => {\r\n if (l.zindex_ !== 0) { l.setVisible(false); }\r\n });\r\n }\r\n if (this.showCursors) { this.addLayerCursor('A'); }\r\n return new Promise((success, fail) => {\r\n let templateOptions = '';\r\n templateOptions = {\r\n jsonp: true,\r\n vars: {\r\n translations: {\r\n title: getValueTranslate('title'),\r\n modViz0: getValueTranslate('modViz0'),\r\n modViz1: getValueTranslate('modViz1'),\r\n modViz2: getValueTranslate('modViz2'),\r\n modViz3: getValueTranslate('modViz3'),\r\n modViz4: getValueTranslate('modViz4'),\r\n modViz5: getValueTranslate('modViz5'),\r\n modViz6: getValueTranslate('modViz6'),\r\n modViz7: getValueTranslate('modViz7'),\r\n modViz8: getValueTranslate('modViz8'),\r\n modViz9: getValueTranslate('modViz9')\r\n }\r\n }\r\n };\r\n\r\n this.template = M.template.compileSync(template, templateOptions);\r\n\r\n // Button's click events\r\n this.template.querySelectorAll('button[id^=\"set-mirror-\"]')\r\n .forEach((button, modeViz) => {\r\n button.addEventListener('click', evt => {\r\n this.manageVisionPanelByCSSGrid(modeViz);\r\n })\r\n });\r\n\r\n // Apply default vision\r\n this.manageVisionPanelByCSSGrid(this.modeViz);\r\n success(this.template);\r\n });\r\n\r\n }\r\n\r\n /**\r\n * This function is called on the control activation\r\n *\r\n * @public\r\n * @function\r\n * @api stable\r\n */\r\n activate() {\r\n super.activate();\r\n }\r\n /**\r\n * This function is called on the control deactivation\r\n *\r\n * @public\r\n * @function\r\n * @api stable\r\n */\r\n deactivate() {\r\n super.deactivate();\r\n }\r\n\r\n /**\r\n * Initial configurations for applying CSS grid.\r\n * \r\n */\r\n createMapContainers() {\r\n const bigContainer = document.createElement('div');\r\n bigContainer.id = \"lienzo\";\r\n bigContainer.classList.add('mirrorpanel-grid');\r\n\r\n const mapjsA = document.getElementById(\"mapjs\") || document.getElementById(\"map\");\r\n document.body.insertBefore(bigContainer, mapjsA);\r\n mapjsA.classList.add('mirror1');\r\n bigContainer.appendChild(mapjsA);\r\n\r\n const mapjsB = document.createElement('div');\r\n mapjsB.id = \"mapjsB\";\r\n mapjsB.classList.add('mirror2');\r\n bigContainer.appendChild(mapjsB);\r\n\r\n const mapjsC = document.createElement('div');\r\n mapjsC.id = \"mapjsC\";\r\n mapjsC.classList.add('mirror3');\r\n bigContainer.appendChild(mapjsC);\r\n\r\n const mapjsD = document.createElement('div');\r\n mapjsD.id = \"mapjsD\";\r\n mapjsD.classList.add('mirror4');\r\n bigContainer.appendChild(mapjsD);\r\n }\r\n\r\n /**\r\n * This function shows/hides panel for differents viz options.\r\n * The mirror maps are launched from here\r\n * \r\n */\r\n manageVisionPanelByCSSGrid(modeViz) {\r\n let oldModeViz = this.modeViz;\r\n let map0 = document.getElementById('mapjs') || document.getElementById('map');\r\n map0.style.display = 'none';\r\n document.getElementById('mapjsB').style.display = 'none';\r\n document.getElementById('mapjsC').style.display = 'none';\r\n document.getElementById('mapjsD').style.display = 'none';\r\n this.template.querySelector('#set-mirror-' + oldModeViz).classList.remove('buttom-pressed');\r\n\r\n for (let i = 0; i < 10; i++) {\r\n document.getElementById('lienzo').classList.remove('modeViz' + i);\r\n }\r\n document.getElementById('lienzo').classList.add('modeViz' + modeViz);\r\n\r\n //Create map objects by modeviz\r\n if ([1, 2].includes(modeViz)) {\r\n if (this.mapL['B'] == null) {\r\n this.createMapObjects('B');//Create MapB\r\n }\r\n }\r\n if ([3, 7, 8, 9].includes(modeViz)) {\r\n if (this.mapL['B'] == null) {\r\n this.createMapObjects('B');//Create MapB\r\n }\r\n if (this.mapL['C'] == null) {\r\n this.createMapObjects('C');//Create MapC\r\n }\r\n }\r\n if ([4, 5, 6].includes(modeViz)) {\r\n if (this.mapL['B'] == null) {\r\n this.createMapObjects('B');//Create MapB\r\n }\r\n if (this.mapL['C'] == null) {\r\n this.createMapObjects('C');//Create MapC\r\n }\r\n if (this.mapL['D'] == null) {\r\n this.createMapObjects('D');//Create MapD\r\n }\r\n }\r\n\r\n this.modeViz = modeViz;\r\n this.template.querySelector('#set-mirror-' + modeViz).classList.add('buttom-pressed');\r\n this.map_.refresh();\r\n if (this.mapL['B'] !== null) { this.mapL['B'].refresh(); }\r\n if (this.mapL['C'] !== null) { this.mapL['C'].refresh(); }\r\n if (this.mapL['D'] !== null) { this.mapL['D'].refresh(); }\r\n }\r\n\r\n /**\r\n * Create mirror map object synchro with the main map\r\n */\r\n createMapObjects(mapLyr) {\r\n let defLyr = null;\r\n switch (mapLyr) {\r\n case 'B':\r\n if (this.defaultBaseLyrs[1]) defLyr = this.defaultBaseLyrs[0];\r\n break;\r\n case 'C':\r\n if (this.defaultBaseLyrs[2]) defLyr = this.defaultBaseLyrs[1];\r\n break;\r\n case 'D':\r\n if (this.defaultBaseLyrs[3]) defLyr = this.defaultBaseLyrs[2];\r\n break;\r\n default:\r\n defLyr = this.map_.getLayers()[0].setMap(this);\r\n break;\r\n }\r\n this.mapL[mapLyr] = M.map({\r\n container: 'mapjs' + mapLyr,\r\n layers: defLyr,\r\n controls: this.showTOC ? ['layerswitcher'] : '',\r\n center: this.map_.getCenter(),\r\n projection: this.map_.getProjection().code + '*' + this.map_.getProjection().units,\r\n zoom: this.map_.getZoom(),\r\n });\r\n this.mapL[mapLyr].getMapImpl().setView(this.map_.getMapImpl().getView());\r\n\r\n if (this.showCursors) { this.addLayerCursor(mapLyr); }\r\n if (this.mirrorLayers.length > 0) {\r\n this.mapL[mapLyr].addLayers(this.mirrorLayers);\r\n this.mapL[mapLyr].getLayers().forEach((l) => {\r\n if (l.zindex_ !== 0) { l.setVisible(false); }\r\n });\r\n }\r\n this.mapL[mapLyr].refresh();\r\n }\r\n\r\n /**\r\n * Adding a layer for cursor on Map\r\n */\r\n addLayerCursor(mapLyr) {\r\n // Cursor Layer\r\n this.lyrCursor[mapLyr] = new M.layer.Vector({\r\n name: 'Coordenadas centro ' + mapLyr,\r\n }, { displayInLayerSwitcher: false });\r\n\r\n this.featureLyrCursor[mapLyr] = new M.Feature('Center' + mapLyr, {\r\n type: 'Feature',\r\n properties: {},\r\n geometry: {\r\n type: 'Point',\r\n coordinates: this.mapL[mapLyr].getCenter(),\r\n },\r\n });\r\n\r\n this.lyrCursor[mapLyr].addFeatures([this.featureLyrCursor[mapLyr]]);\r\n this.lyrCursor[mapLyr].setStyle(this.styleCursor);\r\n this.lyrCursor[mapLyr].setZIndex(5000);\r\n this.mapL[mapLyr].addLayers(this.lyrCursor[mapLyr]);\r\n\r\n this.mapL[mapLyr].getMapImpl().on('pointermove', (event) => {\r\n this.lyrCursor[mapLyr].setVisible(false);\r\n Object.keys(this.featureLyrCursor).forEach(k => {\r\n if (this.mapL[k]) {\r\n this.mapL[k].getMapImpl().setView(this.mapL[mapLyr].getMapImpl().getView());\r\n }\r\n if (k != mapLyr) {\r\n if (this.featureLyrCursor[k] !== null) {\r\n this.lyrCursor[k].setVisible(true);\r\n this.featureLyrCursor[k].setGeometry({\r\n type: 'Point',\r\n coordinates: event.coordinate,\r\n });\r\n }\r\n }\r\n })\r\n });\r\n\r\n }\r\n\r\n /**\r\n * This function is called to remove the effects\r\n *\r\n * @public\r\n * @function\r\n * @api stable\r\n */\r\n removeMaps() {\r\n this.mapL['B'] = null;\r\n this.mapL['C'] = null;\r\n this.mapL['D'] = null;\r\n }\r\n\r\n destroyMapsContainer() {\r\n // Remove mirrors containers\r\n document.getElementById(\"mapjsB\").remove();\r\n document.getElementById(\"mapjsC\").remove();\r\n document.getElementById(\"mapjsD\").remove();\r\n\r\n // Take the main map out of the container\r\n const lienzo = document.getElementById(\"lienzo\");\r\n const mapjsA = document.getElementById(\"mapjs\") || document.getElementById(\"map\");\r\n mapjsA.style.display = \"block\";\r\n mapjsA.classList.remove('mirror1');\r\n document.body.insertBefore(mapjsA, lienzo);\r\n\r\n // Load the main container\r\n document.getElementById(\"lienzo\").remove();\r\n }\r\n\r\n /**\r\n * This function compares controls\r\n *\r\n * @public\r\n * @function\r\n * @param {M.Control} control to compare\r\n * @api stable\r\n */\r\n equals(control) {\r\n return control instanceof MirrorpanelControl;\r\n }\r\n}\r\n","/**\r\n * @module M/plugin/Mirrorpanel\r\n */\r\nimport 'assets/css/mirrorpanel';\r\nimport MirrorpanelControl from './mirrorpanelcontrol';\r\nimport api from '../../api';\r\nimport { getValue } from './i18n/language'; //e2m: Multilanguage support\r\n\r\nexport default class Mirrorpanel extends M.Plugin {\r\n /**\r\n * @classdesc\r\n * Main facade plugin object. This class creates a plugin\r\n * object which has an implementation Object\r\n *\r\n * @constructor\r\n * @extends {M.Plugin}\r\n * @param {Object} impl implementation object\r\n * @api stable\r\n */\r\n constructor(options = {}) {\r\n super();\r\n\r\n /**\r\n * Name plugin\r\n * @private\r\n * @type {String}\r\n */\r\n this.name_ = 'mirrorpanel';\r\n\r\n /**\r\n * Facade of the map\r\n * @private\r\n * @type {M.Map}\r\n */\r\n this.map_ = null;\r\n\r\n /**\r\n * Array of controls\r\n * @private\r\n * @type {Array}\r\n */\r\n this.controls_ = [];\r\n\r\n /**\r\n * Class name of the html view Plugin\r\n * @public\r\n * @type {string}\r\n */\r\n this.className = 'm-plugin-mirrorpanel';\r\n\r\n /**\r\n * Position of the Plugin\r\n * @public\r\n * Posible values: TR | TL | BL | BR\r\n * @type {String}\r\n */\r\n const positions = ['TR', 'TL', 'BL', 'BR'];\r\n this.position = positions.includes(options.position) ? options.position : 'TR';\r\n\r\n /**\r\n * Collapsed attribute\r\n * @public\r\n * @type {boolean}\r\n */\r\n this.collapsed = options.collapsed;\r\n if (this.collapsed === undefined) this.collapsed = true;\r\n\r\n /**\r\n * Collapsible attribute\r\n * @public\r\n * @type {boolean}\r\n */\r\n this.collapsible = options.collapsible;\r\n if (this.collapsible === undefined) this.collapsible = true;\r\n\r\n /**\r\n * Modo de visualización\r\n * Value: number in range 0 - 9\r\n * @type {number}\r\n * @public\r\n */\r\n this.modeViz = options.modeViz;\r\n if (this.modeViz === undefined) this.modeViz = 0;\r\n\r\n /**\r\n * Enabled key functions\r\n * @type {boolean}\r\n * @public\r\n */\r\n this.enabledKeyFunctions = options.enabledKeyFunctions;\r\n if (this.enabledKeyFunctions === undefined) this.enabledKeyFunctions = true;\r\n\r\n /**\r\n * Enabled synchro cursors\r\n * @type {boolean}\r\n * @public\r\n */\r\n this.showCursors = options.showCursors;\r\n if (this.showCursors === undefined) this.showCursors = true;\r\n\r\n /**\r\n * Layer names that will have effects\r\n * @public\r\n * Value: the names separated with coma\r\n * @type {string}\r\n */\r\n\r\n this.mirrorLayers = [];\r\n if (options.mirrorLayers !== undefined) {\r\n if (Array.isArray(options.mirrorLayers)) {\r\n this.mirrorLayers = options.mirrorLayers;\r\n } else {\r\n this.mirrorLayers = options.mirrorLayers.split(\",\");\r\n }\r\n }\r\n\r\n /**\r\n * Layer base for the three mirror maps\r\n * @public\r\n * Value: the names separated with coma\r\n * @type {string}\r\n */\r\n\r\n this.defaultBaseLyrs = [];\r\n if (options.defaultBaseLyrs !== undefined) {\r\n if (Array.isArray(options.defaultBaseLyrs)) {\r\n this.defaultBaseLyrs = options.defaultBaseLyrs;\r\n } else {\r\n this.defaultBaseLyrs = options.defaultBaseLyrs.split(\",\");\r\n }\r\n }\r\n\r\n /** \r\n * Show interface\r\n *@public\r\n *@type{boolean}\r\n */\r\n this.interface = options.interface === undefined ? true : options.interface;\r\n\r\n /**\r\n * Enabled layerswitcher control on mirrors \r\n * @type {boolean}\r\n * @public\r\n */\r\n this.showTOC = options.showTOC;\r\n if (this.showTOC === undefined) this.showTOC = true;\r\n\r\n\r\n /**\r\n *@private\r\n *@type { string }\r\n */\r\n this.tooltip_ = options.tooltip || getValue('tooltip');\r\n\r\n\r\n /**\r\n * Metadata from api.json\r\n * @private\r\n * @type {Object}\r\n */\r\n this.metadata_ = api.metadata;\r\n }\r\n\r\n /**\r\n * This function adds this plugin into the map\r\n *\r\n * @public\r\n * @function\r\n * @param {M.Map} map the map to add the plugin\r\n * @api stable\r\n */\r\n addTo(map) {\r\n const pluginOnLeft = !!(['TL', 'BL'].includes(this.position));\r\n\r\n const values = {\r\n pluginOnLeft,\r\n collapsible: this.collapsible,\r\n collapsed: this.collapsed,\r\n modeViz: this.modeViz,\r\n showCursors: this.showCursors,\r\n mirrorLayers: this.mirrorLayers,\r\n defaultBaseLyrs: this.defaultBaseLyrs,\r\n showTOC: this.showTOC\r\n };\r\n\r\n this.control_ = new MirrorpanelControl(values);\r\n this.controls_.push(this.control_);\r\n this.map_ = map;\r\n\r\n this.panel_ = new M.ui.Panel('panelMirrorpanel', {\r\n collapsible: this.collapsible,\r\n collapsed: this.collapsed,\r\n position: M.ui.position[this.position],\r\n modeViz: this.modeViz,\r\n showCursors: this.showCursors,\r\n className: this.interface ? 'm-plugin-panelMirrorpanel' : 'm-plugin-panelMirrorpanel hidden',\r\n collapsedButtonClass: 'mirrorpanel-icon',\r\n tooltip: this.tooltip_,\r\n });\r\n this.panel_.addControls(this.controls_);\r\n map.addPanels(this.panel_);\r\n\r\n // Keybindings for Ctrl + Shift + (F1-F8) / ESC\r\n document.addEventListener('keydown', (zEvent) => {\r\n if (!this.enabledKeyFunctions) {\r\n return;\r\n }\r\n for (let i = 0; i < 10; i++) {\r\n if (zEvent.ctrlKey && zEvent.shiftKey && zEvent.key === \"F\" + (i + 1)) { // case sensitive\r\n this.control_.manageVisionPanelByCSSGrid(i);\r\n }\r\n }\r\n var keyStr = [\"Control\", \"Shift\", \"Alt\", \"Meta\"].includes(zEvent.key) ? \"\" : zEvent.key;\r\n\r\n var combinedKeys = (zEvent.ctrlKey ? \"Control \" : \"\") +\r\n (zEvent.shiftKey ? \"Shift \" : \"\") +\r\n (zEvent.altKey ? \"Alt \" : \"\") +\r\n (zEvent.metaKey ? \"Meta \" : \"\") + keyStr;\r\n if (combinedKeys === \"Escape\") {\r\n this.control_.manageVisionPanelByCSSGrid(0);\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n /**\r\n * This function destroys this plugin\r\n *\r\n * @public\r\n * @function\r\n * @api stable\r\n */\r\n destroy() {\r\n document.removeEventListener('keydown', (zEvent) => { });\r\n this.control_.removeMaps();\r\n this.control_.destroyMapsContainer();\r\n this.map_.removeControls([this.control_]);\r\n [this.control_, this.panel_, this.map_, this.collapsible, this.collapsed, this.modeViz, this.enabledKeyFunctions, this.showCursors, this.mirrorLayers, this.defaultBaseLyrs, this.interface, this.showTOC] = [null, null, null, null, null, null, null, null, null, null, null, null];\r\n }\r\n\r\n /**\r\n * This function gets name plugin\r\n * @getter\r\n * @public\r\n * @returns {string}\r\n * @api stable\r\n */\r\n get name() {\r\n return this.name_;\r\n }\r\n\r\n /**\r\n * This function gets metadata plugin\r\n *\r\n * @public\r\n * @function\r\n * @api stable\r\n */\r\n getMetadata() {\r\n return this.metadata_;\r\n }\r\n\r\n /**\r\n * Get the API REST Parameters of the plugin\r\n *\r\n * @function\r\n * @public\r\n * @api\r\n */\r\n getAPIRest() {\r\n return `${this.name}=${this.position}*!${this.collapsed}*!${this.collapsible}*!${this.modeViz}*!${this.enabledKeyFunctions}*!${this.showCursors}*!${this.mirrorLayers}*!${this.defaultBaseLyrs}*!${this.interface}*!${this.showTOC}`;\r\n }\r\n\r\n /**\r\n * Activate plugin\r\n *\r\n * @function\r\n * @public\r\n * @api\r\n */\r\n activate() {\r\n this.control_.activate();\r\n }\r\n\r\n /**\r\n * Desactivate plugin\r\n *\r\n * @function\r\n * @public\r\n * @api\r\n */\r\n deactivate() {\r\n this.control_.deactivate();\r\n }\r\n\r\n\r\n}\r\n","import M$plugin$Mirrorpanel from '/home/irenevinas/m5/mapea-publico/src/plugins/v5/mirrorpanel/src/facade/js/mirrorpanel';\nimport M$control$MirrorpanelControl from '/home/irenevinas/m5/mapea-publico/src/plugins/v5/mirrorpanel/src/facade/js/mirrorpanelcontrol';\nimport M$impl$control$MirrorpanelControl from '/home/irenevinas/m5/mapea-publico/src/plugins/v5/mirrorpanel/src/impl/ol/js/mirrorpanelcontrol';\n\nif (!window.M.plugin) window.M.plugin = {};\nif (!window.M.control) window.M.control = {};\nif (!window.M.impl) window.M.impl = {};\nif (!window.M.impl.control) window.M.impl.control = {};\nwindow.M.plugin.Mirrorpanel = M$plugin$Mirrorpanel;\nwindow.M.control.MirrorpanelControl = M$control$MirrorpanelControl;\nwindow.M.impl.control.MirrorpanelControl = M$impl$control$MirrorpanelControl;\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/docs/README.md b/docs/README.md
index b2982ea..326344c 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -52,6 +52,8 @@ Plugin que permite comparar varias capas dividiendo la pantalla en varias partes
- **interface**. Define si mostrar o no la interfaz del plugin.
+- **showTOC**. si es *true* mostrará el control layerswitcher en las capas espejo.
+
# Eventos
# Multi idioma
diff --git a/src/api.json b/src/api.json
index 00e331a..53c0a1a 100644
--- a/src/api.json
+++ b/src/api.json
@@ -58,6 +58,11 @@
"type": "boolean",
"name": "interface",
"position": 8
+ },
+ {
+ "type": "boolean",
+ "name": "showToc",
+ "position": 9
}
]
}
diff --git a/src/facade/js/mirrorpanel.js b/src/facade/js/mirrorpanel.js
index 2148b6a..97199ba 100644
--- a/src/facade/js/mirrorpanel.js
+++ b/src/facade/js/mirrorpanel.js
@@ -137,6 +137,14 @@ export default class Mirrorpanel extends M.Plugin {
*/
this.interface = options.interface === undefined ? true : options.interface;
+ /**
+ * Enabled layerswitcher control on mirrors
+ * @type {boolean}
+ * @public
+ */
+ this.showTOC = options.showTOC;
+ if (this.showTOC === undefined) this.showTOC = true;
+
/**
*@private
@@ -172,6 +180,7 @@ export default class Mirrorpanel extends M.Plugin {
showCursors: this.showCursors,
mirrorLayers: this.mirrorLayers,
defaultBaseLyrs: this.defaultBaseLyrs,
+ showTOC: this.showTOC
};
this.control_ = new MirrorpanelControl(values);
@@ -227,7 +236,7 @@ export default class Mirrorpanel extends M.Plugin {
this.control_.removeMaps();
this.control_.destroyMapsContainer();
this.map_.removeControls([this.control_]);
- [this.control_, this.panel_, this.map_, this.collapsible, this.collapsed, this.modeViz, this.enabledKeyFunctions, this.showCursors, this.mirrorLayers, this.defaultBaseLyrs, this.interface] = [null, null, null, null, null, null, null, null, null, null, null];
+ [this.control_, this.panel_, this.map_, this.collapsible, this.collapsed, this.modeViz, this.enabledKeyFunctions, this.showCursors, this.mirrorLayers, this.defaultBaseLyrs, this.interface, this.showTOC] = [null, null, null, null, null, null, null, null, null, null, null, null];
}
/**
@@ -260,7 +269,7 @@ export default class Mirrorpanel extends M.Plugin {
* @api
*/
getAPIRest() {
- return `${this.name}=${this.position}*!${this.collapsed}*!${this.collapsible}*!${this.modeViz}*!${this.enabledKeyFunctions}*!${this.showCursors}*!${this.mirrorLayers}*!${this.defaultBaseLyrs}*!${this.interface}`;
+ return `${this.name}=${this.position}*!${this.collapsed}*!${this.collapsible}*!${this.modeViz}*!${this.enabledKeyFunctions}*!${this.showCursors}*!${this.mirrorLayers}*!${this.defaultBaseLyrs}*!${this.interface}*!${this.showTOC}`;
}
/**
diff --git a/src/facade/js/mirrorpanelcontrol.js b/src/facade/js/mirrorpanelcontrol.js
index 91a4c4e..8dc0d9a 100644
--- a/src/facade/js/mirrorpanelcontrol.js
+++ b/src/facade/js/mirrorpanelcontrol.js
@@ -49,24 +49,9 @@ export default class MirrorpanelControl extends M.Control {
/**
* Defining mirror maps variables
*/
- this.mapL = {
- A: null,
- B: null,
- C: null,
- D: null,
- }
- this.lyrCursor = {
- A: null,
- B: null,
- C: null,
- D: null,
- }
- this.featureLyrCursor = {
- A: null,
- B: null,
- C: null,
- D: null,
- }
+ this.mapL = { A: null, B: null, C: null, D: null, }
+ this.lyrCursor = { A: null, B: null, C: null, D: null, }
+ this.featureLyrCursor = { A: null, B: null, C: null, D: null, }
/**
* Defining cursor style
@@ -100,6 +85,13 @@ export default class MirrorpanelControl extends M.Control {
*/
this.mirrorLayers = values.mirrorLayers;
+ /**
+ * Enable layerswitcher control
+ * @public
+ * @public {Array}
+ */
+ this.showTOC = values.showTOC;
+
this.createMapContainers();
}
@@ -134,7 +126,12 @@ export default class MirrorpanelControl extends M.Control {
}
this.mapL['A'] = map;
-
+ if (this.mirrorLayers.length > 0) {
+ this.mapL['A'].addLayers(this.mirrorLayers);
+ this.mapL['A'].getLayers().forEach((l) => {
+ if (l.zindex_ !== 0) { l.setVisible(false); }
+ });
+ }
if (this.showCursors) { this.addLayerCursor('A'); }
return new Promise((success, fail) => {
let templateOptions = '';
@@ -300,6 +297,7 @@ export default class MirrorpanelControl extends M.Control {
this.mapL[mapLyr] = M.map({
container: 'mapjs' + mapLyr,
layers: defLyr,
+ controls: this.showTOC ? ['layerswitcher'] : '',
center: this.map_.getCenter(),
projection: this.map_.getProjection().code + '*' + this.map_.getProjection().units,
zoom: this.map_.getZoom(),
@@ -307,6 +305,12 @@ export default class MirrorpanelControl extends M.Control {
this.mapL[mapLyr].getMapImpl().setView(this.map_.getMapImpl().getView());
if (this.showCursors) { this.addLayerCursor(mapLyr); }
+ if (this.mirrorLayers.length > 0) {
+ this.mapL[mapLyr].addLayers(this.mirrorLayers);
+ this.mapL[mapLyr].getLayers().forEach((l) => {
+ if (l.zindex_ !== 0) { l.setVisible(false); }
+ });
+ }
this.mapL[mapLyr].refresh();
}
diff --git a/test/test.js b/test/test.js
index 2cae5d0..13cd74e 100644
--- a/test/test.js
+++ b/test/test.js
@@ -9,10 +9,18 @@ const map = M.map({
x: -667143.31,
y: 4493011.77,
},
- controls: ['scale', 'location'],
+ controls: ['scale', 'location', 'layerswitcher'],
projection: "EPSG:3857*m",
zoom: 8,
});
+
+let capasPNOA = [
+ 'WMS*PNOA 2015*https://www.ign.es/wms/pnoa-historico*PNOA2015',
+ 'WMS*PNOA 2016*https://www.ign.es/wms/pnoa-historico*PNOA2016',
+ 'WMS*PNOA 2017*https://www.ign.es/wms/pnoa-historico*PNOA2017',
+ 'WMS*PNOA 2018*https://www.ign.es/wms/pnoa-historico*PNOA2018',
+];
+
let defaultBaseLyrs = [
new M.layer.WMTS({
url: 'http://www.ign.es/wmts/ign-base?',
@@ -65,6 +73,7 @@ const mpMirrorPanel = new Mirrorpanel({
collapsible: true, // El botón para desplegar/replegar el plugin no aparece (false) o sí aparece(true)
collapsed: false, // El panel del plugin se muestra desplegado (false) o replegado (true)
modeViz: 0,
+ mirrorLayers: capasPNOA,
defaultBaseLyrs: defaultBaseLyrs, // Array de capas para los mapas espejo en formato StringAPICNIG
enabledKeyFunctions: true, // Están habilitadas los comandos por teclado
showCursors: true, // Se muestran los cursores