Commit 9d69c7969410c10c2a53cd28cf6590225c865209
1 parent
96c2acf3
Exists in
master
and in
7 other branches
Correções em ferramentas para uso do OL3
Showing
9 changed files
with
38 additions
and
22 deletions
Show diff stats
classesjs/classe_analise.js
... | ... | @@ -501,7 +501,7 @@ i3GEO.analise = |
501 | 501 | * layer para receber os graficos |
502 | 502 | */ |
503 | 503 | inicia : function() { |
504 | - var linha, estilo = i3GEO.desenho.estilos[i3GEO.desenho.estiloPadrao], controle = | |
504 | + var linha, controle = | |
505 | 505 | i3geoOL.getControlsBy("id", "i3GeoMedeDistancia"); |
506 | 506 | i3GEO.desenho[i3GEO.Interface["ATUAL"]].inicia(); |
507 | 507 | i3GEO.analise.medeDistancia.pontos = { | ... | ... |
classesphp/classe_temas.php
... | ... | @@ -757,6 +757,7 @@ $wkt - boolean indicando se $xy e um WKT |
757 | 757 | case "ANNOTATION": |
758 | 758 | //$c->set("status",MS_DELETE); |
759 | 759 | $pinlayer->setmetadata("TEMA",$texto); |
760 | + $pinlayer->setmetadata("tiles","nao"); | |
760 | 761 | $pinlayer->set("type",MS_LAYER_ANNOTATION); |
761 | 762 | $pinlayer->set("opacity","100"); |
762 | 763 | break; | ... | ... |
classesphp/classe_toponimia.php
... | ... | @@ -196,6 +196,7 @@ Retorno: |
196 | 196 | $novolayer->set("status",MS_DEFAULT); |
197 | 197 | $novolayer->setmetadata("tema","texto de ".$nome); |
198 | 198 | $novolayer->setmetadata("tip",""); |
199 | + $novolayer->setmetadata("tiles","nao"); | |
199 | 200 | $novolayer->setmetadata("identifica","nao"); |
200 | 201 | $novolayer->set("labelitem",$item); |
201 | 202 | } | ... | ... |
classesphp/mapa_controle.php
... | ... | @@ -980,7 +980,10 @@ switch (strtoupper($funcao)) |
980 | 980 | if(!isset($wkt)){ |
981 | 981 | $wkt = false; |
982 | 982 | } |
983 | - $m->insereFeature($marca,$tipo,$xy,$texto,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte,$wrap,$wkt); | |
983 | + if(!isset($nomeTema)){ | |
984 | + $nomeTema = ""; | |
985 | + } | |
986 | + $m->insereFeature($marca,$tipo,$xy,$texto,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte,$wrap,$wkt,$nomeTema); | |
984 | 987 | $m->salva(); |
985 | 988 | $_SESSION["contadorsalva"]++; |
986 | 989 | redesenhaMapa(); | ... | ... |
ferramentas/inseretxt/index.js
... | ... | @@ -374,7 +374,7 @@ i3GEOF.inseretxt = { |
374 | 374 | par += "&cor=0 0 0"; |
375 | 375 | } |
376 | 376 | p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+ |
377 | - "&funcao=inserefeature&"+par+"&pin="+nometema+"&tipo=LINE&texto="+texto+" (conector)&xy="+xy; | |
377 | + "&funcao=inserefeature&"+par+"&pin="+nometema+"&tipo=LINE&nomeTema="+texto+" (conector)&xy="+xy; | |
378 | 378 | if(par === false){ |
379 | 379 | i3GEOF.inseretxt.aguarde.visibility = "hidden"; |
380 | 380 | return; | ... | ... |
ferramentas/mostraexten/index.js
... | ... | @@ -158,14 +158,18 @@ i3GEOF.mostraExten = { |
158 | 158 | */ |
159 | 159 | executa: function(){ |
160 | 160 | try{ |
161 | - var x = i3GEO.calculo.dms2dd($i("i3GEOmostraExtenxg").value,$i("i3GEOmostraExtenxm").value,$i("i3GEOmostraExtenxs").value); | |
162 | - var xx = i3GEO.calculo.dms2dd($i("i3GEOmostraExtenxxg").value,$i("i3GEOmostraExtenxxm").value,$i("i3GEOmostraExtenxxs").value); | |
163 | - var y = i3GEO.calculo.dms2dd($i("i3GEOmostraExtenyg").value,$i("i3GEOmostraExtenym").value,$i("i3GEOmostraExtenys").value); | |
164 | - var yy = i3GEO.calculo.dms2dd($i("i3GEOmostraExtenyyg").value,$i("i3GEOmostraExtenyym").value,$i("i3GEOmostraExtenyys").value); | |
165 | - if ((x == xx) || (y == yy)) | |
166 | - {i3GEO.janela.tempoMsg($trad('msgCoordValida',i3GEOF.mostraExten.dicionario));return;} | |
167 | - if ((x > xx) || (y > yy)) | |
168 | - {i3GEO.janela.tempoMsg($trad('msgCoordValida',i3GEOF.mostraExten.dicionario));return;} | |
161 | + var x = i3GEO.calculo.dms2dd($i("i3GEOmostraExtenxg").value,$i("i3GEOmostraExtenxm").value,$i("i3GEOmostraExtenxs").value), | |
162 | + xx = i3GEO.calculo.dms2dd($i("i3GEOmostraExtenxxg").value,$i("i3GEOmostraExtenxxm").value,$i("i3GEOmostraExtenxxs").value), | |
163 | + y = i3GEO.calculo.dms2dd($i("i3GEOmostraExtenyg").value,$i("i3GEOmostraExtenym").value,$i("i3GEOmostraExtenys").value), | |
164 | + yy = i3GEO.calculo.dms2dd($i("i3GEOmostraExtenyyg").value,$i("i3GEOmostraExtenyym").value,$i("i3GEOmostraExtenyys").value); | |
165 | + if ((x == xx) || (y == yy)){ | |
166 | + i3GEO.janela.tempoMsg($trad('msgCoordValida',i3GEOF.mostraExten.dicionario)); | |
167 | + return; | |
168 | + } | |
169 | + if ((x > xx) || (y > yy)){ | |
170 | + i3GEO.janela.tempoMsg($trad('msgCoordValida',i3GEOF.mostraExten.dicionario)); | |
171 | + return; | |
172 | + } | |
169 | 173 | i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,window.parent.i3GEO.parametros.tipoimagem,(x+" "+y+" "+xx+" "+yy)); |
170 | 174 | } |
171 | 175 | catch(e){i3GEO.janela.tempoMsg(e+" Erro.");} | ... | ... |
ferramentas/selecao/index.js
... | ... | @@ -483,9 +483,11 @@ i3GEOF.selecao = |
483 | 483 | i3GEO.Interface.atualizaTema(retorno, tema); |
484 | 484 | nsel = i3GEO.arvoreDeCamadas.pegaTema(tema, retorno.data.temas); |
485 | 485 | $i("i3GEOselecaoNsel").innerHTML = $trad('selecionados', i3GEOF.selecao.dicionario) + ": " + (nsel.nsel); |
486 | - i3GEO.eventos.adicionaEventos("SELECAO", [ | |
487 | - "i3GEOF.tabela.atualizaListaDeRegistros()" | |
488 | - ]); | |
486 | + if(i3GEOF.tabela){ | |
487 | + i3GEO.eventos.adicionaEventos("SELECAO", [ | |
488 | + "i3GEOF.tabela.atualizaListaDeRegistros()" | |
489 | + ]); | |
490 | + } | |
489 | 491 | i3GEO.eventos.executaEventos(i3GEO.eventos.SELECAO); |
490 | 492 | }, |
491 | 493 | /* |
... | ... | @@ -898,18 +900,18 @@ i3GEOF.selecao = |
898 | 900 | draw : "", |
899 | 901 | inicia : function() { |
900 | 902 | var features = i3GEO.desenho.layergrafico.getFeatures(); |
901 | - if(features.getLength() === 0){ | |
903 | + if(features.length === 0){ | |
902 | 904 | return; |
903 | 905 | } |
904 | 906 | i3GEO.eventos.cliquePerm.desativa(); |
905 | 907 | i3GEOF.selecao.figura.ol3.removeControle(); |
906 | 908 | i3GEOF.selecao.figura.ol3.draw = new ol.interaction.Select(); |
907 | 909 | i3GEOF.selecao.figura.ol3.draw.on("select",function(evt){ |
908 | - var wkt, geo, i, n, f, format = new ol.format.WKT(); | |
910 | + var wkt, i, n, f, format = new ol.format.WKT(); | |
909 | 911 | geo = i3GEOF.selecao.figura.ol3.draw.getFeatures(); |
910 | - n = geo.getLength(); | |
912 | + n = evt.selected.length; | |
911 | 913 | for(i=0; i<n; i++){ |
912 | - f = geo.item(i); | |
914 | + f =evt.selected[i]; | |
913 | 915 | f = i3GEO.util.projOSM2Geo(f); |
914 | 916 | wkt = format.writeFeature(f); |
915 | 917 | i3GEOF.selecao.figura.termina(i3GEO.temaAtivo, $i("i3GEOselecaotipoOperacao").value, wkt); | ... | ... |
ferramentas/toponimia/exec.php
... | ... | @@ -17,10 +17,12 @@ Cria um novo tema com a topon&iacute;mia do tema atual. |
17 | 17 | include_once(dirname(__FILE__)."/../../classesphp/classe_toponimia.php"); |
18 | 18 | copiaSeguranca($map_file); |
19 | 19 | $m = new Toponimia($map_file,$tema); |
20 | - if(!isset($tipo)) | |
21 | - {$tipo="";} | |
22 | - if(!isset($novotema)) | |
23 | - {$novotema = "sim";} | |
20 | + if(!isset($tipo)){ | |
21 | + $tipo=""; | |
22 | + } | |
23 | + if(!isset($novotema)){ | |
24 | + $novotema = "sim"; | |
25 | + } | |
24 | 26 | $retorno = $m->criaToponimia($item,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte,$tipo,$wrap,$novotema); |
25 | 27 | if(empty($maxscale)){ |
26 | 28 | $maxscale = -1; | ... | ... |
js/desenho.js
... | ... | @@ -428,6 +428,9 @@ i3GEO.desenho = |
428 | 428 | }) |
429 | 429 | }); |
430 | 430 | i3GEO.desenho.layergrafico.setMap(i3geoOL); |
431 | + i3GEO.desenho.layergrafico.getFeatures = function(){ | |
432 | + return i3GEO.desenho.layergrafico.getSource().getFeatures(); | |
433 | + }; | |
431 | 434 | } |
432 | 435 | return; |
433 | 436 | if (!i3GEO.desenho.layergrafico) { | ... | ... |