Commit e2ffa59e195c64d0038d1bd47eeedc85af887632
1 parent
c6b871ba
Exists in
master
and in
7 other branches
--no commit message
Showing
6 changed files
with
80 additions
and
49 deletions
Show diff stats
classesphp/classe_mapa.php
... | ... | @@ -1675,10 +1675,13 @@ $arq - Nome do shape file. |
1675 | 1675 | if (file_exists($arq)) |
1676 | 1676 | { |
1677 | 1677 | $s = ms_newShapefileObj($arq,-1); |
1678 | + /* | |
1678 | 1679 | if($this->v == 6) |
1679 | 1680 | {$shape = $s->getshape(new resultObj(0));} |
1680 | 1681 | else |
1681 | 1682 | {$shape = $s->getshape(0);} |
1683 | + */ | |
1684 | + $shape = $s->getshape(0); | |
1682 | 1685 | $t = $shape->type; |
1683 | 1686 | $tipo = MS_LAYER_POLYGON; |
1684 | 1687 | if ($t == 0) | ... | ... |
classesphp/classe_temas.php
... | ... | @@ -731,10 +731,12 @@ $wrap - caractere que indica quebra de linha |
731 | 731 | } |
732 | 732 | $label->set("angle",$angulo); |
733 | 733 | corE($label,$fundo,"backgroundcolor"); |
734 | - corE($label,$sombra,"backgroundshadowcolor"); | |
734 | + corE($label,$sombra,"backgroundshadowcolor",$sombrax,$sombray); | |
735 | + | |
736 | + //$label->set("backgroundshadowsizex",$sombrax); | |
737 | + //$label->set("backgroundshadowsizey",$sombray); | |
738 | + | |
735 | 739 | corE($label,$cor,"color"); |
736 | - $label->set("backgroundshadowsizex",$sombrax); | |
737 | - $label->set("backgroundshadowsizey",$sombray); | |
738 | 740 | corE($label,$outlinecolor,"outlinecolor"); |
739 | 741 | corE($label,$shadowcolor,"shadowcolor"); |
740 | 742 | $label->set("shadowsizex",$shadowsizex); |
... | ... | @@ -777,7 +779,7 @@ $wrap - caractere que indica quebra de linha |
777 | 779 | {$lin->addxy($apt[$i],$apt[$i + 1]);} |
778 | 780 | $shp->add($lin); |
779 | 781 | $pinlayer->addfeature($shp); |
780 | - $shp->free(); | |
782 | + //$shp->free(); | |
781 | 783 | return("ok"); |
782 | 784 | } |
783 | 785 | /* | ... | ... |
classesphp/classe_toponimia.php
... | ... | @@ -82,6 +82,8 @@ $tema - nome do tema que será processado |
82 | 82 | include_once($locaplic."/funcoes_gerais.php"); |
83 | 83 | else |
84 | 84 | include_once("funcoes_gerais.php"); |
85 | + $this->v = versao(); | |
86 | + $this->v = $this->v["principal"]; | |
85 | 87 | $this->mapa = ms_newMapObj($map_file); |
86 | 88 | $this->arquivo = $map_file; |
87 | 89 | if($tema != "" && @$this->mapa->getlayerbyname($tema)) |
... | ... | @@ -155,6 +157,7 @@ Retorno: |
155 | 157 | */ |
156 | 158 | function criaToponimia($item,$position,$partials,$offsetx,$offsety,$minfeaturesize,$mindistance,$force,$shadowcolor,$shadowsizex,$shadowsizey,$outlinecolor,$cor,$sombray,$sombrax,$sombra,$fundo,$angulo,$tamanho,$fonte,$tipo,$wrap) |
157 | 159 | { |
160 | + error_reporting(E_ALL); | |
158 | 161 | if(!$this->layer){return "erro";} |
159 | 162 | if (!isset($tipo)){$tipo = "";} |
160 | 163 | if ($item != "") //o layer nao tem tabela mas tem toponimia |
... | ... | @@ -210,19 +213,20 @@ Retorno: |
210 | 213 | if ($tamanho >= 14 ){$t = MS_GIANT;} |
211 | 214 | $label->set("size",$t); |
212 | 215 | } |
213 | - $label->set("angle",$angulo); | |
214 | - if ($angulo == "AUTO") | |
215 | - {$label->set("autoangle",MS_TRUE);} | |
216 | + if($angulo > 0){ | |
217 | + $label->set("angle",$angulo); | |
218 | + } | |
219 | + if($angulo == "AUTO") | |
220 | + {$label->updatefromstring("LABEL ANGLE AUTO END");} | |
216 | 221 | if (strtoupper($angulo) == "CURVO" || strtoupper($angulo) == "FOLLOW") |
217 | 222 | { |
218 | - //$label->set("angle","FOLLOW"); | |
219 | - $label->set("autofollow",1); | |
223 | + $label->updatefromstring("LABEL ANGLE FOLLOW END"); | |
220 | 224 | } |
225 | + corE($label,$cor,"color"); | |
221 | 226 | corE($label,$fundo,"backgroundcolor"); |
222 | - corE($label,$sombra,"backgroundshadowcolor"); | |
223 | - corE($label,$cor,"color"); | |
224 | - $label->set("backgroundshadowsizex",$sombrax); | |
225 | - $label->set("backgroundshadowsizey",$sombray); | |
227 | + corE($label,$sombra,"backgroundshadowcolor",$sombrax,$sombray); | |
228 | + //$label->set("backgroundshadowsizex",$sombrax); | |
229 | + //$label->set("backgroundshadowsizey",$sombray); | |
226 | 230 | corE($label,$outlinecolor,"outlinecolor"); |
227 | 231 | corE($label,$shadowcolor,"shadowcolor"); |
228 | 232 | $label->set("shadowsizex",$shadowsizex); | ... | ... |
classesphp/funcoes_gerais.php
... | ... | @@ -267,20 +267,33 @@ $label {objeto} - Objeto do tipo label. |
267 | 267 | $cor {string} - RGB separado por espacos, se for um array, aplica diretamente ao objeto cor. |
268 | 268 | |
269 | 269 | $elemento {string} - Nome do elemento que receberá a cor. |
270 | + | |
271 | +$sombrax { n pixels) - utilizado apena quando se define a cor da sombra de labels | |
272 | + | |
273 | +$sombray { n pixels) - utilizado apena quando se define a cor da sombra de labels | |
270 | 274 | */ |
271 | -function corE($label,$cor,$elemento) | |
275 | +function corE($label,$cor,$elemento,$sombrax=1,$sombray=1) | |
272 | 276 | { |
277 | + $versao = versao(); | |
278 | + $versao = $versao["principal"]; | |
273 | 279 | if (is_string($cor)) |
274 | 280 | { |
281 | + $cor = str_replace(","," ",$cor); | |
275 | 282 | if (count(explode(" ",$cor)) == 3) |
276 | 283 | { |
277 | - $corres = $label->$elemento; | |
278 | - $cori = explode(" ",$cor); | |
279 | - $corres->setRGB($cori[0],$cori[1],$cori[2]); | |
280 | - } | |
281 | - if (count(explode(",",$cor)) == 3) | |
282 | - { | |
283 | - $corres = $label->$elemento; | |
284 | + if($versao > 5 && in_array(strtolower($elemento),array("backgroundcolor","backgroundshadowcolor"))){ | |
285 | + //na 601 não funciona | |
286 | + return; | |
287 | + $e = new styleObj($label); | |
288 | + $e->setGeomTransform("labelpoly"); | |
289 | + $corres = $e->color; | |
290 | + if(strtolower($elemento) == "backgroundshadowcolor"){ | |
291 | + $e->set("offsetx",$sombrax); | |
292 | + $e->set("offsety",$sombray); | |
293 | + } | |
294 | + } | |
295 | + else | |
296 | + {$corres = $label->$elemento;} | |
284 | 297 | $cori = explode(",",$cor); |
285 | 298 | $corres->setRGB($cori[0],$cori[1],$cori[2]); |
286 | 299 | } | ... | ... |
documentacao/manual_de_usuario_do_i3geo.odt
No preview for this file type
ferramentas/inseretxt/index.js.php
... | ... | @@ -226,11 +226,11 @@ i3GEOF.inseretxt = { |
226 | 226 | $inputText("","","i3GEOinseretxtsombray_i","",1,"1") + |
227 | 227 | ' </td></tr>' + |
228 | 228 | ' <tr><td> </td><td></td></tr>' + |
229 | - ' <tr><td>Cor da sombra:</td><td>' + | |
229 | + ' <tr><td>Cor do texto de fundo (duplicado)):</td><td>' + | |
230 | 230 | $inputText("","","i3GEOinseretxtfrentes_i","",9,"") + |
231 | 231 | ' <img alt="aquarela.gif" style=cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEOF.inseretxt.corj(\'i3GEOinseretxtfrentes_i\')" /></td></tr>' + |
232 | 232 | ' <tr><td> </td><td></td></tr>' + |
233 | - ' <tr><td>Deslocamento da sombra:</td><td>x '+ | |
233 | + ' <tr><td>Deslocamento do texto de fundo (duplicado):</td><td>x '+ | |
234 | 234 | $inputText("","","i3GEOinseretxtfrentex_i","",1,"1") + |
235 | 235 | ' y '+ |
236 | 236 | $inputText("","","i3GEOinseretxtfrentey_i","",1,"1") + |
... | ... | @@ -390,30 +390,7 @@ i3GEOF.inseretxt = { |
390 | 390 | //de onde vem o texto |
391 | 391 | // |
392 | 392 | if($i("i3GEOinseretxtguia1obj").style.display === "block"){ |
393 | - texto = $i("i3GEOinseretxttexto").value; | |
394 | - if(texto === ""){ | |
395 | - i3GEOF.inseretxt.aguarde.visibility = "hidden"; | |
396 | - return; | |
397 | - } | |
398 | - else{ | |
399 | - if($i("i3GEOinseretxttextoconector").checked){ | |
400 | - if(i3GEOF.inseretxt.contaPontos == 0){ | |
401 | - i3GEOF.inseretxt.contaPontos = 1; | |
402 | - i3GEOF.inseretxt.pontoi = objposicaocursor.ddx+" "+objposicaocursor.ddy; | |
403 | - i3GEOF.inseretxt.aguarde.visibility = "hidden"; | |
404 | - alert("Clique no fim do conector"); | |
405 | - return; | |
406 | - } | |
407 | - if(i3GEOF.inseretxt.contaPontos == 1){ | |
408 | - i3GEOF.inseretxt.insere(texto); | |
409 | - i3GEOF.inseretxt.insereConector(i3GEOF.inseretxt.pontoi+" "+objposicaocursor.ddx+" "+objposicaocursor.ddy,texto); | |
410 | - i3GEOF.inseretxt.contaPontos = 0; | |
411 | - return; | |
412 | - } | |
413 | - } | |
414 | - else | |
415 | - {i3GEOF.inseretxt.insere(texto);} | |
416 | - } | |
393 | + i3GEOF.inseretxt.iniciaInsere(); | |
417 | 394 | } |
418 | 395 | else{ |
419 | 396 | temp = function(retorno){ |
... | ... | @@ -422,14 +399,46 @@ i3GEOF.inseretxt = { |
422 | 399 | i3GEOF.inseretxt.aguarde.visibility = "hidden"; |
423 | 400 | return; |
424 | 401 | } |
425 | - i3GEOF.inseretxt.insere(retorno.data); | |
402 | + $i("i3GEOinseretxttexto").value = retorno.data; | |
403 | + i3GEOF.inseretxt.iniciaInsere(); | |
426 | 404 | }; |
427 | 405 | tema = $i("i3GEOinseretxtComboTemas").value; |
428 | 406 | item = $i("i3GEOinseretxtComboItens").value; |
429 | - i3GEO.php.identificaunico(temp,objposicaocursor.ddx+","+objposicaocursor.ddy,tema,item); | |
407 | + if(i3GEOF.inseretxt.contaPontos == 0) | |
408 | + {i3GEO.php.identificaunico(temp,objposicaocursor.ddx+","+objposicaocursor.ddy,tema,item);} | |
409 | + else{ | |
410 | + i3GEOF.inseretxt.iniciaInsere(); | |
411 | + } | |
412 | + | |
430 | 413 | } |
431 | 414 | }catch(e){alert("Erro: "+e);i3GEOF.inseretxt.aguarde.visibility = "hidden";} |
432 | 415 | }, |
416 | + iniciaInsere: function(){ | |
417 | + var texto = $i("i3GEOinseretxttexto").value; | |
418 | + if(texto === ""){ | |
419 | + i3GEOF.inseretxt.aguarde.visibility = "hidden"; | |
420 | + return; | |
421 | + } | |
422 | + else{ | |
423 | + if($i("i3GEOinseretxttextoconector").checked){ | |
424 | + if(i3GEOF.inseretxt.contaPontos == 0){ | |
425 | + i3GEOF.inseretxt.contaPontos = 1; | |
426 | + i3GEOF.inseretxt.pontoi = objposicaocursor.ddx+" "+objposicaocursor.ddy; | |
427 | + i3GEOF.inseretxt.aguarde.visibility = "hidden"; | |
428 | + alert("Clique no fim do conector"); | |
429 | + return; | |
430 | + } | |
431 | + if(i3GEOF.inseretxt.contaPontos == 1){ | |
432 | + i3GEOF.inseretxt.insere(texto); | |
433 | + i3GEOF.inseretxt.insereConector(i3GEOF.inseretxt.pontoi+" "+objposicaocursor.ddx+" "+objposicaocursor.ddy,texto); | |
434 | + i3GEOF.inseretxt.contaPontos = 0; | |
435 | + return; | |
436 | + } | |
437 | + } | |
438 | + else | |
439 | + {i3GEOF.inseretxt.insere(texto);} | |
440 | + } | |
441 | + }, | |
433 | 442 | /* |
434 | 443 | Function: insere |
435 | 444 | ... | ... |