Commit 1539592bc4430bb861d7f00f059d1cd65ac34623
1 parent
289f6716
Exists in
master
and in
7 other branches
Inclusão do plugin de adição de camadas heatmap
Showing
13 changed files
with
438 additions
and
12 deletions
Show diff stats
admin/admin.db
No preview for this file type
classesjs/classe_interface.js
@@ -1142,7 +1142,8 @@ i3GEO.Interface = { | @@ -1142,7 +1142,8 @@ i3GEO.Interface = { | ||
1142 | // verifica se a camada contem um plugin do i3geo | 1142 | // verifica se a camada contem um plugin do i3geo |
1143 | // caso tenha, direciona para a classe_i3geoplugin | 1143 | // caso tenha, direciona para a classe_i3geoplugin |
1144 | if (camada.plugini3geo != "") { | 1144 | if (camada.plugini3geo != "") { |
1145 | - i3GEO.pluginI3geo.inicia(camada.plugini3geo.tipo,camada.plugini3geo.parametros); | 1145 | + i3GEO.pluginI3geo.inicia(camada); |
1146 | + continue; | ||
1146 | } else { | 1147 | } else { |
1147 | if (camada.cache) { | 1148 | if (camada.cache) { |
1148 | urllayer = url + "&cache=" + camada.cache | 1149 | urllayer = url + "&cache=" + camada.cache |
@@ -1250,10 +1251,12 @@ i3GEO.Interface = { | @@ -1250,10 +1251,12 @@ i3GEO.Interface = { | ||
1250 | } catch (e) { | 1251 | } catch (e) { |
1251 | } | 1252 | } |
1252 | } | 1253 | } |
1253 | - if (camada.escondido.toLowerCase() === "sim") { | ||
1254 | - layer.transitionEffect = "null"; | 1254 | + if (layer && layer != "") { |
1255 | + if (camada.escondido.toLowerCase() === "sim") { | ||
1256 | + layer.transitionEffect = "null"; | ||
1257 | + } | ||
1258 | + i3geoOL.addLayer(layer); | ||
1255 | } | 1259 | } |
1256 | - i3geoOL.addLayer(layer); | ||
1257 | } else { | 1260 | } else { |
1258 | layer = i3geoOL.getLayersByName(camada.name)[0]; | 1261 | layer = i3geoOL.getLayersByName(camada.name)[0]; |
1259 | } | 1262 | } |
classesjs/classe_plugini3geo.js
1 | +/** | ||
2 | + * Title: pluginI3geo | ||
3 | + * | ||
4 | + * i3GEO.pluginI3geo | ||
5 | + * | ||
6 | + * Implementam os plugins do i3Geo que adicionam camadas especiais ao mapa, | ||
7 | + * normalmente dados vetoriais. | ||
8 | + * | ||
9 | + * Arquivo: | ||
10 | + * | ||
11 | + * i3geo/classesjs/classe_plugini3geo.js | ||
12 | + * | ||
13 | + * Licença: | ||
14 | + * | ||
15 | + * GPL2 | ||
16 | + * | ||
17 | + * i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | ||
18 | + * | ||
19 | + * Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente | ||
20 | + * Brasil Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | ||
21 | + * | ||
22 | + * Este programa é software livre; você pode redistribuí-lo | ||
23 | + * e/ou modificá-lo sob os termos da Licença Pública Geral | ||
24 | + * GNU conforme publicada pela Free Software Foundation; | ||
25 | + * | ||
26 | + * Este programa é distribuído na expectativa de que seja | ||
27 | + * útil, porém, SEM NENHUMA GARANTIA; nem mesmo a garantia | ||
28 | + * implícita de COMERCIABILIDADE OU ADEQUACÃO A UMA FINALIDADE | ||
29 | + * ESPECÍFICA. Consulte a Licença Pública Geral do GNU para | ||
30 | + * mais detalhes. Você deve ter recebido uma cópia da | ||
31 | + * Licença Pública Geral do GNU junto com este programa; se | ||
32 | + * não, escreva para a Free Software Foundation, Inc., no endereço | ||
33 | + * 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | ||
34 | + */ | ||
35 | + | ||
1 | if (typeof (i3GEO) === 'undefined') { | 36 | if (typeof (i3GEO) === 'undefined') { |
2 | var i3GEO = {}; | 37 | var i3GEO = {}; |
3 | } | 38 | } |
4 | i3GEO.pluginI3geo = { | 39 | i3GEO.pluginI3geo = { |
5 | - inicia : function(tipo, parametros) { | ||
6 | - i3GEO.pluginI3geo[tipo](parametros); | 40 | + /** |
41 | + * Inicia a execucao de um plugin | ||
42 | + * | ||
43 | + * Camada e um objeto gerado pelo i3Geo quando uma camada e adicionada ao | ||
44 | + * mapa O objeto i3GEO.arvoreDeCamadas.CAMADAS guarda todas as camadas | ||
45 | + * adicionadas ao mapa Ao adicionar uma camada pelo catalogo, o i3Geo | ||
46 | + * verifica se a camada possui plugin e direciona para ca Os plugins sao | ||
47 | + * definidos como metadados em cada mapfile de cada tema | ||
48 | + * | ||
49 | + * Veja em i3geo/classesphp/classe_mapa.php funcao parametrostemas | ||
50 | + */ | ||
51 | + inicia : function(camada) { | ||
52 | + i3GEO.janela.AGUARDEMODAL = true; | ||
53 | + i3GEO.janela.abreAguarde("aguardePlugin","Calculando..."); | ||
54 | + i3GEO.janela.AGUARDEMODAL = false; | ||
55 | + // chama a funcao conforme o tipo de plugin e a interface atual | ||
56 | + // para cada plugin deve haver um objeto com as funcoes especificas para | ||
57 | + // cada interface | ||
58 | + i3GEO.pluginI3geo[camada.plugini3geo.plugin][i3GEO.Interface.ATUAL] | ||
59 | + .call(null, camada); | ||
7 | }, | 60 | }, |
8 | - heatmap : function(parametros) { | ||
9 | - alert(parametros.coluna); | 61 | + /** |
62 | + * Function: heatmap | ||
63 | + * | ||
64 | + * Mapa de calor | ||
65 | + * | ||
66 | + * Gera um layer do tipo mapa de calor e adiciona ao mapa | ||
67 | + * | ||
68 | + * As dependências em javascript sao carregadas via script tag por | ||
69 | + * meio de ferramentas/heatmap/openlayers_js.php | ||
70 | + * | ||
71 | + * Esse programa também obtém os dados necessários ao | ||
72 | + * plugin | ||
73 | + * | ||
74 | + * O layer existente no mapfile deve conter um metadata chamado PLUGINI3GEO | ||
75 | + * | ||
76 | + * Esse matadado deve conter uma string que será transformada em um | ||
77 | + * objeto javascript para uso no plugin | ||
78 | + * | ||
79 | + * Exemplo: | ||
80 | + * | ||
81 | + * "PLUGINI3GEO" '{"plugin":"heatmap","parametros":{"coluna":"teste"}}' | ||
82 | + * | ||
83 | + * Coluna é a que contém os dados numéricos que definem | ||
84 | + * a quantidade de uma medida em cada ponto e é usada para gerar a | ||
85 | + * representação. Se for vazia, considera-se o valor como 1 | ||
86 | + * | ||
87 | + * As cores das classes existentes no LAYER serão utilizadas para | ||
88 | + * calcular as cores do mapa de calor. Se não existirem classes, | ||
89 | + * será usado o default. | ||
90 | + * | ||
91 | + */ | ||
92 | + heatmap : { | ||
93 | + openlayers : function(camada) { | ||
94 | + var p = i3GEO.configura.locaplic | ||
95 | + + "/ferramentas/heatmap/openlayers_js.php", carregaJs = "nao", crialayer; | ||
96 | + criaLayer = function() { | ||
97 | + var heatmap, g, datalen = heatmap_dados.length, features = []; | ||
98 | + if (i3GEO.Interface.openlayers.googleLike === true) { | ||
99 | + var sphericalMercatorProj = new OpenLayers.Projection( | ||
100 | + 'EPSG:900913'), geographicProj = new OpenLayers.Projection( | ||
101 | + 'EPSG:4326'); | ||
102 | + } | ||
103 | + while (datalen--) { | ||
104 | + g = new OpenLayers.Geometry.Point(parseInt( | ||
105 | + heatmap_dados[datalen].lng, 10), parseInt( | ||
106 | + heatmap_dados[datalen].lat, 10)); | ||
107 | + if(geographicProj){ | ||
108 | + g.transform(geographicProj, sphericalMercatorProj); | ||
109 | + } | ||
110 | + features.push(new OpenLayers.Feature.Vector(g, { | ||
111 | + count : parseInt(heatmap_dados[datalen].count, 10) | ||
112 | + })); | ||
113 | + } | ||
114 | + | ||
115 | + // create our vectorial layer using heatmap renderer | ||
116 | + heatmap = new OpenLayers.Layer.Vector(camada.name, { | ||
117 | + opacity : 0.3, | ||
118 | + renderers : [ 'Heatmap' ], | ||
119 | + rendererOptions : { | ||
120 | + weight : 'count', | ||
121 | + heatmapConfig : { | ||
122 | + radius : 10 | ||
123 | + } | ||
124 | + } | ||
125 | + }); | ||
126 | + heatmap.addFeatures(features); | ||
127 | + i3geoOL.addLayer(heatmap); | ||
128 | + heatmap_dados = null; | ||
129 | + i3GEO.janela.fechaAguarde("aguardePlugin"); | ||
130 | + }; | ||
131 | + if (typeof (HeatmapOverlay) === 'undefined') { | ||
132 | + carregaJs = "sim"; | ||
133 | + } | ||
134 | + p += "?carregajs=" + carregaJs + "&layer=" + camada.name | ||
135 | + + "&coluna=" + camada.plugini3geo.parametros.coluna | ||
136 | + + "&g_sid=" + i3GEO.configura.sid | ||
137 | + + "&nomevariavel=heatmap_dados"; | ||
138 | + | ||
139 | + i3GEO.util.scriptTag(p, criaLayer, | ||
140 | + "i3GEO.pluginI3geo.heatmap_script"); | ||
141 | + | ||
142 | + } | ||
10 | } | 143 | } |
11 | } | 144 | } |
12 | \ No newline at end of file | 145 | \ No newline at end of file |
classesphp/classe_atributos.php
@@ -24,7 +24,7 @@ Este programa é distribuído na expectativa de que seja útil | @@ -24,7 +24,7 @@ Este programa é distribuído na expectativa de que seja útil | ||
24 | porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | 24 | porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita |
25 | de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | 25 | de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. |
26 | Consulte a Licença Pública Geral do GNU para mais detalhes. | 26 | Consulte a Licença Pública Geral do GNU para mais detalhes. |
27 | -Você deve ter recebido uma c�pia da Licença Pública Geral do | 27 | +Você deve ter recebido uma copia da Licença Pública Geral do |
28 | GNU junto com este programa; se não, escreva para a | 28 | GNU junto com este programa; se não, escreva para a |
29 | Free Software Foundation, Inc., no endereço | 29 | Free Software Foundation, Inc., no endereço |
30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
@@ -360,7 +360,7 @@ class Atributos | @@ -360,7 +360,7 @@ class Atributos | ||
360 | 360 | ||
361 | parameters: | 361 | parameters: |
362 | 362 | ||
363 | - $itemtema - Tema que será processado. | 363 | + $itemtema - (opcional) se for definido, apenas um item sera retornado |
364 | 364 | ||
365 | $tipo - Tipo de abrangência espacial (brasil ou mapa). | 365 | $tipo - Tipo de abrangência espacial (brasil ou mapa). |
366 | 366 | ||
@@ -563,6 +563,84 @@ class Atributos | @@ -563,6 +563,84 @@ class Atributos | ||
563 | return($resultadoFinal); | 563 | return($resultadoFinal); |
564 | } | 564 | } |
565 | /* | 565 | /* |
566 | + function: listaRegistrosXY | ||
567 | + | ||
568 | + Pega o XY de cada registro e valores de itens especificos | ||
569 | + | ||
570 | + parameters: | ||
571 | + | ||
572 | + $items - lista de itens separado por "," | ||
573 | + | ||
574 | + $tipo - Tipo de abrangência espacial (brasil ou mapa). | ||
575 | + | ||
576 | + $tipolista - Indica se serão mostrados todos os registros ou apenas os selecionados (tudo|selecionados) | ||
577 | + | ||
578 | + */ | ||
579 | + function listaRegistrosXY($items,$tipo,$tipolista) | ||
580 | + { | ||
581 | + error_reporting(0); | ||
582 | + if(!$this->layer){ | ||
583 | + return "erro"; | ||
584 | + } | ||
585 | + $resultadoFinal = array(); | ||
586 | + if ((!isset($tipolista)) || ($tipolista=="")){ | ||
587 | + $tipolista = "tudo"; | ||
588 | + } | ||
589 | + //se tipo for igual a brasil, define a extensão geográfica total | ||
590 | + if ($tipo == "brasil"){ | ||
591 | + $this->mapa = extPadrao($this->mapa); | ||
592 | + } | ||
593 | + $this->layer->set("template","none.htm"); | ||
594 | + $this->layer->setfilter(""); | ||
595 | + if ($this->layer->data == ""){ | ||
596 | + return "erro. O tema não tem tabela"; | ||
597 | + } | ||
598 | + $items = str_replace(" ",",",$items); | ||
599 | + $items = explode(",",$items); | ||
600 | + $registros = array(); | ||
601 | + if ($tipolista == "selecionados"){ | ||
602 | + $shapes = retornaShapesSelecionados($this->layer,$this->arquivo,$this->mapa); | ||
603 | + $res_count = count($shapes); | ||
604 | + for ($i = 0; $i < $res_count; ++$i){ | ||
605 | + $valitem = array(); | ||
606 | + $shape = $shapes[$i]; | ||
607 | + $indx = $shape->index; | ||
608 | + foreach ($items as $item){ | ||
609 | + $valori = trim($shape->values[$item]); | ||
610 | + $valitem[] = array("item"=>$item,"valor"=>$valori); | ||
611 | + } | ||
612 | + $c = $shape->getCentroid(); | ||
613 | + $registros[] = array("indice"=>$indx,"valores"=>$valitem,"x"=>$c->x,"y"=>$c->y); | ||
614 | + } | ||
615 | + } | ||
616 | + if ($tipolista == "tudo"){ | ||
617 | + if (@$this->layer->queryByrect($this->mapa->extent) == MS_SUCCESS){ | ||
618 | + $res_count = $this->layer->getNumresults(); | ||
619 | + $sopen = $this->layer->open(); | ||
620 | + for ($i = 0; $i < $res_count; ++$i){ | ||
621 | + $valitem = array(); | ||
622 | + if($this->v == 6){ | ||
623 | + $shape = $this->layer->getShape($this->layer->getResult($i)); | ||
624 | + $indx = $shape->index; | ||
625 | + } | ||
626 | + else{ | ||
627 | + $result = $this->layer->getResult($i); | ||
628 | + $indx = $result->shapeindex; | ||
629 | + $shape = $this->layer->getfeature($indx,-1); | ||
630 | + } | ||
631 | + foreach ($items as $item){ | ||
632 | + $valori = trim($shape->values[$item]); | ||
633 | + $valitem[] = array("item"=>$item,"valor"=>$valori); | ||
634 | + } | ||
635 | + $c = $shape->getCentroid(); | ||
636 | + $registros[] = array("indice"=>$indx,"valores"=>$valitem,"x"=>$c->x,"y"=>$c->y); | ||
637 | + } | ||
638 | + $this->layer->close(); | ||
639 | + } | ||
640 | + } | ||
641 | + return($registros); | ||
642 | + } | ||
643 | + /* | ||
566 | function: buscaRegistros | 644 | function: buscaRegistros |
567 | 645 | ||
568 | Procura valores em uma tabela que aderem a uma palavra de busca. | 646 | Procura valores em uma tabela que aderem a uma palavra de busca. |
classesphp/classe_mapa.php
@@ -407,7 +407,8 @@ class Mapa | @@ -407,7 +407,8 @@ class Mapa | ||
407 | $tiles = ""; | 407 | $tiles = ""; |
408 | $plugini3geo = ""; | 408 | $plugini3geo = ""; |
409 | if($oLayer->getmetadata("PLUGINI3GEO") != ""){ | 409 | if($oLayer->getmetadata("PLUGINI3GEO") != ""){ |
410 | - $plugini3geo = base64_encode($oLayer->getmetadata("PLUGINI3GEO")); | 410 | + $plugini3geo = $oLayer->getmetadata("PLUGINI3GEO"); |
411 | + $plugini3geo = json_decode($plugini3geo); | ||
411 | } | 412 | } |
412 | //formatacao antiga, antes da versao 6.0 | 413 | //formatacao antiga, antes da versao 6.0 |
413 | /* | 414 | /* |
@@ -0,0 +1,22 @@ | @@ -0,0 +1,22 @@ | ||
1 | +<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>i3GEO.editorGM - i3Geo</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script></head><body class="FramedContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!-- | ||
2 | +if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script> | ||
3 | + | ||
4 | +<!-- Generated by Natural Docs, version 1.51 --> | ||
5 | +<!-- http://www.naturaldocs.org --> | ||
6 | + | ||
7 | +<!-- saved from url=(0026)http://www.naturaldocs.org --> | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | +<div id=Content><div class="CClasse"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="i3GEO.editorGM"></a>i3GEO.<wbr>editorGM</h1><div class=CBody><p>Funções de edição vetorial utilizadas pelo editor de regiões do sistema METAESTAT</p></div></div></div> | ||
13 | + | ||
14 | +</div><!--Content--> | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | +<!--START_ND_TOOLTIPS--> | ||
19 | +<!--END_ND_TOOLTIPS--> | ||
20 | + | ||
21 | +<script language=JavaScript><!-- | ||
22 | +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> | ||
0 | \ No newline at end of file | 23 | \ No newline at end of file |
@@ -0,0 +1,33 @@ | @@ -0,0 +1,33 @@ | ||
1 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> | ||
2 | + | ||
3 | +<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>i3Geo - Constant Index</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script></head><body class="FramedIndexPage" onLoad="NDOnLoad()"><script language=JavaScript><!-- | ||
4 | +if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script> | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | +<!-- Generated by Natural Docs, version 1.51 --> | ||
10 | +<!-- http://www.naturaldocs.org --> | ||
11 | + | ||
12 | +<!-- saved from url=(0026)http://www.naturaldocs.org --> | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | +<div id=Index><div class=IPageTitle>Constant Index</div><div class=INavigationBar>$#! · 0-9 · <a href="#A">A</a> · B · C · D · E · <a href="#F">F</a> · G · H · <a href="#I">I</a> · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z</div><table border=0 cellspacing=0 cellpadding=0><tr><td class=IHeading id=IFirstHeading><a name="A"></a>A</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix> </td><td class=IEntry><span class=ISymbol>ARVORE</span><div class=ISubIndex><a href="../files/classesjs/classe_arvoredecamadas-js.html#ARVORE" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')" class=IFile>classesjs/<wbr>classe_arvoredecamadas.js</a><a href="../files/classesjs/classe_arvoredetemas-js.html#ARVORE" id=link2 onMouseOver="ShowTip(event, 'tt1', 'link2')" onMouseOut="HideTip('tt1')" class=IFile>classesjs/<wbr>classe_arvoredetemas.js</a></div></td></tr><tr><td class=IHeading><a name="F"></a>F</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix> </td><td class=IEntry><a href="../files/classesjs/classe_arvoredetemas-js.html#FATORESTRELA" id=link3 onMouseOver="ShowTip(event, 'tt2', 'link3')" onMouseOut="HideTip('tt2')" class=ISymbol>FATORESTRELA</a></td></tr><tr><td class=IHeading><a name="I"></a>I</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix> </td><td class=IEntry><span class=ISymbol>IDHTML</span><div class=ISubIndex><a href="../files/classesjs/classe_arvoredecamadas-js.html#IDHTML" id=link4 onMouseOver="ShowTip(event, 'tt3', 'link4')" onMouseOut="HideTip('tt3')" class=IFile>classesjs/<wbr>classe_arvoredecamadas.js</a><a href="../files/classesjs/classe_arvoredetemas-js.html#IDHTML" id=link5 onMouseOver="ShowTip(event, 'tt3', 'link5')" onMouseOut="HideTip('tt3')" class=IFile>classesjs/<wbr>classe_arvoredetemas.js</a></div></td></tr></table> | ||
18 | +<!--START_ND_TOOLTIPS--> | ||
19 | +<div class=CToolTip id="tt1"><div class=CConstant>Objeto com a árvore criada com YAHOO.widget.TreeView Pode ser usado para receber métodos da API do YAHOO</div></div><!--END_ND_TOOLTIPS--> | ||
20 | + | ||
21 | + | ||
22 | +<!--START_ND_TOOLTIPS--> | ||
23 | +<div class=CToolTip id="tt2"><div class=CConstant>Valor que sera utilizado para dividir o valor bruto do numero de acessos de cada tema.</div></div><!--END_ND_TOOLTIPS--> | ||
24 | + | ||
25 | + | ||
26 | +<!--START_ND_TOOLTIPS--> | ||
27 | +<div class=CToolTip id="tt3"><div class=CConstant>Armazena o ID do elemento DOM onde a árvore foi inserida.</div></div><!--END_ND_TOOLTIPS--> | ||
28 | + | ||
29 | +</div><!--Index--> | ||
30 | + | ||
31 | + | ||
32 | +<script language=JavaScript><!-- | ||
33 | +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> | ||
0 | \ No newline at end of file | 34 | \ No newline at end of file |
@@ -0,0 +1,25 @@ | @@ -0,0 +1,25 @@ | ||
1 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> | ||
2 | + | ||
3 | +<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>i3Geo - File Index</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script></head><body class="FramedIndexPage" onLoad="NDOnLoad()"><script language=JavaScript><!-- | ||
4 | +if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script> | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | +<!-- Generated by Natural Docs, version 1.51 --> | ||
10 | +<!-- http://www.naturaldocs.org --> | ||
11 | + | ||
12 | +<!-- saved from url=(0026)http://www.naturaldocs.org --> | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | +<div id=Index><div class=IPageTitle>File Index</div><div class=INavigationBar>$#! · 0-9 · A · B · <a href="#C">C</a> · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z</div><table border=0 cellspacing=0 cellpadding=0><tr><td class=IHeading id=IFirstHeading><a name="C"></a>C</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix> </td><td class=IEntry><a href="../files/classesjs/classe_desenho-js.html#classe_desenho.js" class=ISymbol>classe_desenho.js</a></td></tr></table> | ||
18 | +<!--START_ND_TOOLTIPS--> | ||
19 | +<!--END_ND_TOOLTIPS--> | ||
20 | + | ||
21 | +</div><!--Index--> | ||
22 | + | ||
23 | + | ||
24 | +<script language=JavaScript><!-- | ||
25 | +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> | ||
0 | \ No newline at end of file | 26 | \ No newline at end of file |
@@ -0,0 +1,26 @@ | @@ -0,0 +1,26 @@ | ||
1 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> | ||
2 | + | ||
3 | +<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="FramedSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!-- | ||
4 | +if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script> | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | +<!-- Generated by Natural Docs, version 1.51 --> | ||
10 | +<!-- http://www.naturaldocs.org --> | ||
11 | + | ||
12 | +<!-- saved from url=(0026)http://www.naturaldocs.org --> | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | +<div id=Index><div class=IPageTitle>Search Results</div><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_ARVORE><div class=IEntry><a href="javascript:searchResults.Toggle('SR_ARVORE')" class=ISymbol>ARVORE</a><div class=ISubIndex><a href="../files/classesjs/classe_arvoredecamadas-js.html#ARVORE" class=IFile>classesjs/<wbr>classe_arvoredecamadas.js</a><a href="../files/classesjs/classe_arvoredetemas-js.html#ARVORE" class=IFile>classesjs/<wbr>classe_arvoredetemas.js</a></div></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!-- | ||
18 | +document.getElementById("Loading").style.display="none"; | ||
19 | +document.getElementById("NoMatches").style.display="none"; | ||
20 | +var searchResults = new SearchResults("searchResults", "FramedHTML"); | ||
21 | +searchResults.Search(); | ||
22 | +--></script></div><!--Index--> | ||
23 | + | ||
24 | + | ||
25 | +<script language=JavaScript><!-- | ||
26 | +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> | ||
0 | \ No newline at end of file | 27 | \ No newline at end of file |
@@ -0,0 +1,26 @@ | @@ -0,0 +1,26 @@ | ||
1 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> | ||
2 | + | ||
3 | +<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="FramedSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!-- | ||
4 | +if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script> | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | +<!-- Generated by Natural Docs, version 1.51 --> | ||
10 | +<!-- http://www.naturaldocs.org --> | ||
11 | + | ||
12 | +<!-- saved from url=(0026)http://www.naturaldocs.org --> | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | +<div id=Index><div class=IPageTitle>Search Results</div><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_IDHTML><div class=IEntry><a href="javascript:searchResults.Toggle('SR_IDHTML')" class=ISymbol>IDHTML</a><div class=ISubIndex><a href="../files/classesjs/classe_arvoredecamadas-js.html#IDHTML" class=IFile>classesjs/<wbr>classe_arvoredecamadas.js</a><a href="../files/classesjs/classe_arvoredetemas-js.html#IDHTML" class=IFile>classesjs/<wbr>classe_arvoredetemas.js</a></div></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!-- | ||
18 | +document.getElementById("Loading").style.display="none"; | ||
19 | +document.getElementById("NoMatches").style.display="none"; | ||
20 | +var searchResults = new SearchResults("searchResults", "FramedHTML"); | ||
21 | +searchResults.Search(); | ||
22 | +--></script></div><!--Index--> | ||
23 | + | ||
24 | + | ||
25 | +<script language=JavaScript><!-- | ||
26 | +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> | ||
0 | \ No newline at end of file | 27 | \ No newline at end of file |
@@ -0,0 +1,26 @@ | @@ -0,0 +1,26 @@ | ||
1 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> | ||
2 | + | ||
3 | +<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="FramedSearchResultsPage" onLoad="NDOnLoad()"><script language=JavaScript><!-- | ||
4 | +if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script> | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | +<!-- Generated by Natural Docs, version 1.51 --> | ||
10 | +<!-- http://www.naturaldocs.org --> | ||
11 | + | ||
12 | +<!-- saved from url=(0026)http://www.naturaldocs.org --> | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | +<div id=Index><div class=IPageTitle>Search Results</div><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_classe_unddesenho_perjs><div class=IEntry><a href="../files/classesjs/classe_desenho-js.html#classe_desenho.js" class=ISymbol>classe_desenho.js</a></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!-- | ||
18 | +document.getElementById("Loading").style.display="none"; | ||
19 | +document.getElementById("NoMatches").style.display="none"; | ||
20 | +var searchResults = new SearchResults("searchResults", "FramedHTML"); | ||
21 | +searchResults.Search(); | ||
22 | +--></script></div><!--Index--> | ||
23 | + | ||
24 | + | ||
25 | +<script language=JavaScript><!-- | ||
26 | +if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> | ||
0 | \ No newline at end of file | 27 | \ No newline at end of file |
@@ -0,0 +1,53 @@ | @@ -0,0 +1,53 @@ | ||
1 | +<?php | ||
2 | +/** | ||
3 | +Obtem os dados para geracao de mapa de calor. Envia o codigo javascript necessario se for solicitado. | ||
4 | + | ||
5 | +Parametros: | ||
6 | + | ||
7 | +carregajs sim|nao envia ou nao o codigo javascript | ||
8 | + | ||
9 | +layer codigo da camada que fornecera os dados | ||
10 | + | ||
11 | +coluna coluna que contem os dados | ||
12 | + | ||
13 | +g_sid codigo da secao i3geo | ||
14 | + | ||
15 | +nomevariavel nome da variavel javascript que sera retornada com os valores | ||
16 | + | ||
17 | + */ | ||
18 | +$dir = dirname(__FILE__); | ||
19 | +//inicializa o programa verificando seguranca e pegando os parametros enviados pela URL e pela secao | ||
20 | +include_once($dir."/../inicia.php"); | ||
21 | + | ||
22 | +//pega os dados e formata como uma string no formato | ||
23 | +// [{"lat":"-21.7079984","lng":"-47.4913629","count":"1"}] | ||
24 | +//os dados sao devolvidos como uma variavel javascript | ||
25 | +//obtem os registros | ||
26 | +include_once($dir."/../../classesphp/classe_atributos.php"); | ||
27 | + | ||
28 | +$m = new Atributos($map_file,$layer); | ||
29 | +$registros = $m->listaRegistrosXY($coluna, "brasil", "tudo"); | ||
30 | +$n = count($registros); | ||
31 | +$resultado = array(); | ||
32 | +if(empty($coluna)){ | ||
33 | + foreach($registros as $r){ | ||
34 | + $resultado[] = '{"lat":"'.$r["y"].'","lng":"'.$r["x"].'","count":"1"}'; | ||
35 | + } | ||
36 | +} | ||
37 | +else{ | ||
38 | + foreach($registros as $r){ | ||
39 | + $resultado[] = '{"lat":"'.$r["y"].'","lng":"'.$r["x"].'","count":"'.$r[$coluna].'"}'; | ||
40 | + } | ||
41 | +} | ||
42 | +if (!connection_aborted()){ | ||
43 | + if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | ||
44 | + restauraCon($map_file,$postgis_mapa); | ||
45 | +} | ||
46 | + | ||
47 | +echo $nomevariavel.' = ['.implode(",",$resultado).'];'; | ||
48 | +if($carregajs === "sim"){ | ||
49 | + include_once($dir."/../../pacotes/heatmap/src/heatmap.js"); | ||
50 | + include_once($dir."/../../pacotes/heatmap/src/heatmap-openlayers-renderer.js"); | ||
51 | +} | ||
52 | + | ||
53 | +?> | ||
0 | \ No newline at end of file | 54 | \ No newline at end of file |
temas/_lmapadecalor.map
@@ -8,7 +8,7 @@ MAP | @@ -8,7 +8,7 @@ MAP | ||
8 | "TIP" "TIPO,ANOCRIA,NOMELOC" | 8 | "TIP" "TIPO,ANOCRIA,NOMELOC" |
9 | "CLASSE" "SIM" | 9 | "CLASSE" "SIM" |
10 | "TEMA" "Localidades (usar com mapa de calor)" | 10 | "TEMA" "Localidades (usar com mapa de calor)" |
11 | - "PLUGINI3GEO" '{plugin:"heatmap",parametros:{coluna:"",valor:1}}' | 11 | + "PLUGINI3GEO" '{"plugin":"heatmap","parametros":{"coluna":""}}' #se coluna for vazio, assume valor 1 |
12 | END # METADATA | 12 | END # METADATA |
13 | NAME "_lmapadecalor" | 13 | NAME "_lmapadecalor" |
14 | STATUS OFF | 14 | STATUS OFF |