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',globalid: '362;1',id_layer: '421'},{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,index_highlight: -1});  _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: '428;38',tipoid: '38',id_layer: '428'},{maxScale: 1999,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});  _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',globalid: '363;2',id_layer: '422'},{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,index_highlight: -1});  _2TMS.events.register('visibilitychanged', _2TMS, onChangeVisibilityLayer ); return[_0TMS,_1TMS,_2TMS]}function getOverLayers(){var _3TMS = new OpenLayers.Layer.TMS('Rede Viá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_viaria_principal',type: 'png',id_layer: '461'},{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});  _3TMS.events.register('visibilitychanged', _3TMS, onChangeVisibilityLayer );var _4TMS = 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: '460'},{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('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: '459'},{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});  _5TMS.events.register('visibilitychanged', _5TMS, onChangeVisibilityLayer );var _6TMS = 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: '427'},{maxScale: 10000,opacity: 1,isBaseLayer: false,displayInLayerSwitcher: true,visibility: false,buffer: 0,queryable: false,crossable: false,printpdm: false,layout_printpdm: 'A4 landscape oeiras',scales: null,resolutions: null,maxResolution: app.optionsLayer.maxResolution,index_highlight: -1});  _6TMS.events.register('visibilitychanged', _6TMS, onChangeVisibilityLayer );var _7TMS = 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',typename: 'oeirasdigital:PDM_ORDENAMENTO',id_layer: '462'},{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});  _7TMS.events.register('visibilitychanged', _7TMS, onChangeVisibilityLayer );var _8TMS = new OpenLayers.Layer.TMS('SMAS', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_smas',type: 'png',id_layer: '475'},{maxScale: 1,minScale: 500000,opacity: 1,isBaseLayer: false,displayInLayerSwitcher: false,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});  _8TMS.events.register('visibilitychanged', _8TMS, onChangeVisibilityLayer );var _9TMS = new OpenLayers.Layer.TMS('Cartografia (vector)', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_planimetria',type: 'png',id_layer: '432'},{maxScale: 999,minScale: 10000,opacity: 1,isBaseLayer: false,displayInLayerSwitcher: true,visibility: false,buffer: 0,queryable: false,crossable: false,printpdm: false,layout_printpdm: 'A4 landscape oeiras',scales: null,resolutions: null,maxResolution: app.optionsLayer.maxResolution,index_highlight: -1});  _9TMS.events.register('visibilitychanged', _9TMS, onChangeVisibilityLayer );var _10TMS = new OpenLayers.Layer.TMS('Altimetria', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'oeiras_altimetria',type: 'png',id_layer: '431'},{maxScale: 999,minScale: 2500,opacity: 1,isBaseLayer: false,displayInLayerSwitcher: true,visibility: false,buffer: 0,queryable: false,crossable: false,printpdm: false,layout_printpdm: 'A4 landscape oeiras',scales: null,resolutions: null,maxResolution: app.optionsLayer.maxResolution,index_highlight: -1});  _10TMS.events.register('visibilitychanged', _10TMS, onChangeVisibilityLayer );var _11TMS = new OpenLayers.Layer.TMS('Rede Viária e Toponímia', ['http://cache1.municipia.pt/cache/','http://cache2.municipia.pt/cache/','http://cache3.municipia.pt/cache/','http://cache4.municipia.pt/cache/'],{layername: 'goprotec_ruas',type: 'png',globalid: '425;35',tipoid: '35',id_layer: '425'},{opacity: 1,isBaseLayer: false,displayInLayerSwitcher: true,visibility: true,buffer: 0,queryable: false,crossable: false,printpdm: false,layout_printpdm: 'A4 portrait',scales: null,resolutions: null,maxResolution: app.optionsLayer.maxResolution,index_highlight: -1});  _11TMS.events.register('visibilitychanged', _11TMS, onChangeVisibilityLayer );var _12TMS = new OpenLayers.Layer.TMS('Lugares', ['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: '424;34',tipoid: '34',id_layer: '424'},{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});  _12TMS.events.register('visibilitychanged', _12TMS, onChangeVisibilityLayer ); return[_3TMS,_4TMS,_5TMS,_6TMS,_7TMS,_8TMS,_9TMS,_10TMS,_11TMS,_12TMS]}function getControls(){var controls = {};controls.navigation=true;controls.get_information=false;controls.measure=true;controls.draw_polygon=true;controls.print_visible=true;controls.print_pdm=false;controls.print_pip=false;controls.scalebar=true;controls.overview=true;controls.theme=false;controls.tab_layers=true;controls.tab_search=true;controls.tab_emissao_plantas_localizacao=true;controls.tab_pedidos_plantas_localizacao=true;controls.tab_estatisticos=false;controls.tab_print=false;controls.tab_help=true;controls.regulamentos=false;controls.side = 'east';return controls;}