/* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** api: example[appdemo] * Full App Demo * ------------- * Full, self-contained, application demo showing basics of Hero configuration and styling/language options. */ Ext.namespace("Heron"); Ext.namespace("Heron.options"); /** * Defines the entire layout of a Heron webapp using ExtJS-style. * * The layout specifies a hierarchy of ExtJS (Panel) components. * Each component is either a container of components (xtype: 'panel', i.e. an ExtJS Panel) * or a specific leaf component like a map panel (xtype: 'hr_mappanel') or simple HTML * panel (xtype: 'hr_htmlpanel'). Each component has a 'xtype' string and component-specific options. * The 'xtype' defines the component widget class . * For a container-type (xtype: 'panel') the options should include a 'layout' (like 'border' or 'card', * and an array of 'items' with each element being a component (another container or a leaf widget component). * * In order to distinguish ExtJS-specific config options from those that are Heron-specific, * the later are prefixed with "hr". These are defined outside this file to allow quick custimization. * * Specific config options for ExtJS components can be found in the API docs: * http://docs.sencha.com/ext-js/3-4/#!/api * **/ var treeTheme = [ { text:'BaseMaps', expanded: true, children: [ {nodeType: "gx_layer", layer: "Google Hybrid" }, {nodeType: "gx_layer", layer: "Google Satellite" }, {nodeType: "gx_layer", layer: "MAPA BASE" } ] }, { text:'SEIA', expanded: true, children:[ {text:"DIR. POLÍTICA FORESTAL", children: [{text:"CUSTF Y APROVECHAMIENTO FORESTAL (MUNICIPIO F.C.P)", nodeType: 'hr_cascader', expanded: true, children:[ {nodeType: "gx_layer", layer: "  APROVECHAMIENTO APLICADO (F.C.P.) 2017"}, {nodeType: "gx_layer", layer: "  APROVECHAMIENTO APLICADO (F.C.P.) 2018"}, {nodeType: "gx_layer", layer: "  CAMBIO DE USO DE SUELO EN TERRENO FORESTAL APLICADO EN F.C.P. (2012-2018)"}, {nodeType: "gx_layer", layer: "  EJIDOS DEL MUNICIPIO DE FCP"}, {nodeType: "gx_layer", layer: "  DIAGNOSTICO SANTA TERESA SIAN KAAN"}, {nodeType: "gx_layer", layer: "  PROGRAMA POR PAGO DE SERVICIO AMBIENTAL 2011 - 2016 ( F.C.P.)"}, {nodeType: "gx_layer", layer: "  MUNICIPIO FELIPE CARRILLO PUERTO"}, {nodeType: "gx_layer", layer: "  PLANTACIONES COMERCIALES FORESTALES"}, {nodeType: "gx_layer", layer: "  EJIDOS CERTIFICADOS"}, {nodeType: "gx_layer", layer: "  DIAGNOSTICO TRAMO PUNTA HERRERO"}, {nodeType: "gx_layer", layer: "  ANUALIDADES_2017_2018_2019_APROVECHA_BACALAR"}, {nodeType: "gx_layer", layer: "  ANUALIDADES_2018_2019_2020_APROV_JOSE M MORELOS"}, {nodeType: "gx_layer", layer: "  COMPENSACIÓN AMBIENTAL POR CAMBIO DE USO DE SUELO EN TERRENOS FORESTALES (CACUSFT)_2012_2018_JOSE_M_MORELOS"}, {nodeType: "gx_layer", layer: "  EJIDOS_MPO_DE_BACALAR"}, {nodeType: "gx_layer", layer: "  EJIDOS_MPO_JOSE_M_MORELOS"}, {nodeType: "gx_layer", layer: "  PAGOS POR SERVICIOS AMBIENTALES (PSA)_2011_2016_BACALAR"}, {nodeType: "gx_layer", layer: "  PAGOS POR SERVICIOS AMBIENTALES (PSA)_2011_2016_JOSE_M_MORELOS_"}, {nodeType: "gx_layer", layer: "  TEMPORADA_INCENDIOS_2019_JOSE_M_MORELOS"} ]} ]}, {text:"DIR. ORDENAMIENTO", children: [{text:"ORDENAMIENTOS ECOLÓGICOS DEL ESTADO DE QUINTANA ROO", nodeType: 'hr_cascader', expanded: true, children:[ {nodeType: "gx_layer", layer: "  POEL Benito Juárez"}, {nodeType: "gx_layer", layer: "  POEL Cozumel"}, {nodeType: "gx_layer", layer: "  POEL Isla Mujeres"}, {nodeType: "gx_layer", layer: "  POEL Othón P. Blanco"}, {nodeType: "gx_layer", layer: "  POEL Solidaridad"}, {nodeType: "gx_layer", layer: "  POET Cancún - Tulum"}, {nodeType: "gx_layer", layer: "  POET Costa Maya"}, {nodeType: "gx_layer", layer: "  POET Laguna de Bacalar"}, {nodeType: "gx_layer", layer: "  POET Sian Kaan"} ]} ]}, {text:"DIR. CAMBIO CLIMÁTICO", children: [{text:"SAMOF 2016", nodeType: 'hr_cascader', expanded: true, children:[ {nodeType: "gx_layer", layer: "  Mapa cobertura 2016"} ]}, {text:"ARBOLADO URBANO", nodeType: 'hr_cascader', expanded: true, children:[ {nodeType: "gx_layer", layer: "  ARBOLADO URBANO"} ]}, {text:"Mercado_Carbono_QRoo", nodeType: 'hr_cascader', expanded: true, children:[ {nodeType: "gx_layer", layer: "  Mercado_Carbono_QRoo"} ]} ]}, {text:"IBANQROO", children: [{text:"ÁREAS NATURALES PROTEGIDAS", nodeType: 'hr_cascader', expanded: true, children:[ {nodeType: "gx_layer", layer: "  COZ.Zona Sujeta a Conservación Ecológica, Refugio Estatal de Flora y Fauna"}, {nodeType: "gx_layer", layer: "  LAGUNA MANATI"}, {nodeType: "gx_layer", layer: "  Parque Chinchankanab"}, {nodeType: "gx_layer", layer: "  Parque Laguna Bacalar 2011"}, {nodeType: "gx_layer", layer: "  Sistema Lagunar Chacmochuc "}, {nodeType: "gx_layer", layer: "  Selvas y Humedales de Cozumel 2015"}, {nodeType: "gx_layer", layer: "  Xcacel-Xcacelito 1998"}, {nodeType: "gx_layer", layer: "  Balan Kaax 2011"}, {nodeType: "gx_layer", layer: "  Otoch Maax Yetel Kooh 2009"}, {nodeType: "gx_layer", layer: "  Biosfera Reserva Calakmul 2000"}, {nodeType: "gx_layer", layer: "  Arrecifes de Cozumel 1998"}, {nodeType: "gx_layer", layer: "  Chinchorro 2000"}, {nodeType: "gx_layer", layer: "  Isla Contoy 2015"}, {nodeType: "gx_layer", layer: "  Manglares de Nichupte 2015"}, {nodeType: "gx_layer", layer: "  Norte Cozumel 2015"}, {nodeType: "gx_layer", layer: "  PM. Arrecife Puerto Morelos 2000"}, {nodeType: "gx_layer", layer: "  Arrecifes Xcalak 2004"}, {nodeType: "gx_layer", layer: "  CostaOccidental IM_PCancun_PNizuc 2016"}, {nodeType: "gx_layer", layer: "  Reserva_Biosfera_Caribe_Mexicano"}, {nodeType: "gx_layer", layer: "  PM Santuario del Manati"}, {nodeType: "gx_layer", layer: "  PM Sian Kaan 2015"}, {nodeType: "gx_layer", layer: "  PM Tiburon Ballena 2015"}, {nodeType: "gx_layer", layer: "  PM Tulum 2007"}, {nodeType: "gx_layer", layer: "  PM Uaymil 2011"}, {nodeType: "gx_layer", layer: "  PM Yum Balam 2018"}, {nodeType: "gx_layer", layer: "  PM Rio Lagartos"} ]}, {text:"BIENESTAR ANIMAL", nodeType: 'hr_cascader', expanded: true, children:[ {nodeType: "gx_layer", layer: "  CENTROS DE ATEN. BIENESTAR ANIMAL 2021"} ]} ]}, {text:"DIR. CALIDAD DEL AIRE Y MONITOREO AMBIENTAL", children: [{text:"INFORMACIÓN DE SENSORES DE CALIDAD DEL AIRE", nodeType: 'hr_cascader', expanded: true, children:[ {nodeType: "gx_layer", layer: "  SENSORES CALIDAD AIRE"} ]}, {text:"LICENCIAS DE FUNCIONAMIENTO AMBIENTAL", nodeType: 'hr_cascader', expanded: true, children:[ {nodeType: "gx_layer", layer: "  LICENCIA DE FUNCIONAMIENTO AMBIENTAL VIGENTES"} ]} ]}, {text:"DIR. RESIDUOS DE MANEJO ESPECIAL ", children: [{text:"CENTROS DE ACÓPIO", nodeType: 'hr_cascader', expanded: true, children:[ {nodeType: "gx_layer", layer: "  ACOPIADORES DE RS"} ]}, {text:"NOM-083-SEMARNAT-2003", nodeType: 'hr_cascader', expanded: true, children:[ {nodeType: "gx_layer", layer: "  c617_buffer500m_concesiones_subterraneas_conagua"}, {nodeType: "gx_layer", layer: "  c617_ConcesionesSubterraneas_CONAGUA"}, {nodeType: "gx_layer", layer: "  c616_cuerpodeagua_INEGI"}, {nodeType: "gx_layer", layer: "  c616_buffer500m_cuerpodeagua_INEGI"}, {nodeType: "gx_layer", layer: "  c615_terrenos_inundables_INEGI"}, {nodeType: "gx_layer", layer: "  c614_fracturas_fallas_dolinas_INEGI"}, {nodeType: "gx_layer", layer: "  c614_coberturahumedales_SAMOF"}, {nodeType: "gx_layer", layer: "  c613_loc_may_2500"}, {nodeType: "gx_layer", layer: "  c613_amanzanadas_INEGI2020"}, {nodeType: "gx_layer", layer: "  c613_Urbanas_OEs_QRoo"}, {nodeType: "gx_layer", layer: "  c613_Union_urbanasOEs_Amanzanadas"}, {nodeType: "gx_layer", layer: "  c613_Restriccion500m_Urbanas"}, {nodeType: "gx_layer", layer: "  c612_ANPs_Federales"}, {nodeType: "gx_layer", layer: "  c612_ANPs_Estatales"}, {nodeType: "gx_layer", layer: "  c611_RestriccionAviacion"}, {nodeType: "gx_layer", layer: "  c611_PistasAviacion"}, {nodeType: "gx_layer", layer: "  cc611_Centroide_PistasAviacion"} ]} ]}, {text:"DIR. EDUCACIÓN AMBIENTAL", children: [{text:"Sistema de Manejo Ambiental ", nodeType: 'hr_cascader', expanded: true, children:[ {nodeType: "gx_layer", layer: "  SISTEMA DE MANEJO AMBIENTAL"} ]} ]}, {text:"SEDETUS", children: [{text:"ORDENAMIENTOS URBANOS DEL ESTADO DE QUINTANA ROO", nodeType: 'hr_cascader', expanded: true, children:[ {nodeType: "gx_layer", layer: "  PDU CHETUMAL"} ]} ]} ] } ]; Ext.namespace("Heron.options.layertree"); Heron.options.layertree.tree = treeTheme; Heron.layout = { xtype: 'panel', /* Optional ExtJS Panel properties, see ExtJS API docs. */ id: 'hr-container-main', layout: 'border', items: [ { xtype: 'panel', id: 'hr-menu-left-container', layout: 'accordion', region: "west", width: 450, collapsible: true, split: true, border: false, items: [ { xtype: 'hr_layertreepanel', contextMenu: [ { xtype: 'hr_layernodemenulayerinfo' }, { xtype: 'hr_layernodemenuzoomextent' }, { xtype: 'hr_layernodemenuopacityslider' } ], hropts: Heron.options.layertree // Below is the default configuration for the LayerTreePanel widget // hropts: {tree: [ // { // // Include all BaseLayers present in Map // text: __('BaseMaps'), nodeType: "gx_baselayercontainer", expanded: true // }, // { // // Include all OverlayLayers present in Map // text: __('Overlays'), nodeType: "gx_overlaylayercontainer", expanded: true // } // // ] } }, { xtype: 'hr_activelayerspanel', height: 240, flex: 3, contextMenu: [ { xtype: 'hr_layernodemenulayerinfo' }, { xtype: 'hr_layernodemenuzoomextent' }, { xtype: 'hr_layernodemenuopacityslider' } ],hropts: { /** Defines the custom component added under the standard layer node. */ component : { xtype: "gx_opacityslider", showTitle: false, plugins: new GeoExt.LayerOpacitySliderTip(), width: 160, inverse: false, aggressive: false, style: { marginLeft: '18px' } } } }, { xtype: 'hr_htmlpanel', id: 'hr-info-west', // See HTML content in Options.js html: Heron.options.info.html, preventBodyReset: true, title: 'Info' }, { xtype: 'hr_bookmarkspanel', id: 'hr-bookmarks', /** The contexts (see Options.js) to create bookmarks in the bookmarks panel. */ hropts: Heron.options.bookmarks } ] }, { xtype: 'panel', id: 'hr-map-and-info-container', layout: 'border', region: 'center', width: '100%', // collapsible: true, split : true, border: false, items: [ { // The Map xtype: 'hr_mappanel', id: 'hr-map', region: 'center', collapsible: false, border: false, // See Options.js hropts: Heron.options.map }/*, { xtype: 'hr_featureinfopanel', id: 'hr-feature-info', region: "south", border: true, collapsible: true, collapsed: true, height: 205, split: true, maxFeatures: 10 } */ ] }, { xtype: 'panel', id: 'hr-menu-right-container', layout: 'accordion', region: "east", width: 200, collapsible: true, collapsed: true, split: true, border: false, items: [ { xtype: 'hr_layerlegendpanel', bodyStyle: 'padding:10px 10px', border: false, defaults: { // see GeoExt labelCls: 'hr-legend-panel-header', useScaleParameter: true, baseParams: { // Override default image/gif in WMS GetLegendGraphic FORMAT: 'image/png', // legend parameters LEGEND_OPTIONS: 'forceLabels:on;fontName=Verdana;fontSize:11' } }, hropts: { // Preload Legends on initial startup // Will fire WMS GetLegendGraphic's for WMS Legends // Otherwise Legends will be loaded only when Layer // becomes visible. Default: false prefetchLegends: false } } ] } ] };