From 398ff5592940f4691aebcbb5adf73f74a42cfd06 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Wed, 7 Jan 2015 16:53:40 +0000 Subject: [PATCH] Inclusão de novos parâmetros na definição das ferramentas que são inicializadas com um mapa --- admin/php/classe_metaestat.php | 2 +- aplicmap/legenda6.htm | 2 +- atlas/geral.htm | 4 ++-- classesjs/classe_barradebotoes.js | 3338 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ classesjs/classe_guias.js | 1 - exemplos/abas.htm | 4 ++-- exemplos/aplic2.htm | 4 ++-- exemplos/botoes1.htm | 4 ++-- exemplos/botoes2.htm | 4 ++-- exemplos/botoes3.htm | 4 ++-- exemplos/botoes4.htm | 4 ++-- exemplos/botoes5.htm | 4 ++-- exemplos/botoes6.htm | 4 ++-- exemplos/botoeshtm.htm | 4 ++-- exemplos/botoestop.htm | 4 ++-- exemplos/camadas1.htm | 4 ++-- exemplos/camadas2.htm | 4 ++-- exemplos/camadas3.htm | 4 ++-- exemplos/camadas4.htm | 4 ++-- exemplos/camadas5.htm | 4 ++-- exemplos/fotos.htm | 4 ++-- exemplos/fotos1.htm | 12 ++++++------ exemplos/googlemapssanfona.phtml | 8 ++++---- exemplos/guias1.htm | 4 ++-- exemplos/guias2.htm | 8 ++++---- exemplos/guias3.htm | 4 ++-- exemplos/guias4.htm | 4 ++-- exemplos/legenda1.htm | 4 ++-- exemplos/legenda2.htm | 4 ++-- exemplos/login.htm | 4 ++-- exemplos/login1.htm | 4 ++-- exemplos/mashup1.htm | 4 ++-- exemplos/mashup2.htm | 4 ++-- exemplos/mashup3.htm | 4 ++-- exemplos/mashup4.htm | 4 ++-- exemplos/mashup5.htm | 4 ++-- exemplos/mashup6.htm | 4 ++-- exemplos/mashup7.htm | 6 +++--- exemplos/mashup8.htm | 4 ++-- exemplos/mashup9.htm | 4 ++-- exemplos/menus1.htm | 4 ++-- exemplos/menus2.htm | 4 ++-- exemplos/openlayers1.htm | 4 ++-- exemplos/openlayers2.htm | 4 ++-- exemplos/openlayers3.htm | 4 ++-- exemplos/openlayers4.htm | 4 ++-- exemplos/openlayers5.htm | 4 ++-- exemplos/visual1.htm | 4 ++-- exemplos/visual2.htm | 4 ++-- ferramentas/graficointerativo1/template_mst.html | 2 +- ferramentas/inseretxt/template_mst.html | 2 +- ferramentas/legenda/template_mst.html | 2 +- ferramentas/selecao/index.js | 1 - ferramentas/tabela/template_mst.html | 2 +- interface/carto_ol.htm | 4 ++-- interface/googleearth.phtml | 4 ++-- interface/googleearthdebug.phtml | 4 ++-- ms_configura.php | 2 +- 58 files changed, 1782 insertions(+), 1782 deletions(-) diff --git a/admin/php/classe_metaestat.php b/admin/php/classe_metaestat.php index 2101124..3ae5080 100755 --- a/admin/php/classe_metaestat.php +++ b/admin/php/classe_metaestat.php @@ -444,7 +444,7 @@ class Metaestat{ $sqlagrupamento .= " /*FA*//*FA*/ /*FAT*//*FAT*/ GROUP BY ".$agruparpor." ORDER BY ".$agruparpor; } //SQL para a primeira regiao __SQLDADOS__ ira conter os sqls dos niveis inferiores da regiao se ouver - //@TODO verificar tipos das colunas no join para tornar mais rapida a juncao + //@TODO ajustar tipos das colunas no join para tornar mais rapida a juncao $sqlIntermediario = "SELECT (j.valorcalculado) AS ".$dados["colunavalor"].", __COLUNASSEMGEO__". " FROM ".$dadosgeo["esquemadb"].".".$dadosgeo["tabela"]." AS regiao ". " INNER JOIN ( __SQLDADOS__ ) ". diff --git a/aplicmap/legenda6.htm b/aplicmap/legenda6.htm index f7aaba8..e7299b4 100755 --- a/aplicmap/legenda6.htm +++ b/aplicmap/legenda6.htm @@ -4,7 +4,7 @@ [if name=TEMA oper=neq value=NAO] [if name=legendawms oper=isset ] diff --git a/atlas/geral.htm b/atlas/geral.htm index 5c967d2..324ceaf 100644 --- a/atlas/geral.htm +++ b/atlas/geral.htm @@ -16,7 +16,7 @@ Inclui a barra superior. Se vc não quiser o menu, é só comentar o TR --> - +
- +  [metadata name=TEMA]
@@ -80,7 +80,7 @@
- +
diff --git a/classesjs/classe_barradebotoes.js b/classesjs/classe_barradebotoes.js index 04ba149..f35dcda 100644 --- a/classesjs/classe_barradebotoes.js +++ b/classesjs/classe_barradebotoes.js @@ -24,16 +24,16 @@ /** * Licença - * + * * GPL2 - * + * * i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet - * + * * Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com - * + * * Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo sob os termos da Licença * Pública Geral GNU conforme publicada pela Free Software Foundation; - * + * * Este programa é distribuído na expectativa de que seja útil, porém, SEM NENHUMA GARANTIA; nem mesmo a * garantia implícita de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença * Pública Geral do GNU para mais detalhes. Você deve ter recebido uma cópia da Licença Pública Geral do @@ -44,1289 +44,1275 @@ if (typeof (i3GEO) === 'undefined') { var i3GEO = {}; } i3GEO.barraDeBotoes = -{ - /** - * Variavel: BARRAS - * - * Array com os objetos YAHOO.i3GEO.janela.botoes criados - * - * Tipo: - * - * {array} - */ - BARRAS : [], - /** - * Variavel: BOTAOCLICADO - * - * Último icone que foi clicado - * - * Tipo: - * - * {String} - */ - BOTAOCLICADO : "", - /** - * Propriedade: ATIVA - * - * Indica se a barra de botões será ou não cosntruída automaticamente no processo de - * inicialização do mapa. - * - * Tipo: - * - * {boolean} - * - * Default: - * - * true - */ - ATIVA : true, - /** - * Propriedade: TIPO - * - * Tipo de barra. - * - * Por padrão, utiliza a biblioteca YUI para construir a barra, opcionalmente pode-se utilizar outro tipo. - * - * Se for utilizado o padrão YUI e os elementos para compor a barra não forem encontrados, a barra não - * será criada. - * - * O tipo emlinha insere os botões em um elemento html qualquer já existente na página. Nesse caso a barra - * não é iniciada automaticamente, sendo necessário usar a função - * - * i3GEO.barraDeBotoes.inicializaBarra("","",false,0,0,onde) - * - * Caso o parâmetro "onde" seja omitido ou o o elemento HTML com esse ID não for encontrado, será - * criado um elemento do tipo DIV no contexto do mapa. - * - * Se você quer usar a barra do tipo olho de peixe e seu mapa tiver tamanho fixo, utilize o tipo "olhodepeixe1" - * - * Tipo: - * - * {string} - * - * Default: - * - * {yui} - * - * Valores: - * - * {"yui","olhodepeixe","olhodepeixe1","emlinha"} - */ - TIPO : "yui", - /** - * Propriedade: OFFSET - * - * Ajuste do deslocamento vertical da barra (válido apenas para o tipo "olhodepeixe") - * - * Desloca a barra em uma determinada quantidade de pixels. Valores negativos fazem a barra subir. - * - * Tipo: - * - * {numeric} - * - * Default: - * - * {-205} - */ - OFFSET : -205, - /** - * Propriedade: POSICAO - * - * Define o posicionamento da barra de botões do tipo olhodepeixe - * - * Valores: - * - * {"top","bottom"} - * - * Tipo: - * - * {string} - * - * Default: - * - * {"bottom"} - */ - POSICAO : "bottom", - /** - * Propriedade: MAXBOTOES - * - * Número de botões iniciais (válido apenas para os tipos olho de peixe) - * - * Se for 0, todos os botões serão mostrados - * - * Tipo: - * - * {numeric} - * - * Default: - * - * {13} - */ - MAXBOTOES : 13, - /** - * Propriedade: AJUDA - * - * Mostra um texto de ajuda colado ao ícone da ferramenta - * - * Tipo: - * - * {boolean} - * - * Default: - * - * {true} - */ - AJUDA : true, - /** - * Propriedade: ORIENTACAO - * - * Orientação vertical ou horizontal da barra (não se aplica aos tipos olhos de peixe) - * - * Tipo: - * - * {string} - * - * Valores: - * - * {"horizontal","vertical"} - * - * Default: - * - * {"vertical"} - */ - ORIENTACAO : "vertical", - /** - * Propriedade: HORIZONTALW - * - * Largura da barra quando ORIENTACAO = "horizontal" (não se aplica aos tipos olhos de peixe) - * - * Tipo: - * - * {numeric} - * - * Default: - * - * {350} - */ - HORIZONTALW : 350, - /** - * Propriedade: TIPOAJUDA - * - * Tipo do balão de ajuda que é mostrado colado ao ícone da ferramenta - * - * Tipo: - * - * {string} - * - * Valores: - * - * {"horizontal","vertical","balao"} - * - * Default: - * - * {"horizontal"} - */ - TIPOAJUDA : "balao", - /** - * Propriedade: SOICONES - * - * Esconde as bordas das barras e o fundo, mostrando apenas os ícones (não se aplica aos tipos olhos de peixe) - * - * Default: - * - * {false} - * - * Tipo: - * - * {boolean} - */ - SOICONES : false, - /** - * Propriedade: AUTOALTURA - * - * Ajusta automaticamente a altura das barras conforme a altura do mapa. - * - * Esta opção não tem efeito se a barra contiver a barra de zoom (isso ocorre em função de um bug - * do YIU, que causa erro na barra nessas condições) - * - * Tipo: - * - * {boolean} - */ - AUTOALTURA : false, - /** - * Propriedade: TRANSICAOSUAVE - * - * Altera a transparência das barras quando o mouse sobrepõe a barra e quando sai da barra (não se aplica aos - * tipos olhos de peixe) - * - * Tipo: - * - * {boolean} - * - * Default: - * - * {true} - */ - TRANSICAOSUAVE : true, - /** - * Propriedade: OPACIDADE - * - * Valor da opacidade miníma utilizada quando TRANSICAOSUAVE for igual a true. (não se aplica aos tipos olhos de - * peixe) - * - * Varia de 0 a 100 - * - * Tipo: - * - * {numeric} - * - * Default: - * - * {65} - */ - OPACIDADE : 65, - /** - * Propriedade: PERMITEFECHAR - * - * Mostra o botão para fechar as barras ou não. - * - * Tipo: - * - * {boolean} - */ - PERMITEFECHAR : true, - /** - * Propriedade: PERMITEDESLOCAR - * - * Permite deslocar as barras ou não. - * - * Tipo: - * - * {boolean} - */ - PERMITEDESLOCAR : true, - /** - * ATIVAMENUCONTEXTO depreciado na versao 6.0 - */ - ATIVAMENUCONTEXTO : false, - /** - * Propriedade: AUTO - * - * Cria as barras de botões automaticamente, utilizando os botões padrão sem considerar a lista de - * botões definidas no HTML da interface. - * - * A lista de botões é definida em i3GEO.configura - * - * Tipo: - * - * {Boolean} - * - * Default: - * - * {false} - */ - AUTO : false, - /** - * Propriedade: LISTABOTOES - * - * Objeto com a lista de botões e suas propriedades, como por exemplo, a função a ser executada ao se clicar no - * botão. - * - * Essa lista não indica quais os botões que serão inseridos. Para definir os botões que serão - * inseridos, inclua no HTML da interface os botões desejados (veja em i3geo/exemplos). Se vc utilizar a opção - * i3GEO.barraDeBotoes.AUTO = true , os botões serão inseridos automaticamente. Nesse caso, utilize a - * opção i3GEO.barraDeBotoes.INCLUIRBOTOES para indicar os botões desejados. - * - * Por default utiliza os botoes definidos em i3GEO.configura.funcoesBotoes.botoes - * - * Tipo: - * - * {objeto} - */ - LISTABOTOES : i3GEO.configura.funcoesBotoes.botoes, - /** - * Propriedade: INCLUIBOTAO - * - * Objeto que indica quais os botões que serão inseridos na barra de botões 2. - * - * Essa opção só funciona se i3GEO.barraDeBotoes.AUTO = true - * - * Vc pode também alterar a ordem dos botoes ou adicionar novos - * - * Na barra de botões do tipo "yui", as chaves serão adicionadas como o atributo "id" em cada botão. Nesse - * caso, é possível definir o estilo CSS para cada botão (veja em i3geo/css/botoes2.css). - * - * A ativação de cada botão, ou seja, a função que é executada ao ser feito o clique, - * é definida em i3GEO.configura.funcoesBotoes - * - * Default: - * - * INCLUIBOTAO: { - * - * abreJanelaLegenda: false, - * - * zoomli: false, - * - * zoomiauto: false, - * - * zoomoauto: false - * - * pan: false, - * - * zoomtot:false, - * - * identifica: true, - * - * identificaBalao: true, - * - * mede: true, - * - * area: true, - * - * imprimir: true, - * - * reinicia: true, - * - * exten: true, - * - * referencia: true, - * - * inserexy: true, - * - * textofid: true, - * - * selecao: true, - * - * barraedicao: false, - * - * google: true, - * - * buscafotos: true, - * - * wiki: true, - * - * metar: true, - * - * lentei: true, - * - * confluence: true, - * - * inseregrafico: true, - * - * v3d: true, - * - * localizar: true, - * - * zoomproximo: true, - * - * zoomanterior: true } - * - * Tipo: - * - * {objeto} - */ - INCLUIBOTAO : { - abreJanelaLegenda : true, - localizar : true, - zoomanterior : true, - zoomli : true, - zoomproximo : true, - zoomiauto : false, - zoomoauto : false, - pan : true, - zoomtot : true, - identifica : true, - identificaBalao : true, - mede : true, - area : true, - selecao : true, - barraedicao : true, - imprimir : true, - google : true, - referencia : true, - exten : true, - inserexy : true, - textofid : true, - reinicia : true, - buscafotos : true, - wiki : true, - metar : true, - lentei : true, - confluence : true, - inseregrafico : true, - v3d : false - }, - /** - * Propriedade: ICONEBOTAO - * - * Ícones utilizados em cada um dos botões da barra. - * - * Esses ícones são utilizados apenas se i3GEO.barraDeBotoes.TIPO = "olhodepeixe" e "olhodepeixe1". Para cada elemento - * existente em i3GEO.barraDeBotoes.INCLUIBOTAO deve existir um elemento nesse objeto. A chave de cada elemento é a mesma do - * objeto INCLUIBOTAO. O endereço da imagem será complementado pelo i3geo, adicionando no início da string o - * valor da variável i3GEO.configura.locaplic - * - * Default: - * - * ICONEBOTAO: { - * - * zoomli: "/imagens/gisicons/eudock/zoom-region.png", - * - * zoomproximo: "/imagens/gisicons/eudock/zoom-next.png", - * - * zoomanterior: "/imagens/gisicons/eudock/zoom-last.png", - * - * pan: "/imagens/gisicons/eudock/pan.png", - * - * zoomtot: "/imagens/gisicons/eudock/zoom-extent.png", - * - * identifica: "/imagens/gisicons/eudock/identify.png", - * - * identificaBalao: "/imagens/gisicons/eudock/tips.png", - * - * mede: "/imagens/gisicons/eudock/length-measure.png", - * - * area: "/imagens/gisicons/eudock/area-measure.png", - * - * imprimir: "/imagens/gisicons/eudock/print.png", - * - * reinicia: "/imagens/gisicons/eudock/redraw.png", - * - * exten: "/imagens/gisicons/eudock/map-extent-info.png", - * - * referencia: "/imagens/gisicons/eudock/map-reference.png", - * - * inserexy: "/imagens/gisicons/eudock/point-create.png", - * - * textofid: "/imagens/gisicons/eudock/text-add.png", - * - * selecao: "/imagens/gisicons/eudock/select.png", - * - * google: "/imagens/gisicons/eudock/google-map.png", - * - * buscafotos: "/imagens/gisicons/eudock/fotos.png", - * - * wiki: "/imagens/gisicons/eudock/wiki.png", - * - * metar: "/imagens/gisicons/eudock/metar.png", - * - * lentei: "/imagens/gisicons/eudock/lente.png", - * - * confluence: "/imagens/gisicons/eudock/confluence.png", - * - * inseregrafico: "/imagens/gisicons/eudock/grafico.png", - * - * v3d: "/imagens/gisicons/eudock/v3d.png", - * - * barraedicao: "/imagens/gisicons/eudock/editopen.png", - * - * localizar: "/imagens/gisicons/eudock/search.png", - * - * abreJanelaLegenda: "/imagens/gisicons/eudock/legenda.png" } - * - * Type: - * - * {objeto} - */ - ICONEBOTAO : { - zoomli : "/imagens/gisicons/eudock/zoom-region.png", - zoomproximo : "/imagens/gisicons/eudock/zoom-next.png", - zoomanterior : "/imagens/gisicons/eudock/zoom-last.png", - zoomiauto : "/imagens/gisicons/eudock/zoom-in.png", - zoomoauto : "/imagens/gisicons/eudock/zoom-out.png", - pan : "/imagens/gisicons/eudock/pan.png", - zoomtot : "/imagens/gisicons/eudock/zoom-extent.png", - identifica : "/imagens/gisicons/eudock/identify.png", - identificaBalao : "/imagens/gisicons/eudock/tips.png", - mede : "/imagens/gisicons/eudock/length-measure.png", - area : "/imagens/gisicons/eudock/area-measure.png", - imprimir : "/imagens/gisicons/eudock/print.png", - reinicia : "/imagens/gisicons/eudock/redraw.png", - exten : "/imagens/gisicons/eudock/map-extent-info.png", - referencia : "/imagens/gisicons/eudock/map-reference.png", - inserexy : "/imagens/gisicons/eudock/point-create.png", - textofid : "/imagens/gisicons/eudock/text-add.png", - selecao : "/imagens/gisicons/eudock/select.png", - google : "/imagens/gisicons/eudock/google-map.png", - buscafotos : "/imagens/gisicons/eudock/fotos.png", - wiki : "/imagens/gisicons/eudock/wiki.png", - metar : "/imagens/gisicons/eudock/metar.png", - lentei : "/imagens/gisicons/eudock/lente.png", - confluence : "/imagens/gisicons/eudock/confluence.png", - inseregrafico : "/imagens/gisicons/eudock/grafico.png", - v3d : "/imagens/gisicons/eudock/v3d.png", - barraedicao : "/imagens/gisicons/eudock/editopen.png", - localizar : "/imagens/gisicons/eudock/search.png", - abreJanelaLegenda : "/imagens/gisicons/eudock/show-legend.png" - }, - /** - * Propriedade: TEMPLATEBOTAO - * - * Template HTML que será utilizado na construção automática dos botões da barra 2. - * - * Utilize a string $$ para indicar onde será incluído o código do botão. - * - * Default: "
- *

- *   - *

- *
" - * - * Tipo: - * - * {string} - */ - TEMPLATEBOTAO : "", - /** - * Propriedade: BOTAOPADRAO - * - * Botão que será ativado ao inicializar os botões com ativaBotoes. - * - * Correpsonde ao item iddiv de LISTABOTOES - * - * Tipo: - * - * {String} - */ - BOTAOPADRAO : "pan", - /** - * Propriedade: COMPORTAMENTO - * - * Define o comportamento dos botões quando é pressionado - * - * Tipo: - * - * {String} - * - * Valores: - * - * "padrao" - comportamento padrão, com bordas da esquerda e inferiores ativadas - * - * "destacado" - destaca apenas o botão atualmente pressionado - * - * "vermelho" - destaca com fundo vermelho - * - * "laranja" - destaca com fundo laranja - * - * "cinza" - destaca com fundo cinza - * - */ - COMPORTAMENTO : "padrao", - /** - * Function: adicionaBotao - * - * Adiciona um novo botao nas definicoes da barra de botoes - * - * O Objeto deve ser como no exemplo abaixo - * - * i3GEO.barraDeBotoes.adicionaBotao( { iddiv:"meubotao", tipo:"", dica:"Meu Botão", titulo: "Meu Botão", icone: - * "/imagens/oxygen/22x22/user-online.png", funcaoonclick:function(){ alert("Meu novo botao com ID = meubotao"); } } ); - */ - adicionaBotao : function(obj) { - i3GEO.barraDeBotoes.LISTABOTOES.push(obj); - i3GEO.barraDeBotoes.ICONEBOTAO[obj.iddiv] = "/imagens/oxygen/22x22/user-online.png"; - i3GEO.barraDeBotoes.INCLUIBOTAO[obj.iddiv] = true; - }, - /** - * Function: ativaPadrao - * - * Ativa o botão definido como padrão, executando a função definida em onclick - * - * Utilizado para restaurar o status padrão da barra, principalmente por ferramentas que alteram ícones e outras - * propriedades do mapa - */ - ativaPadrao : function() { - if (i3GEO.barraDeBotoes.ATIVA === true) { - try { - var botao = i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO); - if (botao.funcaoonclick) { - botao.funcaoonclick.call(); + { + /** + * Variavel: BARRAS + * + * Array com os objetos YAHOO.i3GEO.janela.botoes criados + * + * Tipo: + * + * {array} + */ + BARRAS : [], + /** + * Variavel: BOTAOCLICADO + * + * Último icone que foi clicado + * + * Tipo: + * + * {String} + */ + BOTAOCLICADO : "", + /** + * Propriedade: ATIVA + * + * Indica se a barra de botões será ou não cosntruída automaticamente no processo de + * inicialização do mapa. + * + * Tipo: + * + * {boolean} + * + * Default: + * + * true + */ + ATIVA : true, + /** + * Propriedade: TIPO + * + * Tipo de barra. + * + * Por padrão, utiliza a biblioteca YUI para construir a barra, opcionalmente pode-se utilizar outro tipo. + * + * Se for utilizado o padrão YUI e os elementos para compor a barra não forem encontrados, a barra não + * será criada. + * + * O tipo emlinha insere os botões em um elemento html qualquer já existente na página. Nesse caso a barra + * não é iniciada automaticamente, sendo necessário usar a função + * + * i3GEO.barraDeBotoes.inicializaBarra("","",false,0,0,onde) + * + * Caso o parâmetro "onde" seja omitido ou o o elemento HTML com esse ID não for encontrado, será + * criado um elemento do tipo DIV no contexto do mapa. + * + * Se você quer usar a barra do tipo olho de peixe e seu mapa tiver tamanho fixo, utilize o tipo "olhodepeixe1" + * + * Tipo: + * + * {string} + * + * Default: + * + * {yui} + * + * Valores: + * + * {"yui","olhodepeixe","olhodepeixe1","emlinha"} + */ + TIPO : "yui", + /** + * Propriedade: OFFSET + * + * Ajuste do deslocamento vertical da barra (válido apenas para o tipo "olhodepeixe") + * + * Desloca a barra em uma determinada quantidade de pixels. Valores negativos fazem a barra subir. + * + * Tipo: + * + * {numeric} + * + * Default: + * + * {-205} + */ + OFFSET : -205, + /** + * Propriedade: POSICAO + * + * Define o posicionamento da barra de botões do tipo olhodepeixe + * + * Valores: + * + * {"top","bottom"} + * + * Tipo: + * + * {string} + * + * Default: + * + * {"bottom"} + */ + POSICAO : "bottom", + /** + * Propriedade: MAXBOTOES + * + * Número de botões iniciais (válido apenas para os tipos olho de peixe) + * + * Se for 0, todos os botões serão mostrados + * + * Tipo: + * + * {numeric} + * + * Default: + * + * {13} + */ + MAXBOTOES : 13, + /** + * Propriedade: AJUDA + * + * Mostra um texto de ajuda colado ao ícone da ferramenta + * + * Tipo: + * + * {boolean} + * + * Default: + * + * {true} + */ + AJUDA : true, + /** + * Propriedade: ORIENTACAO + * + * Orientação vertical ou horizontal da barra (não se aplica aos tipos olhos de peixe) + * + * Tipo: + * + * {string} + * + * Valores: + * + * {"horizontal","vertical"} + * + * Default: + * + * {"vertical"} + */ + ORIENTACAO : "vertical", + /** + * Propriedade: HORIZONTALW + * + * Largura da barra quando ORIENTACAO = "horizontal" (não se aplica aos tipos olhos de peixe) + * + * Tipo: + * + * {numeric} + * + * Default: + * + * {350} + */ + HORIZONTALW : 350, + /** + * Propriedade: TIPOAJUDA + * + * Tipo do balão de ajuda que é mostrado colado ao ícone da ferramenta + * + * Tipo: + * + * {string} + * + * Valores: + * + * {"horizontal","vertical","balao"} + * + * Default: + * + * {"horizontal"} + */ + TIPOAJUDA : "balao", + /** + * Propriedade: SOICONES + * + * Esconde as bordas das barras e o fundo, mostrando apenas os ícones (não se aplica aos tipos olhos de peixe) + * + * Default: + * + * {false} + * + * Tipo: + * + * {boolean} + */ + SOICONES : false, + /** + * Propriedade: AUTOALTURA + * + * Ajusta automaticamente a altura das barras conforme a altura do mapa. + * + * Esta opção não tem efeito se a barra contiver a barra de zoom (isso ocorre em função de um bug + * do YIU, que causa erro na barra nessas condições) + * + * Tipo: + * + * {boolean} + */ + AUTOALTURA : false, + /** + * Propriedade: TRANSICAOSUAVE + * + * Altera a transparência das barras quando o mouse sobrepõe a barra e quando sai da barra (não se aplica aos + * tipos olhos de peixe) + * + * Tipo: + * + * {boolean} + * + * Default: + * + * {true} + */ + TRANSICAOSUAVE : true, + /** + * Propriedade: OPACIDADE + * + * Valor da opacidade miníma utilizada quando TRANSICAOSUAVE for igual a true. (não se aplica aos tipos olhos de + * peixe) + * + * Varia de 0 a 100 + * + * Tipo: + * + * {numeric} + * + * Default: + * + * {65} + */ + OPACIDADE : 65, + /** + * Propriedade: PERMITEFECHAR + * + * Mostra o botão para fechar as barras ou não. + * + * Tipo: + * + * {boolean} + */ + PERMITEFECHAR : true, + /** + * Propriedade: PERMITEDESLOCAR + * + * Permite deslocar as barras ou não. + * + * Tipo: + * + * {boolean} + */ + PERMITEDESLOCAR : true, + /** + * ATIVAMENUCONTEXTO depreciado na versao 6.0 + */ + ATIVAMENUCONTEXTO : false, + /** + * Propriedade: AUTO + * + * Cria as barras de botões automaticamente, utilizando os botões padrão sem considerar a lista de + * botões definidas no HTML da interface. + * + * A lista de botões é definida em i3GEO.configura + * + * Tipo: + * + * {Boolean} + * + * Default: + * + * {false} + */ + AUTO : false, + /** + * Propriedade: LISTABOTOES + * + * Objeto com a lista de botões e suas propriedades, como por exemplo, a função a ser executada ao se clicar no + * botão. + * + * Essa lista não indica quais os botões que serão inseridos. Para definir os botões que serão + * inseridos, inclua no HTML da interface os botões desejados (veja em i3geo/exemplos). Se vc utilizar a opção + * i3GEO.barraDeBotoes.AUTO = true , os botões serão inseridos automaticamente. Nesse caso, utilize a + * opção i3GEO.barraDeBotoes.INCLUIRBOTOES para indicar os botões desejados. + * + * Por default utiliza os botoes definidos em i3GEO.configura.funcoesBotoes.botoes + * + * Tipo: + * + * {objeto} + */ + LISTABOTOES : i3GEO.configura.funcoesBotoes.botoes, + /** + * Propriedade: INCLUIBOTAO + * + * Objeto que indica quais os botões que serão inseridos na barra de botões 2. + * + * Essa opção só funciona se i3GEO.barraDeBotoes.AUTO = true + * + * Vc pode também alterar a ordem dos botoes ou adicionar novos + * + * Na barra de botões do tipo "yui", as chaves serão adicionadas como o atributo "id" em cada botão. Nesse + * caso, é possível definir o estilo CSS para cada botão (veja em i3geo/css/botoes2.css). + * + * A ativação de cada botão, ou seja, a função que é executada ao ser feito o clique, + * é definida em i3GEO.configura.funcoesBotoes + * + * Default: + * + * INCLUIBOTAO: { + * + * abreJanelaLegenda: false, + * + * zoomli: false, + * + * zoomiauto: false, + * + * zoomoauto: false + * + * pan: false, + * + * zoomtot:false, + * + * identifica: true, + * + * identificaBalao: true, + * + * mede: true, + * + * area: true, + * + * imprimir: true, + * + * reinicia: true, + * + * exten: true, + * + * referencia: true, + * + * inserexy: true, + * + * textofid: true, + * + * selecao: true, + * + * barraedicao: false, + * + * google: true, + * + * buscafotos: true, + * + * wiki: true, + * + * metar: true, + * + * lentei: true, + * + * confluence: true, + * + * inseregrafico: true, + * + * v3d: true, + * + * localizar: true, + * + * zoomproximo: true, + * + * zoomanterior: true } + * + * Tipo: + * + * {objeto} + */ + INCLUIBOTAO : { + abreJanelaLegenda : true, + localizar : true, + zoomanterior : true, + zoomli : true, + zoomproximo : true, + zoomiauto : false, + zoomoauto : false, + pan : true, + zoomtot : true, + identifica : true, + identificaBalao : true, + mede : true, + area : true, + selecao : true, + barraedicao : true, + imprimir : true, + google : true, + referencia : true, + exten : true, + inserexy : true, + textofid : true, + reinicia : true, + buscafotos : true, + wiki : true, + metar : true, + lentei : true, + confluence : true, + inseregrafico : true, + v3d : false + }, + /** + * Propriedade: ICONEBOTAO + * + * Ícones utilizados em cada um dos botões da barra. + * + * Esses ícones são utilizados apenas se i3GEO.barraDeBotoes.TIPO = "olhodepeixe" e "olhodepeixe1". Para cada elemento + * existente em i3GEO.barraDeBotoes.INCLUIBOTAO deve existir um elemento nesse objeto. A chave de cada elemento é a mesma do + * objeto INCLUIBOTAO. O endereço da imagem será complementado pelo i3geo, adicionando no início da string o + * valor da variável i3GEO.configura.locaplic + * + * Default: + * + * ICONEBOTAO: { + * + * zoomli: "/imagens/gisicons/eudock/zoom-region.png", + * + * zoomproximo: "/imagens/gisicons/eudock/zoom-next.png", + * + * zoomanterior: "/imagens/gisicons/eudock/zoom-last.png", + * + * pan: "/imagens/gisicons/eudock/pan.png", + * + * zoomtot: "/imagens/gisicons/eudock/zoom-extent.png", + * + * identifica: "/imagens/gisicons/eudock/identify.png", + * + * identificaBalao: "/imagens/gisicons/eudock/tips.png", + * + * mede: "/imagens/gisicons/eudock/length-measure.png", + * + * area: "/imagens/gisicons/eudock/area-measure.png", + * + * imprimir: "/imagens/gisicons/eudock/print.png", + * + * reinicia: "/imagens/gisicons/eudock/redraw.png", + * + * exten: "/imagens/gisicons/eudock/map-extent-info.png", + * + * referencia: "/imagens/gisicons/eudock/map-reference.png", + * + * inserexy: "/imagens/gisicons/eudock/point-create.png", + * + * textofid: "/imagens/gisicons/eudock/text-add.png", + * + * selecao: "/imagens/gisicons/eudock/select.png", + * + * google: "/imagens/gisicons/eudock/google-map.png", + * + * buscafotos: "/imagens/gisicons/eudock/fotos.png", + * + * wiki: "/imagens/gisicons/eudock/wiki.png", + * + * metar: "/imagens/gisicons/eudock/metar.png", + * + * lentei: "/imagens/gisicons/eudock/lente.png", + * + * confluence: "/imagens/gisicons/eudock/confluence.png", + * + * inseregrafico: "/imagens/gisicons/eudock/grafico.png", + * + * v3d: "/imagens/gisicons/eudock/v3d.png", + * + * barraedicao: "/imagens/gisicons/eudock/editopen.png", + * + * localizar: "/imagens/gisicons/eudock/search.png", + * + * abreJanelaLegenda: "/imagens/gisicons/eudock/legenda.png" } + * + * Type: + * + * {objeto} + */ + ICONEBOTAO : { + zoomli : "/imagens/gisicons/eudock/zoom-region.png", + zoomproximo : "/imagens/gisicons/eudock/zoom-next.png", + zoomanterior : "/imagens/gisicons/eudock/zoom-last.png", + zoomiauto : "/imagens/gisicons/eudock/zoom-in.png", + zoomoauto : "/imagens/gisicons/eudock/zoom-out.png", + pan : "/imagens/gisicons/eudock/pan.png", + zoomtot : "/imagens/gisicons/eudock/zoom-extent.png", + identifica : "/imagens/gisicons/eudock/identify.png", + identificaBalao : "/imagens/gisicons/eudock/tips.png", + mede : "/imagens/gisicons/eudock/length-measure.png", + area : "/imagens/gisicons/eudock/area-measure.png", + imprimir : "/imagens/gisicons/eudock/print.png", + reinicia : "/imagens/gisicons/eudock/redraw.png", + exten : "/imagens/gisicons/eudock/map-extent-info.png", + referencia : "/imagens/gisicons/eudock/map-reference.png", + inserexy : "/imagens/gisicons/eudock/point-create.png", + textofid : "/imagens/gisicons/eudock/text-add.png", + selecao : "/imagens/gisicons/eudock/select.png", + google : "/imagens/gisicons/eudock/google-map.png", + buscafotos : "/imagens/gisicons/eudock/fotos.png", + wiki : "/imagens/gisicons/eudock/wiki.png", + metar : "/imagens/gisicons/eudock/metar.png", + lentei : "/imagens/gisicons/eudock/lente.png", + confluence : "/imagens/gisicons/eudock/confluence.png", + inseregrafico : "/imagens/gisicons/eudock/grafico.png", + v3d : "/imagens/gisicons/eudock/v3d.png", + barraedicao : "/imagens/gisicons/eudock/editopen.png", + localizar : "/imagens/gisicons/eudock/search.png", + abreJanelaLegenda : "/imagens/gisicons/eudock/show-legend.png" + }, + /** + * Propriedade: TEMPLATEBOTAO + * + * Template HTML que será utilizado na construção automática dos botões da barra 2. + * + * Utilize a string $$ para indicar onde será incluído o código do botão. + * + * Default: "
+ *

+ *   + *

+ *
" + * + * Tipo: + * + * {string} + */ + TEMPLATEBOTAO : "", + /** + * Propriedade: BOTAOPADRAO + * + * Botão que será ativado ao inicializar os botões com ativaBotoes. + * + * Correpsonde ao item iddiv de LISTABOTOES + * + * Tipo: + * + * {String} + */ + BOTAOPADRAO : "pan", + /** + * Propriedade: COMPORTAMENTO + * + * Define o comportamento dos botões quando é pressionado + * + * Tipo: + * + * {String} + * + * Valores: + * + * "padrao" - comportamento padrão, com bordas da esquerda e inferiores ativadas + * + * "destacado" - destaca apenas o botão atualmente pressionado + * + * "vermelho" - destaca com fundo vermelho + * + * "laranja" - destaca com fundo laranja + * + * "cinza" - destaca com fundo cinza + * + */ + COMPORTAMENTO : "padrao", + /** + * Function: adicionaBotao + * + * Adiciona um novo botao nas definicoes da barra de botoes + * + * O Objeto deve ser como no exemplo abaixo + * + * i3GEO.barraDeBotoes.adicionaBotao( { iddiv:"meubotao", tipo:"", dica:"Meu Botão", titulo: "Meu Botão", icone: + * "/imagens/oxygen/22x22/user-online.png", funcaoonclick:function(){ alert("Meu novo botao com ID = meubotao"); } } ); + */ + adicionaBotao : function(obj) { + i3GEO.barraDeBotoes.LISTABOTOES.push(obj); + i3GEO.barraDeBotoes.ICONEBOTAO[obj.iddiv] = "/imagens/oxygen/22x22/user-online.png"; + i3GEO.barraDeBotoes.INCLUIBOTAO[obj.iddiv] = true; + }, + /** + * Function: ativaPadrao + * + * Ativa o botão definido como padrão, executando a função definida em onclick + * + * Utilizado para restaurar o status padrão da barra, principalmente por ferramentas que alteram ícones e outras + * propriedades do mapa + */ + ativaPadrao : function() { + if (i3GEO.barraDeBotoes.ATIVA === true) { + try { + var botao = i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO); + if (botao.funcaoonclick) { + botao.funcaoonclick.call(); + } + } catch (e) { } - } catch (e) { } - } - }, - /** - * Function: ativaIcone - * - * Altera as bordas de um ícone aplicando um efeito de ícone realçado. - * - * Todos os demais ícones definidos em LISTABOTOES e que tiverem o tipo = "dinamico" serão processados para alterar as - * bordas dando o efeito de não ativo. - * - * Parametro: - * - * {String} - id do icone que será ativado. Esse id é o mesmo definido em LISTABOTOES - */ - ativaIcone : function(icone) { - if (typeof (console) !== 'undefined') - console.info("i3GEO.barraDeBotoes.ativaIcone()"); + }, + /** + * Function: ativaIcone + * + * Altera as bordas de um ícone aplicando um efeito de ícone realçado. + * + * Todos os demais ícones definidos em LISTABOTOES e que tiverem o tipo = "dinamico" serão processados para alterar as + * bordas dando o efeito de não ativo. + * + * Parametro: + * + * {String} - id do icone que será ativado. Esse id é o mesmo definido em LISTABOTOES + */ + ativaIcone : function(icone) { + if (typeof (console) !== 'undefined') + console.info("i3GEO.barraDeBotoes.ativaIcone()"); - if (i3GEO.barraDeBotoes.ATIVA === false) { - return; - } - var estilo, temp, ist, cor, ko, estiloatual = "white"; - if ($i(icone)) { - estiloatual = $i(icone).style.backgroundColor; - } - i3GEO.barraDeBotoes.BOTAOCLICADO = icone; - ko = i3GEO.barraDeBotoes.LISTABOTOES.length - 1; - if (i3GEO.barraDeBotoes.COMPORTAMENTO === "padrao") { - if (ko >= 0) { - do { - temp = $i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv); - if (i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo === "dinamico" && temp) { - ist = temp.style; - ist.borderWidth = "1px"; - ist.borderColor = 'white'; - if (i3GEO.barraDeBotoes.SOICONES === true) { - ist.borderLeftColor = 'rgb(50,50,50)'; - ist.borderBottomColor = 'rgb(50,50,50)'; - } - } - } while (ko--); + if (i3GEO.barraDeBotoes.ATIVA === false) { + return; } - // ativa o icone + var estilo, temp, ist, cor, ko, estiloatual = "white"; if ($i(icone)) { - estilo = $i(icone).style; - if (i3GEO.barraDeBotoes.SOICONES === false) { - estilo.borderColor = 'white'; - estilo.borderWidth = "1px"; - } + estiloatual = $i(icone).style.backgroundColor; } - } - if (i3GEO.barraDeBotoes.COMPORTAMENTO === "destacado") { - if (ko >= 0) { - do { - temp = $i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv); - if (temp) { - ist = temp.style; - ist.borderWidth = "1px"; - ist.borderColor = 'white'; + i3GEO.barraDeBotoes.BOTAOCLICADO = icone; + ko = i3GEO.barraDeBotoes.LISTABOTOES.length - 1; + if (i3GEO.barraDeBotoes.COMPORTAMENTO === "padrao") { + if (ko >= 0) { + do { + temp = $i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv); + if (i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo === "dinamico" && temp) { + ist = temp.style; + ist.borderWidth = "1px"; + ist.borderColor = 'white'; + if (i3GEO.barraDeBotoes.SOICONES === true) { + ist.borderLeftColor = 'rgb(50,50,50)'; + ist.borderBottomColor = 'rgb(50,50,50)'; + } + } + } while (ko--); + } + // ativa o icone + if ($i(icone)) { + estilo = $i(icone).style; + if (i3GEO.barraDeBotoes.SOICONES === false) { + estilo.borderColor = 'white'; + estilo.borderWidth = "1px"; } - } while (ko--); - } - // ativa o icone - if ($i(icone)) { - estilo = $i(icone).style; - if (i3GEO.barraDeBotoes.SOICONES === false) { - estilo.borderColor = 'black'; - estilo.borderWidth = "1px"; } } - } - if (i3GEO.util.in_array(i3GEO.barraDeBotoes.COMPORTAMENTO, [ - "laranja", - "vermelho", - "cinza" - ])) { - if (ko >= 0) { - do { - temp = $i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv); - if (temp) { - ist = temp.style; - if (i3GEO.barraDeBotoes.SOICONES === false) { + if (i3GEO.barraDeBotoes.COMPORTAMENTO === "destacado") { + if (ko >= 0) { + do { + temp = $i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv); + if (temp) { + ist = temp.style; ist.borderWidth = "1px"; ist.borderColor = 'white'; - ist.backgroundColor = 'white'; - } else { - ist.backgroundColor = ''; } + } while (ko--); + } + // ativa o icone + if ($i(icone)) { + estilo = $i(icone).style; + if (i3GEO.barraDeBotoes.SOICONES === false) { + estilo.borderColor = 'black'; + estilo.borderWidth = "1px"; } - } while (ko--); - } - switch (i3GEO.barraDeBotoes.COMPORTAMENTO) { - case "laranja": - cor = "orange"; - break; - case "vermelho": - cor = "red"; - break; - case "cinza": - cor = "gray"; - break; - default: - cor = "yellow"; + } } - ; - // ativa o icone - if ($i(icone)) { - estilo = $i(icone).style; - if (i3GEO.barraDeBotoes.SOICONES === false) { - estilo.borderColor = 'black'; - estilo.borderWidth = "1px"; + if (i3GEO.util.in_array(i3GEO.barraDeBotoes.COMPORTAMENTO, [ + "laranja", + "vermelho", + "cinza" + ])) { + if (ko >= 0) { + do { + temp = $i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv); + if (temp) { + ist = temp.style; + if (i3GEO.barraDeBotoes.SOICONES === false) { + ist.borderWidth = "1px"; + ist.borderColor = 'white'; + ist.backgroundColor = 'white'; + } else { + ist.backgroundColor = ''; + } + } + } while (ko--); } - // else - // {estilo.border = "0px solid white";} - if (estiloatual == cor) { - estilo.backgroundColor = 'white'; - } else { - estilo.backgroundColor = cor; + switch (i3GEO.barraDeBotoes.COMPORTAMENTO) { + case "laranja": + cor = "orange"; + break; + case "vermelho": + cor = "red"; + break; + case "cinza": + cor = "gray"; + break; + default: + cor = "yellow"; } - } - } - }, - /** - * Function: ativaBotoes - * - * Ativa os botoes definidos em LISTABOTOES - * - * Os botoes são construídos e as funções definidas são embutidas no evento onclick - * - * Parametro: - * - * {String} - botao que será mostrado como ativo (opcional). Se não for definido, será utilizado o - * botão especificado em BOTAOPADRAO. O nome do botao deve estar em LISTABOTOES na propriedade iddiv - */ - ativaBotoes : function(padrao) { - if (typeof (console) !== 'undefined') - console.info("i3GEO.barraDeBotoes.ativaBotoes()"); - - var l, b, temp; - if (arguments.length === 0) { - padrao = this.BOTAOPADRAO; - } - this.BOTAOCLICADO = padrao; - l = this.LISTABOTOES; - b = l.length - 1; - if (b >= 0) { - do { - temp = $i(l[b].iddiv); - if (temp) { - if (l[b].conteudo) { - temp.innerHTML = l[b].conteudo; - } - if (l[b].dica && i3GEO.barraDeBotoes.TIPO != "emlinha") { - $i(l[b].iddiv).onmouseover = function(e) { - i3GEO.barraDeBotoes.mostraJanela(this, l[b].dica, e); - }; - $i(l[b].iddiv).onmouseout = function(e) { - i3GEO.barraDeBotoes.mostraJanela(this, "", e); - }; + ; + // ativa o icone + if ($i(icone)) { + estilo = $i(icone).style; + if (i3GEO.barraDeBotoes.SOICONES === false) { + estilo.borderColor = 'black'; + estilo.borderWidth = "1px"; } - if (l[b].titulo && i3GEO.barraDeBotoes.TIPO === "emlinha") { - new YAHOO.widget.Tooltip(l[b].iddiv + "_tip", { - context : l[b].iddiv, - text : l[b].titulo - }); + // else + // {estilo.border = "0px solid white";} + if (estiloatual == cor) { + estilo.backgroundColor = 'white'; + } else { + estilo.backgroundColor = cor; } - if (l[b].funcaoonclick) { - temp.onclick = l[b].funcaoonclick; - if (l[b].iddiv == padrao) { - l[b].funcaoonclick(); + } + } + }, + /** + * Function: ativaBotoes + * + * Ativa os botoes definidos em LISTABOTOES + * + * Os botoes são construídos e as funções definidas são embutidas no evento onclick + * + * Parametro: + * + * {String} - botao que será mostrado como ativo (opcional). Se não for definido, será utilizado o botão + * especificado em BOTAOPADRAO. O nome do botao deve estar em LISTABOTOES na propriedade iddiv + */ + ativaBotoes : function(padrao) { + if (typeof (console) !== 'undefined') + console.info("i3GEO.barraDeBotoes.ativaBotoes()"); + + var l, b, temp; + if (arguments.length === 0) { + padrao = this.BOTAOPADRAO; + } + this.BOTAOCLICADO = padrao; + l = this.LISTABOTOES; + b = l.length - 1; + if (b >= 0) { + do { + temp = $i(l[b].iddiv); + if (temp) { + if (l[b].conteudo) { + temp.innerHTML = l[b].conteudo; + } + if (l[b].dica && i3GEO.barraDeBotoes.TIPO != "emlinha") { + $i(l[b].iddiv).onmouseover = function(e) { + i3GEO.barraDeBotoes.mostraJanela(this, l[b].dica, e); + }; + $i(l[b].iddiv).onmouseout = function(e) { + i3GEO.barraDeBotoes.mostraJanela(this, "", e); + }; + } + if (l[b].titulo && i3GEO.barraDeBotoes.TIPO === "emlinha") { + new YAHOO.widget.Tooltip(l[b].iddiv + "_tip", { + context : l[b].iddiv, + text : l[b].titulo + }); + } + if (l[b].funcaoonclick) { + temp.onclick = l[b].funcaoonclick; + if (l[b].iddiv == padrao) { + l[b].funcaoonclick(); + } + } + if (l[b].constroiconteudo) { + eval(l[b].constroiconteudo); } } - if (l[b].constroiconteudo) { - eval(l[b].constroiconteudo); + YAHOO.util.Event.addListener($i(l[b].iddiv), "click", YAHOO.util.Event.preventDefault); + YAHOO.util.Event.addListener($i(l[b].iddiv), "click", YAHOO.util.Event.stopPropagation); + YAHOO.util.Event.addFocusListener($i(l[b].iddiv), YAHOO.util.Event.preventDefault); + } while (b--); + } + if (padrao === "") { + this.ativaIcone(""); + } + }, + /** + * Function: execBotao + * + * Com base no código de um botão (iddiv), obtém a função armazenada em + * i3GEO.barraDeBotoes.LISTABOTOES e executa. + * + * Parametros: + * + * {string} - identificador do botão, conforme definido no elemento iddiv de i3GEO.barraDeBotoes.LISTABOTOES + * + * {numeric} - (opcional) posição em pixels da tela onde foi feito o clique do mouse + * + * {numeric} - (opcional) posição em pixels da tela onde foi feito o clique do mouse + */ + execBotao : function(id, x, y, posX, posY) { + if (i3GEO.barraDeBotoes.ATIVA === false) { + return; + } + var temp, botao = i3GEO.barraDeBotoes.defBotao(id); + i3GEO.barraDeBotoes.BOTAOCLICADO = id; + if (botao === false) { + return; + } + try { + if (botao.tipo === "dinamico" && x) { + i3GEO.util.criaPin("i3geoMarcaIcone", i3GEO.configura.locaplic + "/imagens/gisicons/eudock/sobe1.png", "10px", "10px"); + temp = $i("i3geoMarcaIcone"); + if (temp) { + temp.style.display = "block"; + temp.style.top = posY + 43 + "px"; + temp.style.left = posX + 18 + "px"; } } - YAHOO.util.Event.addListener($i(l[b].iddiv), "click", YAHOO.util.Event.preventDefault); - YAHOO.util.Event.addListener($i(l[b].iddiv), "click", YAHOO.util.Event.stopPropagation); - YAHOO.util.Event.addFocusListener($i(l[b].iddiv), YAHOO.util.Event.preventDefault); - } while (b--); - } - if (padrao === "") { - this.ativaIcone(""); - } - }, - /** - * Function: execBotao - * - * Com base no código de um botão (iddiv), obtém a função armazenada em - * i3GEO.barraDeBotoes.LISTABOTOES e executa. - * - * Parametros: - * - * {string} - identificador do botão, conforme definido no elemento iddiv de i3GEO.barraDeBotoes.LISTABOTOES - * - * {numeric} - (opcional) posição em pixels da tela onde foi feito o clique do mouse - * - * {numeric} - (opcional) posição em pixels da tela onde foi feito o clique do mouse - */ - execBotao : function(id, x, y, posX, posY) { - if (i3GEO.barraDeBotoes.ATIVA === false) { - return; - } - var temp, botao = i3GEO.barraDeBotoes.defBotao(id); - i3GEO.barraDeBotoes.BOTAOCLICADO = id; - if (botao === false) { - return; - } - try { - if (botao.tipo === "dinamico" && x) { - i3GEO.util.criaPin("i3geoMarcaIcone", i3GEO.configura.locaplic + "/imagens/gisicons/eudock/sobe1.png", "10px", "10px"); - temp = $i("i3geoMarcaIcone"); - if (temp) { - temp.style.display = "block"; - temp.style.top = posY + 43 + "px"; - temp.style.left = posX + 18 + "px"; + if (botao.funcaoonclick) { + botao.funcaoonclick.call(); } + } catch (e) { + if (typeof (console) !== 'undefined') + console.error("Erro no botao " + id + " " + e); } - if (botao.funcaoonclick) { - botao.funcaoonclick.call(); + }, + /** + * Function: defBotao + * + * Obtém as definições de um botão conforme o seu código (iddiv) + * + * Retorno: + * + * {objeto} - ver i3GEO.barraDeBotoes.LISTABOTOES + */ + defBotao : function(iddiv) { + var l = i3GEO.barraDeBotoes.LISTABOTOES, b = l.length - 1; + if (b >= 0) { + do { + // temp = l[b].iddiv; + if (l[b].iddiv === iddiv) { + return l[b]; + } + } while (b--); } - } catch (e) { - if (typeof (console) !== 'undefined') - console.error("Erro no botao " + id + " " + e); - } - }, - /** - * Function: defBotao - * - * Obtém as definições de um botão conforme o seu código (iddiv) - * - * Retorno: - * - * {objeto} - ver i3GEO.barraDeBotoes.LISTABOTOES - */ - defBotao : function(iddiv) { - var l = i3GEO.barraDeBotoes.LISTABOTOES, b = l.length - 1; - if (b >= 0) { - do { - // temp = l[b].iddiv; - if (l[b].iddiv === iddiv) { - return l[b]; - } - } while (b--); - } - return false; - }, - /** - * Function: inicializaBarraOP - * - * Inicializa a barra de botões quando for do tipo "olhodepeixe" ou "olhodepeixe1" - * - * O objeto euEnv armazena todas as características da barra - * - * "olhodepeixe1" substitui a antiga "olhodepeixe" e nao precisa de ajustes de posicionamento - * - */ - inicializaBarraOP : function(onde) { - if (i3GEO.barraDeBotoes.ATIVA === false || !$i(i3GEO.Interface.IDCORPO)) { - return; - } - // isso veio do js do eudock - if (document.onmousemove) - euEnv.onmousemoveBK = document.onmousemove; - document.onmousemove = on_MouseMove; + return false; + }, + /** + * Function: inicializaBarraOP + * + * Inicializa a barra de botões quando for do tipo "olhodepeixe" ou "olhodepeixe1" + * + * O objeto euEnv armazena todas as características da barra + * + * "olhodepeixe1" substitui a antiga "olhodepeixe" e nao precisa de ajustes de posicionamento + * + */ + inicializaBarraOP : function(onde) { + if (i3GEO.barraDeBotoes.ATIVA === false || !$i(i3GEO.Interface.IDCORPO)) { + return; + } + // isso veio do js do eudock + if (document.onmousemove) + euEnv.onmousemoveBK = document.onmousemove; + document.onmousemove = on_MouseMove; - if (document.onmousedown) - euEnv.onmousedownBK = document.onmousedown; - document.onmousedown = on_MouseDown; + if (document.onmousedown) + euEnv.onmousedownBK = document.onmousedown; + document.onmousedown = on_MouseDown; - if (document.onmouseup) - euEnv.onmouseupBK = document.onmouseup; - document.onmouseup = on_MouseUp; + if (document.onmouseup) + euEnv.onmouseupBK = document.onmouseup; + document.onmouseup = on_MouseUp; - if (document.onclick) - euEnv.onclickBK = document.onclick; - document.onclick = on_MouseClick; - euDimensioni(); - offsEut(); - euThread(); - // - euEnv.imageBasePath = i3GEO.configura.locaplic + "/pacotes/eudock/"; - var botao, dica, titulo, i, dock = new euDock(onde), temp = "dockBg-r.png", tempAjuda = "dockBg-l.png", chaves = - i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO), n = chaves.length, preload; - preload = new Image(); - preload.src = i3GEO.configura.locaplic + "/imagens/gisicons/eudock/sobe1.png"; - if (i3GEO.barraDeBotoes.POSICAO === "top") { - dock.setObjectAlign(i3GEO.Interface.IDCORPO, euUP, (i3GEO.parametros.h) * 1 + i3GEO.barraDeBotoes.OFFSET, euDOWN); - } else { - if (onde) { - dock.setObjectAlign(i3GEO.Interface.IDCORPO, euDOWN, i3GEO.barraDeBotoes.OFFSET, euUP); + if (document.onclick) + euEnv.onclickBK = document.onclick; + document.onclick = on_MouseClick; + euDimensioni(); + offsEut(); + euThread(); + // + euEnv.imageBasePath = i3GEO.configura.locaplic + "/pacotes/eudock/"; + var botao, dica, titulo, i, dock = new euDock(onde), temp = "dockBg-r.png", tempAjuda = "dockBg-l.png", chaves = + i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO), n = chaves.length, preload; + preload = new Image(); + preload.src = i3GEO.configura.locaplic + "/imagens/gisicons/eudock/sobe1.png"; + if (i3GEO.barraDeBotoes.POSICAO === "top") { + dock.setObjectAlign(i3GEO.Interface.IDCORPO, euUP, (i3GEO.parametros.h) * 1 + i3GEO.barraDeBotoes.OFFSET, euDOWN); } else { - dock.setObjectAlign(i3GEO.Interface.IDCORPO, euDOWN, (parseInt(document.body.style.height, 10)) * -1 - + i3GEO.barraDeBotoes.OFFSET, euUP); - } - } - if (i3GEO.barraDeBotoes.MAXBOTOES >= chaves.length) { - temp = "vazio.png"; - } - if (i3GEO.barraDeBotoes.AJUDA === false) { - tempAjuda = "vazio.png"; - } - dock.setBar({ - left : { - euImage : { - image : i3GEO.configura.locaplic + "/pacotes/eudock/barImages/" + tempAjuda - } - }, - horizontal : { - euImage : { - image : i3GEO.configura.locaplic + "/pacotes/eudock/barImages/dockBg-c-o.png" - } - }, - right : { - euImage : { - image : i3GEO.configura.locaplic + "/pacotes/eudock/barImages/" + temp + if (onde) { + dock.setObjectAlign(i3GEO.Interface.IDCORPO, euDOWN, i3GEO.barraDeBotoes.OFFSET, euUP); + } else { + dock.setObjectAlign(i3GEO.Interface.IDCORPO, euDOWN, (parseInt(document.body.style.height, 10)) * -1 + + i3GEO.barraDeBotoes.OFFSET, euUP); } } - }); - i3GEO.barraDeBotoes.AJUDA = false; - dock.setIconsOffset(7); - if (i3GEO.barraDeBotoes.MAXBOTOES > 0) { - n = i3GEO.barraDeBotoes.MAXBOTOES; - } - for (i = 0; i < n; i += 1) { - if (i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] && i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] === true) { - botao = i3GEO.barraDeBotoes.defBotao(chaves[i]); - if (botao === false) { - dica = ""; - titulo = ""; - } else { - if (botao.dica) { - dica = botao.dica; - } else { - dica = ""; + if (i3GEO.barraDeBotoes.MAXBOTOES >= chaves.length) { + temp = "vazio.png"; + } + if (i3GEO.barraDeBotoes.AJUDA === false) { + tempAjuda = "vazio.png"; + } + dock.setBar({ + left : { + euImage : { + image : i3GEO.configura.locaplic + "/pacotes/eudock/barImages/" + tempAjuda } - if (botao.titulo != undefined) { - titulo = botao.titulo; - } else { - titulo = ""; + }, + horizontal : { + euImage : { + image : i3GEO.configura.locaplic + "/pacotes/eudock/barImages/dockBg-c-o.png" } - } - dock.addIcon(new Array({ + }, + right : { euImage : { - image : i3GEO.configura.locaplic + i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]] + image : i3GEO.configura.locaplic + "/pacotes/eudock/barImages/" + temp } - }), { - mouseInsideClick : function(x, y, id, posX, posY) { - i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao, x, y, posX, posY); - }, - idBotao : chaves[i], - dica : dica, - titulo : titulo - }); - } - } - $i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick = function() { - i3GEO.ajuda.ATIVAJANELA = true; - i3GEO.ajuda.abreJanela(); - }; - $i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick = - function() { - var dica, titulo, chaves = i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO), n = chaves.length, nb = - euEnv.euDockArray.euDock_0.iconsArray.length, i; - if ($i("i3geoMarcaIcone")) { - $i("i3geoMarcaIcone").style.display = "none"; - } - // a barra já foi expandida - if (nb !== i3GEO.barraDeBotoes.MAXBOTOES) { - i3GEO.barraDeBotoes.recria(); + } + }); + i3GEO.barraDeBotoes.AJUDA = false; + dock.setIconsOffset(7); + if (i3GEO.barraDeBotoes.MAXBOTOES > 0) { + n = i3GEO.barraDeBotoes.MAXBOTOES; } - if (i3GEO.barraDeBotoes.MAXBOTOES > 0 && n > nb) { - for (i = nb; i < n; i += 1) { - if (i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] && i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] === true) { - botao = i3GEO.barraDeBotoes.defBotao(chaves[i]); - if (botao === false) { + for (i = 0; i < n; i += 1) { + if (i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] && i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] === true) { + botao = i3GEO.barraDeBotoes.defBotao(chaves[i]); + if (botao === false) { + dica = ""; + titulo = ""; + } else { + if (botao.dica) { + dica = botao.dica; + } else { dica = ""; - titulo = ""; + } + if (botao.titulo != undefined) { + titulo = botao.titulo; } else { - if (botao.dica) { - dica = botao.dica; - } else { - dica = ""; - } - if (botao.titulo != undefined) { - titulo = botao.titulo; - } else { - titulo = ""; - } + titulo = ""; } - dock.addIcon(new Array({ - euImage : { - image : i3GEO.configura.locaplic + i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]] - } - }), { - mouseInsideClick : function(x, y, id, posX) { - i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao, x, y, posX); - }, - idBotao : chaves[i], - dica : dica, - titulo : titulo - }); } + dock.addIcon(new Array({ + euImage : { + image : i3GEO.configura.locaplic + i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]] + } + }), { + mouseInsideClick : function(x, y, id, posX, posY) { + i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao, x, y, posX, posY); + }, + idBotao : chaves[i], + dica : dica, + titulo : titulo + }); } } - }; - // div que mostra o título do botão - if (!$i("euDockMensagem")) { - temp = document.createElement("div"); - temp.style.textAlign = "center"; - if (i3GEO.barraDeBotoes.POSICAO === "top") { - temp.style.top = "25px"; - } - temp.innerHTML = ""; - temp.id = "euDockMensagem"; - euEnv.euDockArray.euDock_0.div.appendChild(temp); - } - }, - /** - * Function: inicializaBarra - * - * Inicializa a barra de botões - * - * A barra de zoom é inserida automaticamente na barra de botoes 1 se esta existir - * - * Caso i3GEO.barraDeBotoes.TIPO === "olhodepeixe" os parâmetros são ignorados. - * - * Exemplo: - * - * if ($i("barraDeBotoes1")) - * - * i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes1","i3geo_barra1",true,x1,y1); - * - * if ($i("barraDeBotoes2")) - * - * i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2); - * - * Os objetos criados são armazenados no array BARRAS, dessa forma, para acessar uma barra utilize por exemplo: - * - * i3GEO.barraDeBotoes.BARRAS[1].show(); - * - * Parametros: - * - * {String} - id do elemento existente no HTML e que contém as definições dos botões - * - * {String} - id do elemento que será criado para adicionar os botoões - * - * {boolean} - indica se a barra de zoom será incluída - * - * {Numeric} - posição x (pixels) da barra em relação ao mapa - * - * {Numeric} - posição y (pixels) da barra em relação ao mapa - * - * {String} - (opcional) id do elemento HTML onde os botões serão inseridos - */ - inicializaBarra : function(idconteudo, idconteudonovo, barraZoom, x, y, onde) { - if (i3GEO.barraDeBotoes.ATIVA === false) { - return; - } - var ticone, tipo, mostra, i, temp, e, wj, recuo, alturadisponivel, n, chaves, elementos = "", numerobotoes = 0, nelementos = 0, Dom = - YAHOO.util.Dom, branco = i3GEO.configura.locaplic + '/imagens/branco.gif', novoel; - if (i3GEO.configura.map3d === "") { - i3GEO.barraDeBotoes.INCLUIBOTAO.v3d = false; - } - if (i3GEO.barraDeBotoes.TIPO === "olhodepeixe" || i3GEO.barraDeBotoes.TIPO === "olhodepeixe1") { - if (i3GEO.barraDeBotoes.TIPO === "olhodepeixe1" && $i(i3GEO.Interface.IDMAPA)) { - i3GEO.barraDeBotoes.inicializaBarraOP($i(i3GEO.Interface.IDMAPA)); - } else { - i3GEO.barraDeBotoes.inicializaBarraOP(); - } - } else { - if (this.TEMPLATEBOTAO === "" && i3GEO.Interface.TABLET === false) { - this.TEMPLATEBOTAO = - "
"; + $i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick = function() { + i3GEO.ajuda.ATIVAJANELA = true; + i3GEO.ajuda.abreJanela(); + }; + $i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick = + function() { + var dica, titulo, chaves = i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO), n = chaves.length, nb = + euEnv.euDockArray.euDock_0.iconsArray.length, i; + if ($i("i3geoMarcaIcone")) { + $i("i3geoMarcaIcone").style.display = "none"; + } + // a barra já foi expandida + if (nb !== i3GEO.barraDeBotoes.MAXBOTOES) { + i3GEO.barraDeBotoes.recria(); + } + if (i3GEO.barraDeBotoes.MAXBOTOES > 0 && n > nb) { + for (i = nb; i < n; i += 1) { + if (i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] && i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] === true) { + botao = i3GEO.barraDeBotoes.defBotao(chaves[i]); + if (botao === false) { + dica = ""; + titulo = ""; + } else { + if (botao.dica) { + dica = botao.dica; + } else { + dica = ""; + } + if (botao.titulo != undefined) { + titulo = botao.titulo; + } else { + titulo = ""; + } + } + dock.addIcon(new Array({ + euImage : { + image : i3GEO.configura.locaplic + i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]] + } + }), { + mouseInsideClick : function(x, y, id, posX) { + i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao, x, y, posX); + }, + idBotao : chaves[i], + dica : dica, + titulo : titulo + }); + } + } + } + }; + // div que mostra o título do botão + if (!$i("euDockMensagem")) { + temp = document.createElement("div"); + temp.style.textAlign = "center"; + if (i3GEO.barraDeBotoes.POSICAO === "top") { + temp.style.top = "25px"; + } + temp.innerHTML = ""; + temp.id = "euDockMensagem"; + euEnv.euDockArray.euDock_0.div.appendChild(temp); } - if (this.TEMPLATEBOTAO === "" && i3GEO.Interface.TABLET === true) { - this.TEMPLATEBOTAO = - "
"; + }, + /** + * Function: inicializaBarra + * + * Inicializa a barra de botões + * + * A barra de zoom é inserida automaticamente na barra de botoes 1 se esta existir + * + * Caso i3GEO.barraDeBotoes.TIPO === "olhodepeixe" os parâmetros são ignorados. + * + * Exemplo: + * + * if ($i("barraDeBotoes1")) + * + * i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes1","i3geo_barra1",true,x1,y1); + * + * if ($i("barraDeBotoes2")) + * + * i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2); + * + * Os objetos criados são armazenados no array BARRAS, dessa forma, para acessar uma barra utilize por exemplo: + * + * i3GEO.barraDeBotoes.BARRAS[1].show(); + * + * Parametros: + * + * {String} - id do elemento existente no HTML e que contém as definições dos botões + * + * {String} - id do elemento que será criado para adicionar os botoões + * + * {boolean} - indica se a barra de zoom será incluída + * + * {Numeric} - posição x (pixels) da barra em relação ao mapa + * + * {Numeric} - posição y (pixels) da barra em relação ao mapa + * + * {String} - (opcional) id do elemento HTML onde os botões serão inseridos + */ + inicializaBarra : function(idconteudo, idconteudonovo, barraZoom, x, y, onde) { + if (i3GEO.barraDeBotoes.ATIVA === false) { + return; } - - if (navm) { - i3GEO.barraDeBotoes.TRANSICAOSUAVE = false; + var ticone, tipo, mostra, i, temp, e, wj, recuo, alturadisponivel, n, chaves, elementos = "", numerobotoes = 0, nelementos = 0, Dom = + YAHOO.util.Dom, branco = i3GEO.configura.locaplic + '/imagens/branco.gif', novoel; + if (i3GEO.configura.map3d === "") { + i3GEO.barraDeBotoes.INCLUIBOTAO.v3d = false; } - if (i3GEO.barraDeBotoes.TIPO === "emlinha") { - temp = "
"; - chaves = i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO); - n = chaves.length; - for (i = 0; i < n; i += 1) { - if (i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] === true) { - temp += - ""; - } - } - // - // se o id indicado para incluir a barra nao existir, o div sera criado - // - if (!$i(onde)) { - novoel = document.createElement("div"); - novoel.id = onde; - novoel.innerHTML = temp; - $i(i3GEO.Interface.IDMAPA).appendChild(novoel); + if (i3GEO.barraDeBotoes.TIPO === "olhodepeixe" || i3GEO.barraDeBotoes.TIPO === "olhodepeixe1") { + if (i3GEO.barraDeBotoes.TIPO === "olhodepeixe1" && $i(i3GEO.Interface.IDMAPA)) { + i3GEO.barraDeBotoes.inicializaBarraOP($i(i3GEO.Interface.IDMAPA)); } else { - $i(onde).innerHTML = temp; + i3GEO.barraDeBotoes.inicializaBarraOP(); } - for (i = 0; i < n; i += 1) { - temp = i3GEO.barraDeBotoes.defBotao(chaves[i]).titulo; - if (temp != "") { - new YAHOO.widget.Tooltip(chaves[i] + "_tip", { - context : chaves[i] + "_iconeId", - text : temp - }); - } + } else { + if (this.TEMPLATEBOTAO === "" && i3GEO.Interface.TABLET === false) { + this.TEMPLATEBOTAO = + "
"; } - // i3GEO.barraDeBotoes.ativaBotoes(); - } - if (this.AUTO === true) { - if (idconteudo === "barraDeBotoes1") { - novoel = document.createElement("div"); - novoel.id = "barraDeBotoes1"; - temp = - '
' - + "
" - + 'zoom' - + "
" - + "
" - + 'desloca' - + "
" - + "
" - + 'geral' + "
"; - novoel.innerHTML = temp; - document.body.appendChild(novoel); + if (this.TEMPLATEBOTAO === "" && i3GEO.Interface.TABLET === true) { + this.TEMPLATEBOTAO = + "
"; } - if (idconteudo === "barraDeBotoes2") { - temp = ""; + + if (navm) { + i3GEO.barraDeBotoes.TRANSICAOSUAVE = false; + } + if (i3GEO.barraDeBotoes.TIPO === "emlinha") { + temp = "
"; chaves = i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO); n = chaves.length; for (i = 0; i < n; i += 1) { if (i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] === true) { - temp += i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$", chaves[i]); + temp += + ""; } } - // return; - if (typeof (onde) === 'undefined') { + // + // se o id indicado para incluir a barra nao existir, o div sera criado + // + if (!$i(onde)) { novoel = document.createElement("div"); - novoel.id = "barraDeBotoes2"; - novoel.innerHTML = - "" - + "" - + "
sobe
" - + temp - + "
"; - document.body.appendChild(novoel); + novoel.id = onde; + novoel.innerHTML = temp; + $i(i3GEO.Interface.IDMAPA).appendChild(novoel); } else { $i(onde).innerHTML = temp; - return; } + for (i = 0; i < n; i += 1) { + temp = i3GEO.barraDeBotoes.defBotao(chaves[i]).titulo; + if (temp != "") { + new YAHOO.widget.Tooltip(chaves[i] + "_tip", { + context : chaves[i] + "_iconeId", + text : temp + }); + } + } + // i3GEO.barraDeBotoes.ativaBotoes(); } - } else { - if (idconteudo === "barraDeBotoes2" && onde !== undefined) { - $i(onde).innerHTML = $i(idconteudo); - } - } - wj = "36px"; - recuo = "0px"; - if (idconteudonovo != "") { - novoel = document.createElement("div"); - novoel.id = idconteudonovo; - novoel.style.display = "block"; - if (this.SOICONES === false) { - novoel.style.border = "1px solid gray"; - novoel.style.background = "white"; + if (this.AUTO === true) { + if (idconteudo === "barraDeBotoes1") { + novoel = document.createElement("div"); + novoel.id = "barraDeBotoes1"; + temp = + '
' + + "
" + + 'zoom' + + "
" + + "
" + + 'desloca' + + "
" + + "
" + + 'geral' + "
"; + novoel.innerHTML = temp; + document.body.appendChild(novoel); + } + if (idconteudo === "barraDeBotoes2") { + temp = ""; + chaves = i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO); + n = chaves.length; + for (i = 0; i < n; i += 1) { + if (i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] === true) { + temp += i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$", chaves[i]); + } + } + // return; + if (typeof (onde) === 'undefined') { + novoel = document.createElement("div"); + novoel.id = "barraDeBotoes2"; + novoel.innerHTML = + "" + + "" + + "
sobe
" + + temp + + "
"; + document.body.appendChild(novoel); + } else { + $i(onde).innerHTML = temp; + return; + } + } } else { - novoel.style.border = "0px solid white"; - } - if (i3GEO.barraDeBotoes.TRANSICAOSUAVE) { - Dom.setStyle(novoel, "opacity", this.OPACIDADE / 100); - } - temp = ""; - if (barraZoom === true) { - temp += i3GEO.navega.barraDeZoom.cria(); - } - temp += '
'; - novoel.innerHTML = temp; - novoel.onmouseover = function() { - YAHOO.util.Dom.setStyle("i3geo_rosa", "display", "none"); - if (i3GEO.barraDeBotoes.TRANSICAOSUAVE) { - YAHOO.util.Dom.setStyle(novoel, "opacity", 1); + if (idconteudo === "barraDeBotoes2" && onde !== undefined) { + $i(onde).innerHTML = $i(idconteudo); } - if (i3GEO.Interface.TABLET === true) { - // i3GEO.barraDeBotoes.BARRAS[0].cfg.setProperty("height", ""); - // $i(i3GEO.barraDeBotoes.BARRAS[0].id+"_").style.top = "0px"; + } + wj = "36px"; + recuo = "0px"; + if (idconteudonovo != "") { + novoel = document.createElement("div"); + novoel.id = idconteudonovo; + novoel.style.display = "block"; + if (this.SOICONES === false) { + novoel.style.border = "1px solid gray"; + novoel.style.background = "white"; + } else { + novoel.style.border = "0px solid white"; } - }; - novoel.onmouseout = function() { if (i3GEO.barraDeBotoes.TRANSICAOSUAVE) { - YAHOO.util.Dom.setStyle(novoel, "opacity", i3GEO.barraDeBotoes.OPACIDADE / 100); + Dom.setStyle(novoel, "opacity", this.OPACIDADE / 100); } - if (i3GEO.Interface.TABLET === true) { - // i3GEO.barraDeBotoes.BARRAS[0].cfg.setProperty("height", "10px"); - // $i(i3GEO.barraDeBotoes.BARRAS[0].id+"_").style.top = "-200px"; + temp = ""; + if (barraZoom === true) { + temp += i3GEO.navega.barraDeZoom.cria(); } - }; - document.body.appendChild(novoel); - } - // copia os botoes do HTML para a janela - ticone = 28; - alturadisponivel = i3GEO.parametros.h - i3GEO.Interface.BARRABOTOESTOP - ticone - 38 - 38; - if (this.AUTOALTURA === true) { - alturadisponivel += 28; - } - numerobotoes = parseInt(alturadisponivel / ticone, 10); - if (idconteudo != "" && $i(idconteudo)) { - $i(idconteudonovo + "_").innerHTML = $i(idconteudo).innerHTML; - $i(idconteudo).innerHTML = ""; - elementos = $i(idconteudonovo + "_").getElementsByTagName("img"); - nelementos = elementos.length; - if (i3GEO.barraDeBotoes.ORIENTACAO === "horizontal") { - numerobotoes = 100; + temp += '
'; + novoel.innerHTML = temp; + novoel.onmouseover = function() { + YAHOO.util.Dom.setStyle("i3geo_rosa", "display", "none"); + if (i3GEO.barraDeBotoes.TRANSICAOSUAVE) { + YAHOO.util.Dom.setStyle(novoel, "opacity", 1); + } + if (i3GEO.Interface.TABLET === true) { + // i3GEO.barraDeBotoes.BARRAS[0].cfg.setProperty("height", ""); + // $i(i3GEO.barraDeBotoes.BARRAS[0].id+"_").style.top = "0px"; + } + }; + novoel.onmouseout = function() { + if (i3GEO.barraDeBotoes.TRANSICAOSUAVE) { + YAHOO.util.Dom.setStyle(novoel, "opacity", i3GEO.barraDeBotoes.OPACIDADE / 100); + } + if (i3GEO.Interface.TABLET === true) { + // i3GEO.barraDeBotoes.BARRAS[0].cfg.setProperty("height", "10px"); + // $i(i3GEO.barraDeBotoes.BARRAS[0].id+"_").style.top = "-200px"; + } + }; + document.body.appendChild(novoel); } - // faz o cálculo do número de botões que devem ficar visíveis em função do - // tamanho da barra - if (this.AUTOALTURA === true || (numerobotoes < nelementos)) { - if (elementos[0].id === "sobeferramentas") { - try { - elementos = $i(idconteudonovo + "_").getElementsByTagName("div"); - nelementos = elementos.length; - i = 0; - do { - elementos[i].style.display = "none"; - i = i + 1; - } while (i < nelementos); - i = 0; - do { - if (elementos[i] != undefined) { - elementos[i].style.display = "inline"; - } - i = i + 1; - } while (i < numerobotoes - 1); - } catch (men) { - if (typeof (console) !== 'undefined') - console.error(men); + // copia os botoes do HTML para a janela + ticone = 28; + alturadisponivel = i3GEO.parametros.h - i3GEO.Interface.BARRABOTOESTOP - ticone - 38 - 38; + if (this.AUTOALTURA === true) { + alturadisponivel += 28; + } + numerobotoes = parseInt(alturadisponivel / ticone, 10); + if (idconteudo != "" && $i(idconteudo)) { + $i(idconteudonovo + "_").innerHTML = $i(idconteudo).innerHTML; + $i(idconteudo).innerHTML = ""; + elementos = $i(idconteudonovo + "_").getElementsByTagName("img"); + nelementos = elementos.length; + if (i3GEO.barraDeBotoes.ORIENTACAO === "horizontal") { + numerobotoes = 100; + } + // faz o cálculo do número de botões que devem ficar visíveis em função do + // tamanho da barra + if (this.AUTOALTURA === true || (numerobotoes < nelementos)) { + if (elementos[0].id === "sobeferramentas") { + try { + elementos = $i(idconteudonovo + "_").getElementsByTagName("div"); + nelementos = elementos.length; + i = 0; + do { + elementos[i].style.display = "none"; + i = i + 1; + } while (i < nelementos); + i = 0; + do { + if (elementos[i] != undefined) { + elementos[i].style.display = "inline"; + } + i = i + 1; + } while (i < numerobotoes - 1); + } catch (men) { + if (typeof (console) !== 'undefined') + console.error(men); + } } } + if (elementos.length <= numerobotoes) { + Dom.setStyle([ + "sobeferramentas", + "desceferramentas" + ], "display", "none"); + } } - if (elementos.length <= numerobotoes) { - Dom.setStyle([ - "sobeferramentas", - "desceferramentas" - ], "display", "none"); - } - } - if (i3GEO.barraDeBotoes.TIPO != "emlinha") { - YAHOO.namespace("i3GEO.janela.botoes"); - if (i3GEO.barraDeBotoes.ORIENTACAO === "horizontal") { - YAHOO.i3GEO.janela.botoes = new YAHOO.widget.Panel(idconteudonovo, { - zIndex : 20000, - height : 40, - width : i3GEO.barraDeBotoes.HORIZONTALW, - fixedcenter : false, - constraintoviewport : false, - underlay : "none", - close : i3GEO.barraDeBotoes.PERMITEFECHAR, - visible : true, - draggable : i3GEO.barraDeBotoes.PERMITEDESLOCAR, - modal : false, - iframe : false - }); - } else { - if (this.AUTOALTURA === false || barraZoom === true || (elementos.length > numerobotoes)) { + if (i3GEO.barraDeBotoes.TIPO != "emlinha") { + YAHOO.namespace("i3GEO.janela.botoes"); + if (i3GEO.barraDeBotoes.ORIENTACAO === "horizontal") { YAHOO.i3GEO.janela.botoes = new YAHOO.widget.Panel(idconteudonovo, { zIndex : 20000, - width : wj, + height : 40, + width : i3GEO.barraDeBotoes.HORIZONTALW, fixedcenter : false, constraintoviewport : false, underlay : "none", @@ -1337,518 +1323,534 @@ i3GEO.barraDeBotoes = iframe : false }); } else { - YAHOO.i3GEO.janela.botoes = new YAHOO.widget.Panel(idconteudonovo, { - zIndex : 20000, - height : i3GEO.parametros.h - 4, - width : wj, - fixedcenter : false, - constraintoviewport : false, - underlay : "none", - close : i3GEO.barraDeBotoes.PERMITEFECHAR, - visible : true, - draggable : i3GEO.barraDeBotoes.PERMITEDESLOCAR, - modal : false, - iframe : false - }); - } - } - if (this.SOICONES === true) { - Dom.setStyle([ - "i3geo_barra2", - "i3geo_barra1" - ], "borderWidth", "0 0 0 0"); - } - YAHOO.i3GEO.janela.botoes.render(); - YAHOO.i3GEO.janela.botoes.moveTo(x, y); - if ($i("sobeferramentas")) { - $i("sobeferramentas").onclick = function() { - elementos = $i(idconteudonovo + "_").getElementsByTagName("div"); - nelementos = elementos.length; - if (elementos[0].style.display === "inline" && elementos[0].id === "") { - return; - } - if (nelementos > 0) { - mostra = elementos[0]; - i = 0; - do { - if (elementos[i].style) { - if (elementos[i].style.display === "inline" && elementos[i].id === "") { - break; - } - if (elementos[i].style.display === "none" && elementos[i].id === "") { - mostra = elementos[i]; - } - } - i = i + 1; - } while (i < nelementos); - mostra.style.display = "inline"; - // esconde o último botao - i = nelementos + 1; - mostra = elementos[i]; - do { - if (elementos[i]) { - if (elementos[i].style) { - if (elementos[i].style.display === "inline") { - mostra = elementos[i]; - break; - } - } - } - i = i - 1; - } while (i >= 0); - mostra.style.display = "none"; + if (this.AUTOALTURA === false || barraZoom === true || (elementos.length > numerobotoes)) { + YAHOO.i3GEO.janela.botoes = new YAHOO.widget.Panel(idconteudonovo, { + zIndex : 20000, + width : wj, + fixedcenter : false, + constraintoviewport : false, + underlay : "none", + close : i3GEO.barraDeBotoes.PERMITEFECHAR, + visible : true, + draggable : i3GEO.barraDeBotoes.PERMITEDESLOCAR, + modal : false, + iframe : false + }); + } else { + YAHOO.i3GEO.janela.botoes = new YAHOO.widget.Panel(idconteudonovo, { + zIndex : 20000, + height : i3GEO.parametros.h - 4, + width : wj, + fixedcenter : false, + constraintoviewport : false, + underlay : "none", + close : i3GEO.barraDeBotoes.PERMITEFECHAR, + visible : true, + draggable : i3GEO.barraDeBotoes.PERMITEDESLOCAR, + modal : false, + iframe : false + }); } - }; - } - if ($i("desceferramentas")) { - $i("desceferramentas").onclick = - function() { - tipo = "inline"; - if ($i(idconteudonovo + "_")) { + } + if (this.SOICONES === true) { + Dom.setStyle([ + "i3geo_barra2", + "i3geo_barra1" + ], "borderWidth", "0 0 0 0"); + } + YAHOO.i3GEO.janela.botoes.render(); + YAHOO.i3GEO.janela.botoes.moveTo(x, y); + if ($i("sobeferramentas")) { + $i("sobeferramentas").onclick = function() { elementos = $i(idconteudonovo + "_").getElementsByTagName("div"); - if (elementos[elementos.length - 1].style.display === tipo) { + nelementos = elementos.length; + if (elementos[0].style.display === "inline" && elementos[0].id === "") { return; } - nelementos = elementos.length; if (nelementos > 0) { - // esconde o primeiro botao + mostra = elementos[0]; i = 0; do { - e = elementos[i]; - if (e.style) { - if ((e.style.display === "block") || (e.style.display === "inline") - || (e.style.display === "")) { - if (e.id === "") { - e.style.display = "none"; - break; - } + if (elementos[i].style) { + if (elementos[i].style.display === "inline" && elementos[i].id === "") { + break; + } + if (elementos[i].style.display === "none" && elementos[i].id === "") { + mostra = elementos[i]; } } i = i + 1; } while (i < nelementos); - // mostra o último botao - i = nelementos - 1; - var mostra = elementos[i]; + mostra.style.display = "inline"; + // esconde o último botao + i = nelementos + 1; + mostra = elementos[i]; do { - e = elementos[i]; - if (e.style) { - if (e.style.display === tipo) { - break; - } - if (e.style.display === "none") { - mostra = e; + if (elementos[i]) { + if (elementos[i].style) { + if (elementos[i].style.display === "inline") { + mostra = elementos[i]; + break; + } } } i = i - 1; } while (i >= 0); - mostra.style.display = tipo; + mostra.style.display = "none"; } - } - }; - } - this.BARRAS.push(YAHOO.i3GEO.janela.botoes); - YAHOO.i3GEO.janela.botoes.show(); - if (i3GEO.Interface.TABLET === true) { - YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w / 2) - (i3GEO.barraDeBotoes.HORIZONTALW / 2), ""); + }; + } + if ($i("desceferramentas")) { + $i("desceferramentas").onclick = + function() { + tipo = "inline"; + if ($i(idconteudonovo + "_")) { + elementos = $i(idconteudonovo + "_").getElementsByTagName("div"); + if (elementos[elementos.length - 1].style.display === tipo) { + return; + } + nelementos = elementos.length; + if (nelementos > 0) { + // esconde o primeiro botao + i = 0; + do { + e = elementos[i]; + if (e.style) { + if ((e.style.display === "block") || (e.style.display === "inline") + || (e.style.display === "")) { + if (e.id === "") { + e.style.display = "none"; + break; + } + } + } + i = i + 1; + } while (i < nelementos); + // mostra o último botao + i = nelementos - 1; + var mostra = elementos[i]; + do { + e = elementos[i]; + if (e.style) { + if (e.style.display === tipo) { + break; + } + if (e.style.display === "none") { + mostra = e; + } + } + i = i - 1; + } while (i >= 0); + mostra.style.display = tipo; + } + } + }; + } + this.BARRAS.push(YAHOO.i3GEO.janela.botoes); + YAHOO.i3GEO.janela.botoes.show(); + if (i3GEO.Interface.TABLET === true) { + YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w / 2) - (i3GEO.barraDeBotoes.HORIZONTALW / 2), ""); + } + Dom.replaceClass(idconteudonovo + "_h", "hd2"); } - Dom.replaceClass(idconteudonovo + "_h", "hd2"); } - } - }, - /** - * Function: reativa - * - * Reativa as barras de ferramentas já criadas - * - * Essa opção apenas aplica o método "show" aos objetos armazenados em i3GEO.barraDeBotoes.BARRAS - * - * Se a barra não existir previamente, nada irá contecer - * - * Parametro: - * - * {Integer} - índice do array BARRAS que guarda os objetos YAHOO com as barras Se não for definido, todas as - * barras serão reativadas - */ - reativa : function(indice) { - if (i3GEO.barraDeBotoes.ATIVA === false) { - return; - } - if (typeof (console) !== 'undefined') - console.info("i3GEO.barraDeBotoes.reativa()"); + }, + /** + * Function: reativa + * + * Reativa as barras de ferramentas já criadas + * + * Essa opção apenas aplica o método "show" aos objetos armazenados em i3GEO.barraDeBotoes.BARRAS + * + * Se a barra não existir previamente, nada irá contecer + * + * Parametro: + * + * {Integer} - índice do array BARRAS que guarda os objetos YAHOO com as barras Se não for definido, todas as barras + * serão reativadas + */ + reativa : function(indice) { + if (i3GEO.barraDeBotoes.ATIVA === false) { + return; + } + if (typeof (console) !== 'undefined') + console.info("i3GEO.barraDeBotoes.reativa()"); - var abre = function() { - var i, n = i3GEO.barraDeBotoes.BARRAS.length; - for (i = 0; i < n; i += 1) { - if (i3GEO.barraDeBotoes.BARRAS[i]) { - i3GEO.barraDeBotoes.BARRAS[i].show(); + var abre = function() { + var i, n = i3GEO.barraDeBotoes.BARRAS.length; + for (i = 0; i < n; i += 1) { + if (i3GEO.barraDeBotoes.BARRAS[i]) { + i3GEO.barraDeBotoes.BARRAS[i].show(); + } } - } - }; - try { - if (arguments.length === 1) { - i3GEO.barraDeBotoes.BARRAS[indice].show(); - } else { + }; + try { + if (arguments.length === 1) { + i3GEO.barraDeBotoes.BARRAS[indice].show(); + } else { + abre.call(); + } + } catch (e) { abre.call(); } - } catch (e) { - abre.call(); - } - }, - /** - * Function: recria - * - * Recria uma barra de ferramentas já aberta aplicando os parâmetros de configuração definidos - * (variáveis) - * - * Parametro: - * - * {String} - id da barra - */ - recria : function(id) { - if (i3GEO.barraDeBotoes.ATIVA === false) { - return; - } - if (typeof (console) !== 'undefined') - console.info("i3GEO.barraDeBotoes.recria()"); - - if (i3GEO.barraDeBotoes.TIPO === "olhodepeixe" || i3GEO.barraDeBotoes.TIPO === "olhodepeixe1") { - euEnv.euDockArray = []; - euEnv.Kost.num = 0; - if ($i("euDock_0_bar")) { - // document.body.removeChild($i("euDock_0_bar").parentNode); - $i("euDock_0_bar").parentNode.parentNode.removeChild($i("euDock_0_bar").parentNode); - } - i3GEO.barraDeBotoes.inicializaBarra(); - if ($i("i3geoMarcaIcone")) { - $i("i3geoMarcaIcone").style.display = "none"; + }, + /** + * Function: recria + * + * Recria uma barra de ferramentas já aberta aplicando os parâmetros de configuração definidos + * (variáveis) + * + * Parametro: + * + * {String} - id da barra + */ + recria : function(id) { + if (i3GEO.barraDeBotoes.ATIVA === false) { + return; } - return; - } - var i, n, temp, novoel, barraZoom, x, y, BARRAS = i3GEO.barraDeBotoes.BARRAS, iu = i3GEO.util; - i3GEO.barraDeBotoes.BARRAS = []; - n = BARRAS.length; - for (i = 0; i < n; i += 1) { - if (BARRAS[i] && BARRAS[i].id === id) { - // remove o menu de contexto - iu.removeChild("contexto_" + id); - if (!$i("barraTemporaria" + i)) { - novoel = document.createElement("div"); - novoel.id = "barraTemporaria" + i; - document.body.appendChild(novoel); - } - novoel = $i("barraTemporaria" + i); - novoel.innerHTML = $i(BARRAS[i].id + "_").innerHTML; + if (typeof (console) !== 'undefined') + console.info("i3GEO.barraDeBotoes.recria()"); - // verifica se tem o slide de zoom - barraZoom = false; - temp = $i("vertMaisZoom"); - if (temp) { - temp = navm ? temp.parentNode : temp.parentNode.parentNode; - if (temp.id === id) { - barraZoom = true; - } + if (i3GEO.barraDeBotoes.TIPO === "olhodepeixe" || i3GEO.barraDeBotoes.TIPO === "olhodepeixe1") { + euEnv.euDockArray = []; + euEnv.Kost.num = 0; + if ($i("euDock_0_bar")) { + // document.body.removeChild($i("euDock_0_bar").parentNode); + $i("euDock_0_bar").parentNode.parentNode.removeChild($i("euDock_0_bar").parentNode); } - x = parseInt($i(BARRAS[i].id + "_c").style.left, 10); - y = parseInt($i(BARRAS[i].id + "_c").style.top, 10); - if (i3GEO.barraDeBotoes.PERMITEFECHAR === true) { - y = y - 10; + i3GEO.barraDeBotoes.inicializaBarra(); + if ($i("i3geoMarcaIcone")) { + $i("i3geoMarcaIcone").style.display = "none"; } - BARRAS[i].destroy(); - i3GEO.barraDeBotoes.inicializaBarra(novoel.id, BARRAS[i].id, barraZoom, x, y); + return; } - } - i3GEO.barraDeBotoes.ativaBotoes(); - }, - /** - * Function: fecha - * - * Fecha uma barra de ferramentas - * - * Parametro: - * - * {String} - id que identifica a barra. Corresponde ao parametro idconteudonovo da função de - * inicialização das barras - */ - fecha : function(id) { - if (typeof (console) !== 'undefined') - console.info("i3GEO.barraDeBotoes.fecha()"); + var i, n, temp, novoel, barraZoom, x, y, BARRAS = i3GEO.barraDeBotoes.BARRAS, iu = i3GEO.util; + i3GEO.barraDeBotoes.BARRAS = []; + n = BARRAS.length; + for (i = 0; i < n; i += 1) { + if (BARRAS[i] && BARRAS[i].id === id) { + // remove o menu de contexto + iu.removeChild("contexto_" + id); + if (!$i("barraTemporaria" + i)) { + novoel = document.createElement("div"); + novoel.id = "barraTemporaria" + i; + document.body.appendChild(novoel); + } + novoel = $i("barraTemporaria" + i); + novoel.innerHTML = $i(BARRAS[i].id + "_").innerHTML; - var i, n = this.BARRAS.length; - for (i = 0; i < n; i += 1) { - if (this.BARRAS[i] && this.BARRAS[i].id === id) { - $i(id + "_c").style.visibility = "hidden"; - } - } - }, - mostraJanela : function(objeto, mensagem, evt) { - if (mensagem === "") { - try { - clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes); - } catch (e) { - } - try { - clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes); - } catch (e) { - } - return; - } - var divmensagem = $i("divMensagemBarraDeBotoes"), balloonAjuda, pos = YAHOO.util.Dom.getXY(objeto); - if (this.AJUDA === false || $i("janelaMenTexto")) { - i3GEO.ajuda.mostraJanela(mensagem); - i3GEO.barraDeBotoes.escondeJanelaAjuda(); - return; - } - if (i3GEO.Interface.ATUAL === "googleearth") { - objeto.title = mensagem; - return; - } - if (!divmensagem && this.TIPOAJUDA !== "balao") { - divmensagem = document.createElement("div"); - divmensagem.id = "divMensagemBarraDeBotoes"; - divmensagem.style.border = "0px solid rgb(120 120 120)"; - divmensagem.style.position = "absolute"; - divmensagem.style.zIndex = 20000; - if ($i("i3geo")) { - $i("i3geo").appendChild(divmensagem); - } else { - document.body.appendChild(divmensagem); - } - if (this.TIPOAJUDA === "horizontal") { - divmensagem.innerHTML = - "
fecha
"; - } - if (this.TIPOAJUDA === "vertical") { - divmensagem.innerHTML = - "
fecha
"; - } - } - if (mensagem !== "") { - if (this.TIPOAJUDA !== "balao") { - YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes", "display", "none"); - if (this.TIPOAJUDA === "horizontal") { - divmensagem.style.left = parseInt(YAHOO.util.Dom.getStyle(objeto, "width"), 10) + pos[0] + 10 + "px"; - divmensagem.style.top = pos[1] - 2 + (parseInt(YAHOO.util.Dom.getStyle(objeto, "height"), 10) / 2) + "px"; + // verifica se tem o slide de zoom + barraZoom = false; + temp = $i("vertMaisZoom"); + if (temp) { + temp = navm ? temp.parentNode : temp.parentNode.parentNode; + if (temp.id === id) { + barraZoom = true; + } + } + x = parseInt($i(BARRAS[i].id + "_c").style.left, 10); + y = parseInt($i(BARRAS[i].id + "_c").style.top, 10); + if (i3GEO.barraDeBotoes.PERMITEFECHAR === true) { + y = y - 10; + } + BARRAS[i].destroy(); + i3GEO.barraDeBotoes.inicializaBarra(novoel.id, BARRAS[i].id, barraZoom, x, y); } - if (this.TIPOAJUDA === "vertical") { - divmensagem.style.left = (parseInt(YAHOO.util.Dom.getStyle(objeto, "width"), 10) / 2) + pos[0] - 5 + "px"; - divmensagem.style.top = pos[1] + 5 + parseInt(YAHOO.util.Dom.getStyle(objeto, "height"), 10) + "px"; + } + i3GEO.barraDeBotoes.ativaBotoes(); + }, + /** + * Function: fecha + * + * Fecha uma barra de ferramentas + * + * Parametro: + * + * {String} - id que identifica a barra. Corresponde ao parametro idconteudonovo da função de + * inicialização das barras + */ + fecha : function(id) { + if (typeof (console) !== 'undefined') + console.info("i3GEO.barraDeBotoes.fecha()"); + + var i, n = this.BARRAS.length; + for (i = 0; i < n; i += 1) { + if (this.BARRAS[i] && this.BARRAS[i].id === id) { + $i(id + "_c").style.visibility = "hidden"; } + } + }, + mostraJanela : function(objeto, mensagem, evt) { + if (mensagem === "") { try { - clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes); + clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes); } catch (e) { } - i3GEO.barraDeBotoes.timeMostraAjudaBotoes = - setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('" + mensagem + "');", 5000); - } else { - hideAllTooltips(); - balloonAjuda = new Balloon(); - BalloonConfig(balloonAjuda, 'GBubble'); - balloonAjuda.delayTime = 0; - balloonAjuda.stem = false; - balloonAjuda.stemHeight = 0; - balloonAjuda.vOffset = -24; - balloonAjuda.images = i3GEO.configura.locaplic + '/pacotes/balloon-tooltips/htdocs/images/GBubblec'; - mensagem = - "
fecha
" - + mensagem + "
"; try { clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes); } catch (e) { } - i3GEO.barraDeBotoes.timeMostraAjudaBotoes = setTimeout(function() { - balloonAjuda.cleanup(); - balloonIsVisible = false; - // alert(mensagem); - if (i3GEO.barraDeBotoes.TIPO === "olhodepeixe" || i3GEO.barraDeBotoes.TIPO === "olhodepeixe1") { - balloonAjuda.showTooltip(objeto, mensagem, null, null, null, pos[0], pos[1] - 40); - } else { - balloonAjuda.showTooltip(objeto, mensagem, null, null, null, pos[0] + 12, pos[1]); + return; + } + var divmensagem = $i("divMensagemBarraDeBotoes"), balloonAjuda, pos = YAHOO.util.Dom.getXY(objeto); + if (this.AJUDA === false || $i("janelaMenTexto")) { + i3GEO.ajuda.mostraJanela(mensagem); + i3GEO.barraDeBotoes.escondeJanelaAjuda(); + return; + } + if (i3GEO.Interface.ATUAL === "googleearth") { + objeto.title = mensagem; + return; + } + if (!divmensagem && this.TIPOAJUDA !== "balao") { + divmensagem = document.createElement("div"); + divmensagem.id = "divMensagemBarraDeBotoes"; + divmensagem.style.border = "0px solid rgb(120 120 120)"; + divmensagem.style.position = "absolute"; + divmensagem.style.zIndex = 20000; + if ($i("i3geo")) { + $i("i3geo").appendChild(divmensagem); + } else { + document.body.appendChild(divmensagem); + } + if (this.TIPOAJUDA === "horizontal") { + divmensagem.innerHTML = + "
fecha
"; + } + if (this.TIPOAJUDA === "vertical") { + divmensagem.innerHTML = + "
fecha
"; + } + } + if (mensagem !== "") { + if (this.TIPOAJUDA !== "balao") { + YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes", "display", "none"); + if (this.TIPOAJUDA === "horizontal") { + divmensagem.style.left = parseInt(YAHOO.util.Dom.getStyle(objeto, "width"), 10) + pos[0] + 10 + "px"; + divmensagem.style.top = pos[1] - 2 + (parseInt(YAHOO.util.Dom.getStyle(objeto, "height"), 10) / 2) + "px"; + } + if (this.TIPOAJUDA === "vertical") { + divmensagem.style.left = (parseInt(YAHOO.util.Dom.getStyle(objeto, "width"), 10) / 2) + pos[0] - 5 + "px"; + divmensagem.style.top = pos[1] + 5 + parseInt(YAHOO.util.Dom.getStyle(objeto, "height"), 10) + "px"; + } + try { + clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes); + } catch (e) { } + i3GEO.barraDeBotoes.timeMostraAjudaBotoes = + setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('" + mensagem + "');", 5000); + } else { + hideAllTooltips(); + balloonAjuda = new Balloon(); + BalloonConfig(balloonAjuda, 'GBubble'); + balloonAjuda.delayTime = 0; + balloonAjuda.stem = false; + balloonAjuda.stemHeight = 0; + balloonAjuda.vOffset = -24; + balloonAjuda.images = i3GEO.configura.locaplic + '/pacotes/balloon-tooltips/htdocs/images/GBubblec'; + mensagem = + "
fecha
" + + mensagem + "
"; try { - clearTimeout(timeMostraAjudaBotoes); + clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes); } catch (e) { } - i3GEO.barraDeBotoes.timeAjudaBotoes = setTimeout(function() { + i3GEO.barraDeBotoes.timeMostraAjudaBotoes = setTimeout(function() { balloonAjuda.cleanup(); + balloonIsVisible = false; + // alert(mensagem); + if (i3GEO.barraDeBotoes.TIPO === "olhodepeixe" || i3GEO.barraDeBotoes.TIPO === "olhodepeixe1") { + balloonAjuda.showTooltip(objeto, mensagem, null, null, null, pos[0], pos[1] - 40); + } else { + balloonAjuda.showTooltip(objeto, mensagem, null, null, null, pos[0] + 12, pos[1]); + } + try { + clearTimeout(timeMostraAjudaBotoes); + } catch (e) { + } + i3GEO.barraDeBotoes.timeAjudaBotoes = setTimeout(function() { + balloonAjuda.cleanup(); + }, 4000); }, 4000); - }, 4000); + } } - } - }, - mostraJanelaAjuda : function(mensagem) { - $i("divMensagemBarraDeBotoesCorpo").innerHTML = mensagem; - YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes", "display", "block"); - try { - clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes); - } catch (e) { - } - i3GEO.barraDeBotoes.timeAjudaBotoes = setTimeout(function() { - i3GEO.barraDeBotoes.escondeJanelaAjuda(); - }, 3000); - }, - escondeJanelaAjuda : function() { - try { - if (i3GEO.barraDeBotoes.timeAjudaBotoes) { - clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes); + }, + mostraJanelaAjuda : function(mensagem) { + $i("divMensagemBarraDeBotoesCorpo").innerHTML = mensagem; + YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes", "display", "block"); + try { + clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes); + } catch (e) { } - } catch (e) { - } - if ($i("divMensagemBarraDeBotoes")) { - YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes", "display", "none"); - } - }, - /** - * Section: i3GEO.barraDeBotoes.editor - * - * Editor vetorial - */ - editor : { + i3GEO.barraDeBotoes.timeAjudaBotoes = setTimeout(function() { + i3GEO.barraDeBotoes.escondeJanelaAjuda(); + }, 3000); + }, + escondeJanelaAjuda : function() { + try { + if (i3GEO.barraDeBotoes.timeAjudaBotoes) { + clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes); + } + } catch (e) { + } + if ($i("divMensagemBarraDeBotoes")) { + YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes", "display", "none"); + } + }, /** - * Function: inicia - * - * Abre as opções do editor conforme a interface em uso + * Section: i3GEO.barraDeBotoes.editor + * + * Editor vetorial */ - inicia : function() { - i3GEO.eventos.cliquePerm.desativa(); - i3GEO.barraDeBotoes.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial"); - }, - // carrega as opcoes de edicao se a interface for do googlemaps - googlemaps : { - inicia : function(idjanela) { - var temp = - function() { - var cabecalho, minimiza, fecha, janela = YAHOO.i3GEO.janela.manager.find("i3GEOjanelaEditor"); - if (janela) { - janela.destroy(); + editor : { + /** + * Function: inicia + * + * Abre as opções do editor conforme a interface em uso + */ + inicia : function() { + i3GEO.eventos.cliquePerm.desativa(); + i3GEO.barraDeBotoes.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial"); + }, + // carrega as opcoes de edicao se a interface for do googlemaps + googlemaps : { + inicia : function(idjanela) { + var temp = + function() { + var cabecalho, minimiza, fecha, janela = YAHOO.i3GEO.janela.manager.find("i3GEOjanelaEditor"); + if (janela) { + janela.destroy(); + } + cabecalho = function() { + }; + minimiza = function() { + i3GEO.janela.minimiza("i3GEOjanelaEditor"); + }; + janela = + i3GEO.janela.cria( + "300px", + "100px", + "", + "", + "", + "Editor", + "i3GEOjanelaEditor", + false, + "hd", + cabecalho, + minimiza); + $i("i3GEOjanelaEditor_corpo").style.backgroundColor = "white"; + i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo"); + fecha = function() { + var temp = window.confirm("Remove a edicao?"); + if (i3GEO.eventos) { + i3GEO.eventos.cliquePerm.ativa(); + } + if (temp === true) { + i3GEO.desenho.googlemaps.destroyFeatures(i3GEO.desenho.googlemaps.shapes); + } + }; + YAHOO.util.Event.addListener(janela[0].close, "click", fecha); + }; + // @TODO incluir o js compactado ao inves do original + if (!i3GEO.editorGM) { + i3GEO.util.scriptTag( + i3GEO.configura.locaplic + "/classesjs/compactados/classe_editorgm_compacto.js", + temp, + "editorgm.js", + true); + } else { + temp.call(); } + } + }, + openlayers : { + inicia : function(idjanela) { + if (!i3GEO.editorOL) { + i3GEO.util.scriptTag( + i3GEO.configura.locaplic + "/classesjs/compactados/classe_editorol_compacto.js", + "i3GEO.barraDeBotoes.editor.openlayers.ativaPainel('" + idjanela + "')", + "editorol.js", + true); + } else { + if (!i3GEO.desenho.layergrafico) { + i3GEO.desenho.openlayers.criaLayerGrafico(); + i3GEO.editorOL.mapa.addLayers([ + i3GEO.desenho.layergrafico + ]); + } + if (!i3GEO.editorOL.backup) { + i3GEO.editorOL.backup = new OpenLayers.Layer.Vector("Backup", { + displayInLayerSwitcher : false, + visibility : false + }); + } + i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes); + } + }, + criaJanela : function() { + if ($i("i3GEOjanelaEditor")) { + return "i3GEOjanelaEditor"; + } + var janela, divid, titulo, cabecalho, minimiza; cabecalho = function() { }; minimiza = function() { i3GEO.janela.minimiza("i3GEOjanelaEditor"); }; - janela = - i3GEO.janela.cria( - "300px", - "100px", - "", - "", - "", - "Editor", - "i3GEOjanelaEditor", - false, - "hd", - cabecalho, - minimiza); + // cria a janela flutuante + titulo = $trad("u29"); + janela = i3GEO.janela.cria("300px", "200px", "", "", "", titulo, "i3GEOjanelaEditor", false, "hd", cabecalho, minimiza); + divid = janela[2].id; $i("i3GEOjanelaEditor_corpo").style.backgroundColor = "white"; - i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo"); - fecha = function() { - var temp = window.confirm("Remove a edicao?"); - if (i3GEO.eventos) { - i3GEO.eventos.cliquePerm.ativa(); - } - if (temp === true) { - i3GEO.desenho.googlemaps.destroyFeatures(i3GEO.desenho.googlemaps.shapes); - } + $i("i3GEOjanelaEditor_corpo").style.textAlign = "left"; + return divid; + }, + ativaPainel : function(idjanela) { + OpenLayers.ImgPath = i3GEO.configura.locaplic + "/pacotes/openlayers/img/"; + i3GEO.editorOL.fundo = "";// i3GEO.editorOL é criado pelo script carregado + i3GEO.editorOL.mapa = i3geoOL; + i3GEO.editorOL.maxext = ""; + i3GEO.editorOL.controles = []; + i3GEO.editorOL.botoes = { + 'pan' : false, + 'zoombox' : false, + 'zoomtot' : false, + 'legenda' : false, + 'distancia' : false, + 'area' : false, + 'identifica' : true, + 'linha' : true, + 'ponto' : true, + 'poligono' : true, + 'texto' : true, + 'corta' : true, + 'edita' : true, + 'listag' : true, + 'selecao' : true, + 'apaga' : true, + 'procura' : false, + 'propriedades' : true, + 'salva' : true, + 'ajuda' : true, + 'fecha' : true, + 'tools' : true, + 'undo' : true, + 'frente' : true }; - YAHOO.util.Event.addListener(janela[0].close, "click", fecha); - }; - // @TODO incluir o js compactado ao inves do original - if (!i3GEO.editorGM) { - i3GEO.util.scriptTag( - i3GEO.configura.locaplic + "/classesjs/compactados/classe_editorgm_compacto.js", - temp, - "editorgm.js", - true); - } else { - temp.call(); - } - } - }, - openlayers : { - inicia : function(idjanela) { - if (!i3GEO.editorOL) { - i3GEO.util.scriptTag( - i3GEO.configura.locaplic + "/classesjs/compactados/classe_editorol_compacto.js", - "i3GEO.barraDeBotoes.editor.openlayers.ativaPainel('" + idjanela + "')", - "editorol.js", - true); - } else { if (!i3GEO.desenho.layergrafico) { i3GEO.desenho.openlayers.criaLayerGrafico(); - i3GEO.editorOL.mapa.addLayers([ - i3GEO.desenho.layergrafico - ]); } - if (!i3GEO.editorOL.backup) { - i3GEO.editorOL.backup = new OpenLayers.Layer.Vector("Backup", { - displayInLayerSwitcher : false, - visibility : false - }); + if (idjanela) { + i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes); } - i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes); - } - }, - criaJanela : function() { - if ($i("i3GEOjanelaEditor")) { - return "i3GEOjanelaEditor"; - } - var janela, divid, titulo, cabecalho, minimiza; - cabecalho = function() { - }; - minimiza = function() { - i3GEO.janela.minimiza("i3GEOjanelaEditor"); - }; - // cria a janela flutuante - titulo = $trad("u29"); - janela = i3GEO.janela.cria("300px", "200px", "", "", "", titulo, "i3GEOjanelaEditor", false, "hd", cabecalho, minimiza); - divid = janela[2].id; - $i("i3GEOjanelaEditor_corpo").style.backgroundColor = "white"; - $i("i3GEOjanelaEditor_corpo").style.textAlign = "left"; - return divid; - }, - ativaPainel : function(idjanela) { - OpenLayers.ImgPath = i3GEO.configura.locaplic + "/pacotes/openlayers/img/"; - i3GEO.editorOL.fundo = "";// i3GEO.editorOL é criado pelo script carregado - i3GEO.editorOL.mapa = i3geoOL; - i3GEO.editorOL.maxext = ""; - i3GEO.editorOL.controles = []; - i3GEO.editorOL.botoes = { - 'pan' : false, - 'zoombox' : false, - 'zoomtot' : false, - 'legenda' : false, - 'distancia' : false, - 'area' : false, - 'identifica' : true, - 'linha' : true, - 'ponto' : true, - 'poligono' : true, - 'texto' : true, - 'corta' : true, - 'edita' : true, - 'listag' : true, - 'selecao' : true, - 'apaga' : true, - 'procura' : false, - 'propriedades' : true, - 'salva' : true, - 'ajuda' : true, - 'fecha' : true, - 'tools' : true, - 'undo' : true, - 'frente' : true - }; - if (!i3GEO.desenho.layergrafico) { - i3GEO.desenho.openlayers.criaLayerGrafico(); - } - if (idjanela) { - i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes); } } } - } -}; \ No newline at end of file + }; \ No newline at end of file diff --git a/classesjs/classe_guias.js b/classesjs/classe_guias.js index a380064..f5e1d66 100644 --- a/classesjs/classe_guias.js +++ b/classesjs/classe_guias.js @@ -1009,7 +1009,6 @@ i3GEO.guias = * {string} - namespace da janela utilizado para definir os elementos DIV onde o conteúdo é renderizado * */ - //TODO incluir nas ferramentas ajustaGuiaFerramenta : function(idjanela,namespace){ var c = $i(idjanela + "_corpo"), h, diff --git a/exemplos/abas.htm b/exemplos/abas.htm index e5f4557..19b63bd 100644 --- a/exemplos/abas.htm +++ b/exemplos/abas.htm @@ -11,7 +11,7 @@
- + - + geoprocessamento@mma.gov.br diff --git a/exemplos/aplic2.htm b/exemplos/aplic2.htm index 7e740a2..8230780 100644 --- a/exemplos/aplic2.htm +++ b/exemplos/aplic2.htm @@ -10,7 +10,7 @@ - + - +
diff --git a/exemplos/botoes1.htm b/exemplos/botoes1.htm index 5e685f2..099b680 100644 --- a/exemplos/botoes1.htm +++ b/exemplos/botoes1.htm @@ -15,7 +15,7 @@ Inclui a barra superior. Se vc não quiser o menu, é só comentar o TR --> - + @@ -121,7 +121,7 @@ - + geoprocessamento@mma.gov.br diff --git a/exemplos/botoes2.htm b/exemplos/botoes2.htm index e926917..0011118 100644 --- a/exemplos/botoes2.htm +++ b/exemplos/botoes2.htm @@ -15,7 +15,7 @@ Inclui a barra superior. Se vc não quiser o menu, é só comentar o TR --> - + @@ -121,7 +121,7 @@ - + geoprocessamento@mma.gov.br diff --git a/exemplos/botoes3.htm b/exemplos/botoes3.htm index cf172d6..aa18c66 100644 --- a/exemplos/botoes3.htm +++ b/exemplos/botoes3.htm @@ -15,7 +15,7 @@ Inclui a barra superior. Se vc não quiser o menu, é só comentar o TR --> - + @@ -121,7 +121,7 @@ - + geoprocessamento@mma.gov.br diff --git a/exemplos/botoes4.htm b/exemplos/botoes4.htm index 288b6e9..1409c55 100644 --- a/exemplos/botoes4.htm +++ b/exemplos/botoes4.htm @@ -15,7 +15,7 @@ Inclui a barra superior. Se vc não quiser o menu, é só comentar o TR --> - + @@ -121,7 +121,7 @@ - + geoprocessamento@mma.gov.br diff --git a/exemplos/botoes5.htm b/exemplos/botoes5.htm index fa638cf..7682b01 100644 --- a/exemplos/botoes5.htm +++ b/exemplos/botoes5.htm @@ -8,7 +8,7 @@ - + - + geoprocessamento@mma.gov.br diff --git a/exemplos/botoes6.htm b/exemplos/botoes6.htm index b308b4f..fd4e1a6 100755 --- a/exemplos/botoes6.htm +++ b/exemplos/botoes6.htm @@ -12,7 +12,7 @@
- + - + diff --git a/exemplos/botoeshtm.htm b/exemplos/botoeshtm.htm index 513767e..67bd7e6 100644 --- a/exemplos/botoeshtm.htm +++ b/exemplos/botoeshtm.htm @@ -14,7 +14,7 @@ arquivos não compactados, bastando substituir por i3geonaocompacto -->
- + @@ -56,7 +56,7 @@ arquivos não compactados, bastando substituir por i3geonaocompacto --> - +