From 75b6916da129665ca1505f215af37143fa9f95e2 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Tue, 23 Feb 2010 03:50:14 +0000 Subject: [PATCH] --- classesphp/classe_atributos.php | 11 +++++++---- ferramentas/identifica/index.js.php | 32 +++++++++++++++++++------------- menutemas/admin.db | Bin 66560 -> 0 bytes 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/classesphp/classe_atributos.php b/classesphp/classe_atributos.php index 0e66565..c911973 100644 --- a/classesphp/classe_atributos.php +++ b/classesphp/classe_atributos.php @@ -1094,6 +1094,7 @@ $etip booblean - indica se a solicitação é para obtenção dos dados do tipo etiq */ function identificaQBP2($tema,$x,$y,$map_file,$resolucao,$item="",$tiporetorno="",$etip=false) { + $mapa = ms_newMapObj($map_file); $layer = $mapa->getLayerByName($tema); $layer->set("status",MS_DEFAULT); @@ -1181,18 +1182,20 @@ function identificaQBP2($tema,$x,$y,$map_file,$resolucao,$item="",$tiporetorno=" $layer->set("tolerance",$resolucao); $ident = @$layer->queryByPoint($pt, 0, 0); //0.01); } + //error_reporting(E_ALL); if (($layer->type == MS_LAYER_POINT) || ($layer->type == MS_LAYER_LINE)) { $layer->set("toleranceunits",MS_PIXELS); $layer->set("tolerance",$resolucao); - $ident = @$layer->queryByPoint($pt, 1, 0); //0.01); + $ident = @$layer->queryByPoint($pt, 1, -1); //0.01); } if ($layer->type == MS_LAYER_POLYGON) { - $layer->set("toleranceunits",'MS_PIXEL'); - $layer->set("tolerance",1); - $ident = @$layer->queryByPoint($pt, 1, 0); + $layer->set("toleranceunits",MS_PIXELS); + $layer->set("tolerance",$resolucao); + $ident = @$layer->queryByPoint($pt, 1, -1); } + if ($ident == MS_SUCCESS) { $itens = $layer->getmetadata("ITENS"); // itens diff --git a/ferramentas/identifica/index.js.php b/ferramentas/identifica/index.js.php index 8a9d6ab..93a193b 100644 --- a/ferramentas/identifica/index.js.php +++ b/ferramentas/identifica/index.js.php @@ -459,7 +459,7 @@ i3GEOF.identifica = { retorno {JSON} - objeto JSON com os dados */ mostraDadosTema: function(retorno){ - var res="",div0,ntemas,i,resultados,nres,cor,j; + var res="",div0,ntemas,i,resultados,nres,cor,j,itens,nitens,k; if (retorno.data !== undefined) { retorno = retorno.data; @@ -469,24 +469,30 @@ i3GEOF.identifica = { for(i=0;i"; + if(resultados[0] !== " ") { - res += "
"+retorno[i].nome+"
"; - nres = resultados.length; + nres = resultados.length; cor = "RGB(250,250,250)"; for(j=0;j  "+resultados[j][0].alias+": "+resultados[j][0].valor+"";} - else - {res += "
  "+resultados[j][0].alias+": "+resultados[j][0].valor+"
";} - if(resultados[j].img !== "") - {res += "
"+resultados[j][0].img+"
";} - if (cor === "RGB(250,250,250)"){cor = "beige";} - else - {cor = "RGB(250,250,250)";} + nitens = resultados[j].length; + for(k=0;k  "+resultados[j][k].alias+": "+resultados[j][k].valor+"";} + else + {res += "
  "+resultados[j][k].alias+": "+resultados[j][k].valor+"
";} + if(resultados[j][k].img !== "") + {res += "
"+resultados[j][k].img+"
";} + if (cor === "RGB(250,250,250)"){cor = "beige";} + else + {cor = "RGB(250,250,250)";} + } + res += "
"; } } + else + {res += "Nada encontrado";} } $i("i3GEOidentificaocorrencia").innerHTML=res; } diff --git a/menutemas/admin.db b/menutemas/admin.db index b8f2f96..2f4cfd4 100644 Binary files a/menutemas/admin.db and b/menutemas/admin.db differ -- libgit2 0.21.2