var listApiComerciais = [];listApiComerciais[0]='';listApiComerciais[1]='';listApiComerciais[2]='';function loadApiComerciais(list){for(var i = 0; i<list.length; i++){if(list[i]!=''){var e=document.getElementsByTagName('head')[0];if(!e){e=document.body.parentNode.appendChild(document.createElement('head'))}document.write('<script src="'+list[i]+'" type="text/javascript"><\/script>')}}}loadApiComerciais(listApiComerciais);function getBaseLayers(){var _0TMS = new OpenLayers.Layer.TMS('Limites Administrativos (CAOP)', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_concelhos',type: 'png',id_layer: '401'},{opacity: 1,isBaseLayer: true,displayInLayerSwitcher: true,visibility: true,buffer: 0,queryable: false,crossable: false,printpdm: false,layout_printpdm: 'A4 portrait',scales: app.optionsLayer.scales,resolutions: app.optionsLayer.resolutions,maxResolution: app.optionsLayer.maxResolution});  _0TMS.events.register('visibilitychanged', _0TMS, onChangeVisibilityLayer );var _1TMS = new OpenLayers.Layer.TMS('Cadastro Rústico', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_cadastro_rustico',type: 'png',globalid: '433;38',tipoid: '38',id_layer: '433'},{opacity: 1,isBaseLayer: true,displayInLayerSwitcher: true,visibility: false,buffer: 0,queryable: false,crossable: false,printpdm: false,layout_printpdm: 'A4 landscape oeiras',scales: app.optionsLayer.scales,resolutions: app.optionsLayer.resolutions,maxResolution: app.optionsLayer.maxResolution,index_highlight: -1});  _1TMS.events.register('visibilitychanged', _1TMS, onChangeVisibilityLayer );var _2TMS = new OpenLayers.Layer.TMS('Ortofotomapa', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_ortos_2009',type: 'png',id_layer: '402'},{opacity: 1,isBaseLayer: true,displayInLayerSwitcher: true,visibility: false,buffer: 0,queryable: false,crossable: false,printpdm: false,layout_printpdm: 'A4 portrait',scales: app.optionsLayer.scales,resolutions: app.optionsLayer.resolutions,maxResolution: app.optionsLayer.maxResolution});  _2TMS.events.register('visibilitychanged', _2TMS, onChangeVisibilityLayer );var _3TMS = new OpenLayers.Layer.TMS('Cartografia', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_cartografia',type: 'png',id_layer: '429'},{maxScale: 1000,minScale: 10000,opacity: 1,isBaseLayer: true,displayInLayerSwitcher: true,visibility: false,buffer: 0,queryable: false,crossable: false,printpdm: false,layout_printpdm: 'A4 landscape oeiras',scales: app.optionsLayer.scales,resolutions: app.optionsLayer.resolutions,maxResolution: app.optionsLayer.maxResolution,index_highlight: -1});  _3TMS.events.register('visibilitychanged', _3TMS, onChangeVisibilityLayer ); return[_0TMS,_1TMS,_2TMS,_3TMS]}function getOverLayers(){var _4TMS = new OpenLayers.Layer.TMS('Rede Viária - PDM', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_pdm_rede_viaria_principal',type: 'png',id_layer: '458'},{maxScale: 10000,opacity: 1,isBaseLayer: false,displayInLayerSwitcher: true,visibility: false,buffer: 0,queryable: false,crossable: false,printpdm: false,layout_printpdm: 'A4 portrait',scales: null,resolutions: null,maxResolution: app.optionsLayer.maxResolution,index_highlight: -1});  _4TMS.events.register('visibilitychanged', _4TMS, onChangeVisibilityLayer );var _5TMS = new OpenLayers.Layer.TMS('Reserva Agrícola Nacional', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_pdm_ran',type: 'png',id_layer: '457'},{maxScale: 10000,opacity: 1,isBaseLayer: false,displayInLayerSwitcher: true,visibility: false,buffer: 0,queryable: false,crossable: false,printpdm: false,layout_printpdm: 'A4 portrait',scales: null,resolutions: null,maxResolution: app.optionsLayer.maxResolution,index_highlight: -1});  _5TMS.events.register('visibilitychanged', _5TMS, onChangeVisibilityLayer );var _6TMS = new OpenLayers.Layer.TMS('Planta de Condicionantes', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_pdm_condicionantes',type: 'png',id_layer: '456'},{maxScale: 10000,opacity: 1,isBaseLayer: false,displayInLayerSwitcher: true,visibility: false,buffer: 0,queryable: false,crossable: false,printpdm: true,scale_printpdm: 10000,maptitle_printpdm: 'Planta de Condicionantes do PDM',layout_printpdm: 'A4 landscape oeiras cond',scales: null,resolutions: null,maxResolution: app.optionsLayer.maxResolution,index_highlight: -1,ordem_print_pdm: 3});  _6TMS.events.register('visibilitychanged', _6TMS, onChangeVisibilityLayer );var _7TMS = new OpenLayers.Layer.TMS('Planta de Ordenamento (Raster)', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_pdm_ordenamento_raster',type: 'png',id_layer: '408'},{maxScale: 10000,opacity: 1,isBaseLayer: false,displayInLayerSwitcher: true,visibility: false,buffer: 0,queryable: false,crossable: false,printpdm: true,scale_printpdm: 10000,maptitle_printpdm: 'Planta de Ordenamento do PDM',layout_printpdm: 'A4 landscape oeiras ord raster',scales: null,resolutions: null,maxResolution: app.optionsLayer.maxResolution,ordem_print_pdm: 1});  _7TMS.events.register('visibilitychanged', _7TMS, onChangeVisibilityLayer );var _8TMS = new OpenLayers.Layer.TMS('Planta de Ordenamento (Vector)', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_pdm_ordenamento_vectorial',type: 'png',globalid: '412;36',tipoid: '36',typename: 'oeirasdigital:PDM_ORDENAMENTO',id_layer: '412'},{maxScale: 10000,opacity: 1,isBaseLayer: false,displayInLayerSwitcher: true,visibility: false,buffer: 0,geometry_column: 'SHAPE',queryable: true,crossable: true,cross_column: 'DESIGNACAO',printpdm: true,scale_printpdm: 10000,maptitle_printpdm: 'Planta de Ordenamento do PDM (Vector)',layout_printpdm: 'A4 landscape oeiras ord vector',scales: null,resolutions: null,maxResolution: app.optionsLayer.maxResolution,index_highlight: 1,ordem_print_pdm: 2});  _8TMS.events.register('visibilitychanged', _8TMS, onChangeVisibilityLayer );var _9TMS = new OpenLayers.Layer.TMS('Planos Eficazes', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_pdm_planos_eficazes',type: 'png',typename: 'oeirasdigital:PDM_PLANOS_EFICAZES',id_layer: '407'},{maxScale: 10000,opacity: 1,isBaseLayer: false,displayInLayerSwitcher: true,visibility: false,buffer: 0,geometry_column: 'SHAPE',queryable: true,crossable: false,printpdm: false,scales: null,resolutions: null,maxResolution: app.optionsLayer.maxResolution});  _9TMS.events.register('visibilitychanged', _9TMS, onChangeVisibilityLayer );var _10TMS = new OpenLayers.Layer.TMS('Perímetros Urbanos', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_pdm_perimetros_urbanos',type: 'png',id_layer: '409'},{opacity: 1,isBaseLayer: false,displayInLayerSwitcher: true,visibility: false,buffer: 0,queryable: false,crossable: false,printpdm: false,scales: null,resolutions: null,maxResolution: app.optionsLayer.maxResolution});  _10TMS.events.register('visibilitychanged', _10TMS, onChangeVisibilityLayer );var _11TMS = new OpenLayers.Layer.TMS('Programas Estratégicos', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_pdm_programas_estrategicos',type: 'png',typename: 'oeirasdigital:PDM_PROGRAMAS_ESTRATEGICOS',id_layer: '410'},{maxScale: 10000,opacity: 1,isBaseLayer: false,displayInLayerSwitcher: true,visibility: false,buffer: 0,queryable: true,crossable: false,printpdm: false,scales: null,resolutions: null,maxResolution: app.optionsLayer.maxResolution});  _11TMS.events.register('visibilitychanged', _11TMS, onChangeVisibilityLayer );var _12TMS = new OpenLayers.Layer.TMS('Rede Viária - PDM (Actual)', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_pdm_rede_viaria',type: 'png',id_layer: '404'},{opacity: 1,isBaseLayer: false,displayInLayerSwitcher: true,visibility: false,buffer: 0,queryable: false,crossable: false,printpdm: false,layout_printpdm: 'A4 portrait',scales: null,resolutions: null,maxResolution: app.optionsLayer.maxResolution});  _12TMS.events.register('visibilitychanged', _12TMS, onChangeVisibilityLayer );var _13TMS = new OpenLayers.Layer.TMS('Rede Ferroviária', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_pdm_rede_ferroviaria',type: 'png',id_layer: '405'},{opacity: 1,isBaseLayer: false,displayInLayerSwitcher: true,visibility: false,buffer: 0,queryable: false,crossable: false,printpdm: false,layout_printpdm: 'A4 portrait',scales: null,resolutions: null,maxResolution: app.optionsLayer.maxResolution});  _13TMS.events.register('visibilitychanged', _13TMS, onChangeVisibilityLayer );var _14TMS = new OpenLayers.Layer.TMS('Topónimos de Lugar', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_lugares',type: 'png',globalid: '416;34',tipoid: '34',id_layer: '416'},{maxScale: 1,minScale: 25000,opacity: 1,isBaseLayer: false,displayInLayerSwitcher: true,visibility: true,buffer: 0,singleTile: false,queryable: false,crossable: false,printpdm: false,layout_printpdm: 'A4 portrait',scales: null,resolutions: null,maxResolution: app.optionsLayer.maxResolution,index_highlight: -1});  _14TMS.events.register('visibilitychanged', _14TMS, onChangeVisibilityLayer ); return[_4TMS,_5TMS,_6TMS,_7TMS,_8TMS,_9TMS,_10TMS,_11TMS,_12TMS,_13TMS,_14TMS]}function getControls(){var controls = {};controls.navigation=true;controls.get_information=true;controls.measure=true;controls.draw_polygon=true;controls.print_visible=true;controls.print_pdm=true;controls.print_pip=true;controls.comboshortcut=false;controls.scalebar=true;controls.overview=true;controls.theme=false;controls.tab_layers=true;controls.tab_search=true;controls.tab_emissao_plantas_localizacao=false;controls.tab_pedidos_plantas_localizacao=false;controls.tab_estatisticos=false;controls.tab_print=false;controls.tab_help=true;controls.regulamentos=true;controls.side = 'east';return controls;}