From d37a04464676d8280a4d1c38bab71d223447be3a Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Wed, 20 Aug 2014 15:03:03 +0000 Subject: [PATCH] --- .project | 26 +++++++++++++++++++++----- .settings/.jsdtscope | 100 +++++----------------------------------------------------------------------------------------------- .settings/org.eclipse.wst.jsdt.ui.superType.container | 2 +- .settings/org.eclipse.wst.jsdt.ui.superType.name | 2 +- ferramentas/heatmap/funcoes.php | 2 +- ferramentas/heatmap/index.js | 65 ++++++++++++++++++++++++++++++++--------------------------------- ferramentas/markercluster/.project | 17 +++++++++++++++++ ferramentas/markercluster/.settings/.jsdtscope | 4 ++++ ferramentas/markercluster/.settings/org.eclipse.wst.jsdt.ui.superType.container | 1 + ferramentas/markercluster/.settings/org.eclipse.wst.jsdt.ui.superType.name | 1 + ferramentas/markercluster/funcoes.php | 2 +- ferramentas/saiku/cartograma.php | 12 +++++++++++- ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/saiku/plugins/i3GeoMap/plugin.js | 14 ++++++++------ 13 files changed, 104 insertions(+), 144 deletions(-) create mode 100755 ferramentas/markercluster/.project create mode 100755 ferramentas/markercluster/.settings/.jsdtscope create mode 100755 ferramentas/markercluster/.settings/org.eclipse.wst.jsdt.ui.superType.container create mode 100755 ferramentas/markercluster/.settings/org.eclipse.wst.jsdt.ui.superType.name diff --git a/.project b/.project index 764db75..db8712c 100755 --- a/.project +++ b/.project @@ -25,9 +25,16 @@ org.eclipse.wst.jsdt.core.jsNature org.eclipse.php.core.PHPNature + + + gvsig + 2 + /var/www/i3geo/pacotes/gvsig + + - 1399312895196 + 1406724317282 30 @@ -36,7 +43,7 @@ - 1399312895197 + 1406724317287 30 @@ -45,7 +52,7 @@ - 1399312895199 + 1406724317292 30 @@ -54,7 +61,7 @@ - 1399312895201 + 1406724317296 30 @@ -63,7 +70,7 @@ - 1399312895202 + 1406724317299 30 @@ -71,5 +78,14 @@ 1.0-name-matches-false-false-*compacto* + + 1406724317303 + + 22 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-false-*.css.php + + diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope index 4b56b4d..fd01699 100755 --- a/.settings/.jsdtscope +++ b/.settings/.jsdtscope @@ -1,9 +1,9 @@ - - + + @@ -52,6 +52,7 @@ + @@ -85,9 +86,9 @@ - + - + @@ -110,97 +111,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container index 49c8cd4..3bd5d0a 100755 --- a/.settings/org.eclipse.wst.jsdt.ui.superType.container +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -1 +1 @@ -org.eclipse.wst.jsdt.launching.JRE_CONTAINER \ No newline at end of file +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name index 11006e2..05bd71b 100755 --- a/.settings/org.eclipse.wst.jsdt.ui.superType.name +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -1 +1 @@ -Global \ No newline at end of file +Window \ No newline at end of file diff --git a/ferramentas/heatmap/funcoes.php b/ferramentas/heatmap/funcoes.php index 154cf17..3f58ab0 100644 --- a/ferramentas/heatmap/funcoes.php +++ b/ferramentas/heatmap/funcoes.php @@ -20,7 +20,7 @@ function heatmapDados($map_file){ } else{ foreach($registros as $r){ - $resultado[] = '{"lat":"'.$r["y"].'","lng":"'.$r["x"].'","count":"'.$r[$coluna].'"}'; + $resultado[] = '{"lat":"'.$r["y"].'","lng":"'.$r["x"].'","count":"'.$r["valores"][0]["valor"].'"}'; } } if (!connection_aborted()){ diff --git a/ferramentas/heatmap/index.js b/ferramentas/heatmap/index.js index f92f49e..f4c575c 100644 --- a/ferramentas/heatmap/index.js +++ b/ferramentas/heatmap/index.js @@ -1,31 +1,31 @@ /** * Title: heatmap - * + * * Gera um mapa de calor baseado em uma camada existente no mapa. - * + * * Mapas de calor são camadas que utilizam o plugin de camadas heatmap. Veja em classesjs/classe_plugini3geo.js - * + * * A ferramenta altera o mapfile em uso clonando o mapfile escolhido e adicionando os metadados necessários ao uso do heatmap - * + * * Veja: - * + * * - * + * * Arquivo: - * + * * i3geo/ferramentas/heatmap/index.js.php - * + * * Licenca: - * + * * 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 @@ -39,7 +39,7 @@ i3GEOF.heatmap = { /** * Variavel: aguarde - * + * * Objeto DOM com a imagem de aguarde existente no cabeçalho da janela. */ aguarde : "", @@ -51,9 +51,9 @@ i3GEOF.heatmap = }, /** * Function: iniciaDicionario - * + * * Carrega o dicionário e chama a função que inicia a ferramenta - * + * * O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script */ iniciaDicionario : function() { @@ -68,11 +68,11 @@ i3GEOF.heatmap = }, /** * Function: inicia - * + * * Inicia a ferramenta. É chamado por criaJanelaFlutuante - * + * * Parametro: - * + * * iddiv {String} - id do div que receberá o conteudo HTML da ferramenta */ inicia : function(iddiv) { @@ -85,11 +85,11 @@ i3GEOF.heatmap = }, /** * Function: html - * + * * Gera o código html para apresentação das opções da ferramenta - * + * * Retorno: - * + * * String com o código html */ html : function() { @@ -102,7 +102,7 @@ i3GEOF.heatmap = }, /** * Function: iniciaJanelaFlutuante - * + * * Cria a janela flutuante para controle da ferramenta. */ iniciaJanelaFlutuante : function() { @@ -199,7 +199,6 @@ i3GEOF.heatmap = "i3GEOheatmapresultado", true, "i3GEOF.heatmap_rodape"); - i3GEOF.heatmap.comboItens(); }, t4 : function() { var ins = "

" + $trad(6, i3GEOF.heatmap.dicionario); @@ -220,9 +219,9 @@ i3GEOF.heatmap = }, /** * Function: criaheatmap - * + * * Executa a operação de geração do heatmap - * + * */ criaheatmap : function() { try { @@ -259,11 +258,11 @@ i3GEOF.heatmap = }, /** * Function: comboTemasSel - * + * * Cria um combo com a lista de temas - * + * * Veja: - * + * * */ comboTemasSel : function() { @@ -283,13 +282,13 @@ i3GEOF.heatmap = }, /** * Function: comboItens - * + * * Cria um combo para escolha de um item do tema - * + * * Veja: - * + * * - * + * */ comboItens : function() { i3GEO.util diff --git a/ferramentas/markercluster/.project b/ferramentas/markercluster/.project new file mode 100755 index 0000000..ceeee04 --- /dev/null +++ b/ferramentas/markercluster/.project @@ -0,0 +1,17 @@ + + + ferramentas heatmap + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/ferramentas/markercluster/.settings/.jsdtscope b/ferramentas/markercluster/.settings/.jsdtscope new file mode 100755 index 0000000..0e4b119 --- /dev/null +++ b/ferramentas/markercluster/.settings/.jsdtscope @@ -0,0 +1,4 @@ + + + + diff --git a/ferramentas/markercluster/.settings/org.eclipse.wst.jsdt.ui.superType.container b/ferramentas/markercluster/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100755 index 0000000..49c8cd4 --- /dev/null +++ b/ferramentas/markercluster/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.JRE_CONTAINER \ No newline at end of file diff --git a/ferramentas/markercluster/.settings/org.eclipse.wst.jsdt.ui.superType.name b/ferramentas/markercluster/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100755 index 0000000..11006e2 --- /dev/null +++ b/ferramentas/markercluster/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Global \ No newline at end of file diff --git a/ferramentas/markercluster/funcoes.php b/ferramentas/markercluster/funcoes.php index 050e380..1adccf0 100644 --- a/ferramentas/markercluster/funcoes.php +++ b/ferramentas/markercluster/funcoes.php @@ -17,7 +17,7 @@ function markerclusterDados($map_file){ } else{ foreach($registros as $r){ - $resultado[] = '{"lat":"'.$r["y"].'","lng":"'.$r["x"].'","count":"'.$r[$coluna].'"}'; + $resultado[] = '{"lat":"'.$r["y"].'","lng":"'.$r["x"].'","count":"'.$r["valores"][0]["valor"].'"}'; } } if (!connection_aborted()){ diff --git a/ferramentas/saiku/cartograma.php b/ferramentas/saiku/cartograma.php index 7a6704c..7b07b2c 100644 --- a/ferramentas/saiku/cartograma.php +++ b/ferramentas/saiku/cartograma.php @@ -81,6 +81,12 @@ foreach($dados as $dado){ } $valores[] = "(".implode(",",$linha).")"; } +// +//o nome da coluna com os dados e acentuado em alguns casos +//por isso, camadas baseadas em plugins precisam mudar isso +if($opcoes["tipo"] == "calor" && count($nomesColunas) > 1){ + $nomesColunas[count($nomesColunas) - 1] = "colunaCalor"; +} $sqldados = " select st_setsrid(".$sqlColunaGeo.",".$srid.") as $colunageo, ".implode(",",$colunastabela).",dataset.* from ".$meta["esquemadb"].".".$meta["tabela"]." INNER JOIN @@ -107,6 +113,9 @@ for($i=0;$i<$nlayers;$i++){ $ll->set("status",MS_OFF); } } + if($ll->getmetadata("tema") == "Limites"){ + $ll->set("status",MS_DELETE); + } } $layer = ms_newLayerObj($mapa); @@ -196,8 +205,9 @@ if($opcoes["tipo"] == "coresChapadas"){ $m->salva(); } if($opcoes["tipo"] == "calor"){ - $parametros = '{"plugin":"heatmap","parametros":{"tipoGradiente":"default","opacity":".8","coluna":"","radius":"'.$opcoes["raio"].'","max":"'.$opcoes["max"].'"}}'; + $parametros = '{"plugin":"heatmap","parametros":{"tipoGradiente":"default","opacity":".8","valorPonto":'.$opcoes["valorPonto"].',"coluna":"'.$nomesColunas[1].'","radius":"'.$opcoes["raio"].'"}}'; $layer->setmetadata("PLUGINI3GEO",$parametros); + $layer->setmetadata("SAIKU",$opcoes["tipo"]); $mapa->save($map_file); } header("Location:".$opcoes["locaplic"]."/mashups/openlayers.php?temas=".$map_file."&DESLIGACACHE=sim&botoes=legenda,pan,zoombox,zoomtot,zoomin,zoomout,distancia,area,identifica&controles=navigation,layerswitcher,scaleline,mouseposition,overviewmap,keyboarddefaults&tiles=false&mapext=".$opcoes["mapext"]); diff --git a/ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/saiku/plugins/i3GeoMap/plugin.js b/ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/saiku/plugins/i3GeoMap/plugin.js index f66ea55..306f985 100644 --- a/ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/saiku/plugins/i3GeoMap/plugin.js +++ b/ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/saiku/plugins/i3GeoMap/plugin.js @@ -48,8 +48,8 @@ var i3GeoMap = Backbone.View.extend({ //"