Commit ff1f90c012718a61d6a17a18687617cc00c1435e
1 parent
3ba5a76b
Exists in
master
and in
7 other branches
--no commit message
Showing
3 changed files
with
14 additions
and
6 deletions
Show diff stats
admin/admin.db
No preview for this file type
classesphp/lews/wms_functions.php
classesphp/wmswfs.php
| ... | ... | @@ -577,20 +577,24 @@ function pegaTag($layer) |
| 577 | 577 | $tnome = $noslayer->item($i)->tagName; |
| 578 | 578 | $tvalor = $noslayer->item($i)->nodeValue; |
| 579 | 579 | if($tnome){ |
| 580 | + //echo "<br>".$tnome; | |
| 580 | 581 | if ($tnome == "Title") |
| 581 | 582 | {$resultado["titulo"] = $tvalor;} |
| 582 | 583 | if ($tnome == "Name") |
| 583 | 584 | {$resultado["nome"] = $tvalor;} |
| 584 | 585 | if ($tnome == "Abstract") |
| 585 | 586 | {$resultado["resumo"] = $tvalor;} |
| 586 | - if ($tnome == "Style"){ | |
| 587 | + | |
| 588 | + if ($tnome == "StyleXXXX"){ | |
| 587 | 589 | $ss = $noslayer->item($i)->childNodes; |
| 588 | 590 | $ssl = $ss->length; |
| 591 | + $n = ""; | |
| 592 | + $t = ""; | |
| 589 | 593 | for ($s = 0; $s < $ssl; $s++) |
| 590 | 594 | { |
| 591 | 595 | $snome = $ss->item($s)->tagName; |
| 592 | 596 | $svalor = $ss->item($s)->nodeValue; |
| 593 | - if($snome) | |
| 597 | + if($snome && $svalor) | |
| 594 | 598 | { |
| 595 | 599 | if ($snome == "Title") |
| 596 | 600 | {$t=$svalor;} |
| ... | ... | @@ -598,9 +602,13 @@ function pegaTag($layer) |
| 598 | 602 | {$n=$svalor;} |
| 599 | 603 | } |
| 600 | 604 | } |
| 601 | - $resultado["estilos"][] = array("nome"=>$n,"titulo"=>$t); | |
| 605 | + //echo "<pre>";echo $n; | |
| 606 | + if($n != ""){ | |
| 607 | + array_push($resultado["estilos"],array("nome"=>$n,"titulo"=>$t)); | |
| 608 | + } | |
| 602 | 609 | } |
| 603 | - $resultado["tags"][] = $tnome; | |
| 610 | + array_push($resultado["tags"],$tnome); | |
| 611 | + //echo "<pre>";var_dump($resultado); | |
| 604 | 612 | } |
| 605 | 613 | } |
| 606 | 614 | return $resultado; |
| ... | ... | @@ -1063,4 +1071,4 @@ function wms_layer4html( $layer ) { |
| 1063 | 1071 | return $html; |
| 1064 | 1072 | } |
| 1065 | 1073 | |
| 1066 | -?> | |
| 1067 | 1074 | \ No newline at end of file |
| 1075 | +?> | ... | ... |