Commit 25de42cca178c7b7e9d6e9ad569d7d38aef55443

Authored by Edmar Moretti
1 parent f114153c

--no commit message

admin/admin.db
No preview for this file type
admin/js/arvore.js
... ... @@ -544,7 +544,7 @@ function novoSubGrupo(id_menu,id_n1)
544 544 var d = {idmenu:id_menu,html:conteudo,id_n2:dados.id_n2,tipo:"subgrupo"}
545 545 var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true);
546 546 tempNode.isLeaf = false;
547   - tempNode.setDynamicLoad(loadSubgruposData, temaIconMode, id_menu);
  547 + tempNode.setDynamicLoad(loadTemasData, temaIconMode, id_menu);
548 548 tree.draw();
549 549 core_carregando("desativa");
550 550 editar("subgrupo",dados.id_n2);
... ...
admin/js/editormapfile.js
... ... @@ -673,8 +673,10 @@ function classesAuto(codigoMap,codigoLayer)
673 673 {
674 674 var dados = YAHOO.lang.JSON.parse(o.responseText)
675 675 var nos = tree.getNodesByProperty("classes",codigoMap+"_"+codigoLayer)
676   - for (var i=0, j=nos.length; i<j; i++)
677   - {tree.removeNode(nos[i],false)}
  676 + if(nos){
  677 + for (var i=0, j=nos.length; i<j; i++)
  678 + {tree.removeNode(nos[i],false)}
  679 + }
678 680 var no = tree.getNodeByProperty("etiquetaClasses",codigoMap+"_"+codigoLayer)
679 681 montaParametrosTemas(no,dados)
680 682 core_carregando("desativa");
... ... @@ -1630,7 +1632,11 @@ function montaEditorEstilo(dados)
1630 1632 {
1631 1633 try
1632 1634 {
1633   - $i("listaSimbolos").innerHTML = o.responseText;
  1635 + var re = new RegExp("ms_tmp", "g");
  1636 + var t = o.responseText.replace(re,"../../../ms_tmp/");
  1637 + var re = new RegExp("\\\\", "g");
  1638 + var t = t.replace(re,"");
  1639 + $i("listaSimbolos").innerHTML = t;
1634 1640 }
1635 1641 catch(e){}
1636 1642 },
... ...
admin/js/listatemas.js
... ... @@ -63,7 +63,7 @@ function montaDivTemas(i)
63 63 {
64 64 var param = {
65 65 "linhas":[
66   - {titulo:"Nome que será mostrado na árvore de menus (português):",id:"nome_tema",size:"50",value:i.nome_tema,tipo:"text",div:""},
  66 + {titulo:"Nome que será mostrado na árvore de menus (português) - altera também o metadata TEMA, existente no mapfile, usado como título na árvore de camadas:",id:"nome_tema",size:"50",value:i.nome_tema,tipo:"text",div:""},
67 67 {titulo:"Inglês:",id:"en",size:"50",value:i.en,tipo:"text",div:""},
68 68 {titulo:"Espanhol:",id:"es",size:"50",value:i.es,tipo:"text",div:""},
69 69 {titulo:"Italiano:",id:"it",size:"50",value:i.it,tipo:"text",div:""}
... ...
admin/php/editormapfile.php
... ... @@ -95,8 +95,13 @@ switch (strtoupper($funcao))
95 95 include_once("$locaplic/classesphp/classe_legenda.php");
96 96 if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN'))
97 97 {$map_file = $locaplic."/aplicmap/geral1windows.map";}
98   - else
99   - {$map_file = $locaplic."/aplicmap/geral1.map";}
  98 + else{
  99 + if(file_exists('/var/www/i3geo/aplicmap/geral1debian.map')){
  100 + $map_file = ms_newMapObj("aplicmap/geral1debian.map");
  101 + }
  102 + else
  103 + {$map_file = ms_newMapObj("aplicmap/geral1.map");}
  104 + }
100 105 $m = new Legenda($map_file,$locaplic);
101 106 retornaJSON($m->listaSimbolos($tipo,$dir_tmp,"",$onclick));
102 107 exit;
... ...
admin/php/editortexto.php
... ... @@ -13,6 +13,7 @@
13 13 </head>
14 14 <body>
15 15 <a href="http://mapserver.org/mapfile/index.html#mapfile" target="_new" >Documentação do Mapserver</a><br><br>
  16 +<a href="../html/editormapfile.html" target="_new" >Voltar</a><br><br>
16 17 <form action="editortexto.php?mapfile=<?php echo $_GET["mapfile"];?>" method=post >
17 18  
18 19 <input type=submit value="Salvar"/><input type=button value="Testar" onclick="testar()" /> (Salve antes de testar)<br><br>
... ...
admin/php/menutemas.php
... ... @@ -1003,7 +1003,7 @@ Altera o registro de um tema. Se id for vazio acrescenta o registro
1003 1003 */
1004 1004 function alteraTemas()
1005 1005 {
1006   - global $nome,$desc,$id,$codigo,$tipoa,$download,$ogc,$kml,$link,$tags,$kmz,$locaplic;
  1006 + global $nome,$desc,$id,$codigo,$tipoa,$download,$ogc,$kml,$link,$tags,$kmz,$locaplic,$es,$it,$en;
1007 1007 //error_reporting(E_ALL);
1008 1008 try
1009 1009 {
... ... @@ -1018,9 +1018,9 @@ function alteraTemas()
1018 1018 if($id != "")
1019 1019 {
1020 1020 if(!isset($kmz))
1021   - $dbhw->query("UPDATE i3geoadmin_temas SET tags_tema='$tags', link_tema='$link', nome_tema ='$nome',desc_tema='$desc',codigo_tema='$codigo',tipoa_tema='$tipoa',download_tema='$download',ogc_tema='$ogc',kml_tema='$kml' WHERE id_tema = $id");
  1021 + $dbhw->query("UPDATE i3geoadmin_temas SET es='$es', it='$it', en='$en', tags_tema='$tags', link_tema='$link', nome_tema ='$nome',desc_tema='$desc',codigo_tema='$codigo',tipoa_tema='$tipoa',download_tema='$download',ogc_tema='$ogc',kml_tema='$kml' WHERE id_tema = $id");
1022 1022 else
1023   - $dbhw->query("UPDATE i3geoadmin_temas SET tags_tema='$tags', link_tema='$link', nome_tema ='$nome',desc_tema='$desc',codigo_tema='$codigo',tipoa_tema='$tipoa',download_tema='$download',ogc_tema='$ogc',kml_tema='$kml',kmz_tema='$kmz' WHERE id_tema = $id");
  1023 + $dbhw->query("UPDATE i3geoadmin_temas SET es='$es', it='$it', en='$en',tags_tema='$tags', link_tema='$link', nome_tema ='$nome',desc_tema='$desc',codigo_tema='$codigo',tipoa_tema='$tipoa',download_tema='$download',ogc_tema='$ogc',kml_tema='$kml',kmz_tema='$kmz' WHERE id_tema = $id");
1024 1024 $retorna = $id;
1025 1025 if(!isset($kmz)){$kmz = "nao";}
1026 1026 $sql = "SELECT * from i3geoadmin_temas where id_tema = '$id'";
... ... @@ -1033,13 +1033,15 @@ function alteraTemas()
1033 1033 {
1034 1034 $mapa = ms_newMapObj($mapfile);
1035 1035 $nomes = $mapa->getalllayernames();
1036   - foreach($nomes as $nome)
  1036 + foreach($nomes as $n)
1037 1037 {
1038   - $layer = $mapa->getlayerbyname($nome);
  1038 + $layer = $mapa->getlayerbyname($n);
1039 1039 $layer->setmetadata("permitedownload",strtolower($download));
1040 1040 $layer->setmetadata("permiteogc",strtolower($ogc));
1041 1041 $layer->setmetadata("permitekml",strtolower($kml));
1042 1042 $layer->setmetadata("permitekmz",strtolower($kmz));
  1043 + if(count($nomes) == 1)
  1044 + {$layer->setmetadata("tema",$nome);}
1043 1045 }
1044 1046 $mapa->save($mapfile);
1045 1047 removeCabecalho($mapfile);
... ...
classesphp/classe_alteraclasse.php
... ... @@ -396,14 +396,10 @@ $itemNome - item que será usado para definir os nomes das classes (por default s
396 396 $nomes = array();
397 397 foreach($temp as $t)
398 398 {$nomes[] = $t;}
399   - //$valoresu = array_unique($v);
400   - // processa array com os valores
401   - //rsort($valoresu);
402   - //reset($valoresu);
403 399 $nclassexist = $this->layer->numclasses;
404 400 if ($nclassexist > count($valores))
405 401 {$nclassexist = count($valores);}
406   - if($nclassexist == 0)
  402 + if($this->layer->numclasses == 0)
407 403 {
408 404 $temp = ms_newClassObj($this->layer);
409 405 ms_newStyleObj($temp);
... ...
classesphp/classe_temas.php
... ... @@ -892,7 +892,7 @@ lista - lista de item e cores de cada parte do grafico
892 892 $novolayer = ms_newLayerObj($this->mapa, $this->layer);
893 893 $nomer = nomeRandomico();
894 894 $novolayer->set("name",$nomer);
895   - $novolayer->set("group",$nomer);
  895 + //$novolayer->set("group",$nomer);
896 896 $novolayer->set("type",MS_LAYER_CHART);
897 897 $novolayer->setprocessing("CHART_TYPE=$tipo");
898 898 $novolayer->setprocessing("CHART_SIZE=$tamanho");
... ...
ferramentas/salvamapfile/index.js.php
... ... @@ -72,11 +72,11 @@ i3GEOF.salvamapfile = {
72 72 var nome = retorno.data.nomeoriginal;
73 73 if(nome == "")
74 74 {
75   - $i(iddiv).innerHTML = "<p class=paragrafo >Não existe um arquivo mapfile em i3geo/temas já criado para essa camada. Utilize o sistema de admnistração para <a href='"+i3GEO.configura.locaplic+"/admin/html/editormapfile.html' target=_blank >criar um</a>"
  75 + $i(iddiv).innerHTML = "<p class=paragrafo >Não existe um arquivo mapfile em i3geo/temas já criado para essa camada. Utilize o sistema de administração para <a href='"+i3GEO.configura.locaplic+"/admin/html/editormapfile.html' target=_blank >criar um</a>"
76 76 }
77 77 else
78 78 {
79   - var ins = "<p class=paragrafo >O tema ativo possui um mapfile já criado. Ao salvar, as definições originais de legenda, filtros e outras, serão substituídas pelas atuais</p>" +
  79 + var ins = "<p class=paragrafo >O tema ("+nome+") ativo possui um mapfile já criado. Ao salvar, as definições originais de legenda, filtros e outras, serão substituídas pelas atuais</p>" +
80 80 '<br><br><p class=paragrafo ><input size=20 id=i3GEOsalvamapfilebotao1 type=button value="Salvar" />&nbsp;&nbsp;<input size=20 id=i3GEOsalvamapfilebotao2 type=button value="Testar" />';
81 81 $i(iddiv).innerHTML = ins;
82 82 new YAHOO.widget.Button(
... ...
temas/acidmap.map
... ... @@ -10,14 +10,18 @@ MAP
10 10 "wms_exceptions_format" "application/vnd.ogc.se_xml"
11 11 "CLASSE" "SIM"
12 12 "wfs" "nao"
  13 + "permitekmz" "nao"
13 14 "wms_force_separate_request" "1"
14 15 "TEXTO" "NAO"
15 16 "formatosinfo" "text/plain,application/vnd.ogc.gml,text/html"
16 17 "wms_name" "i3geo:locali"
17 18 "nomeoriginal" "i3geo:locali"
  19 + "permitedownload" "sim"
18 20 "wms_format" "image/png"
19 21 "wms_formatlist" "image/png,application/atom xml,application/atom xml,application/openlayers,application/pdf,application/rss xml,application/rss xml,application/vnd.google-earth.kml,application/vnd.google-earth.kml xml,application/vnd.google-earth.kml xml,application/vnd.google-earth.kmz,application/vnd.google-earth.kmz xml,application/vnd.google-earth.kmz xml,atom,image/geotiff,image/geotiff8,image/gif,image/jpeg,image/png8,image/svg,image/svg xml,image/svg xml,image/tiff,image/tiff8,kml,kmz,openlayers,rss"
20   - "tema" "i3geo:locali"
  22 + "permiteogc" "sim"
  23 + "permitekml" "sim"
  24 + "tema" "Acid Mapsx"
21 25 "wms_server_version" "1.1.1"
22 26 "wms_style" ""
23 27 END
... ...
temas/atlas_biomas.map
... ... @@ -9,13 +9,17 @@ MAP
9 9 "wms_srs" "EPSG:4291 EPSG:4326"
10 10 "wms_exceptions_format" "application/vnd.ogc.se_xml"
11 11 "CLASSE" "SIM"
  12 + "permitekmz" ""
12 13 "wms_force_separate_request" "1"
13   - "wms_name" "bioma"
14 14 "formatosinfo" "text/plain,application/vnd.ogc.gml"
15   - "wms_formatlist" "image/gif,image/png,image/png; mode=24bit,image/jpeg,image/wbmp,image/tiff"
  15 + "wms_name" "bioma"
  16 + "permitedownload" "sim"
16 17 "wms_format" "image/png"
  18 + "wms_formatlist" "image/gif,image/png,image/png; mode=24bit,image/jpeg,image/wbmp,image/tiff"
17 19 "wms_connectiontimeout" "30"
18   - "TEMA" "Biomas segundo IBGE-MMA"
  20 + "permitekml" "sim"
  21 + "permiteogc" "sim"
  22 + "TEMA" "atlas_biomas"
19 23 "wms_server_version" "1.1.0"
20 24 "wms_style" "default"
21 25 END
... ...
temas/biomashp.map
1   -MAP
2   - FONTSET "c:\ms4w\apache\htdocs\i3geo/symbols/fontes.txt"
3   - SYMBOLSET "c:\ms4w\apache\htdocs\i3geo/symbols/simbolos.sym"
  1 +MAP
  2 + FONTSET "c:\ms4w\apache\htdocs\i3geo/symbols/fontes.txt"
  3 + SYMBOLSET "c:\ms4w\apache\htdocs\i3geo/symbols/simbolos.sym"
4 4 LAYER
5   -
6   - CONNECTION ""
  5 + CONNECTION ""
7 6 DATA "c:\ms4w\apache\htdocs\i3geo\aplicmap\dados\biomas.shp"
8 7 GROUP "Grupo 1"
9 8 METADATA
10   - "ltempoitemimagem" ""
11 9 "cache" ""
12   - "CLASSE" "SIM"
  10 + "ltempoitemimagem" ""
13 11 "ltempoitemdescricao" ""
14   - "palletestep" ""
  12 + "CLASSE" "SIM"
15 13 "ltempoiteminicio" ""
16   - "permitekmz" "sim"
  14 + "palletestep" ""
17 15 "ltempoitemtip" ""
18   - "iconetema" "http://www.gpsdrive.de/development/map-icons/square.small/leisure/park.png"
19   - "description_template" ""
  16 + "permitekmz" "sim"
20 17 "ltempoitemtitulo" ""
  18 + "description_template" ""
  19 + "iconetema" "http://www.gpsdrive.de/development/map-icons/square.small/leisure/park.png"
21 20 "ltempoitemlink" ""
  21 + "extensao" "-44 -23 -39 -21"
22 22 "palletefile" ""
23   - "permitedownload" "sim"
24 23 "ltempoformatodata" ""
  24 + "permitedownload" "sim"
25 25 "ltempoitemicone" ""
26 26 "download" "SIM"
27   - "permitekml" "sim"
28 27 "permiteogc" ""
29   - "TEMA" "Biomas shapefile x"
30   - "identifica" "NAO"
  28 + "permitekml" "sim"
  29 + "TEMA" "biomashp"
  30 + "aplicaextensao" "SIM"
31 31 "editorsql" ""
  32 + "identifica" "NAO"
32 33 "ltempoitemfim" ""
33   - "extensao" "-44 -23 -39 -21"
34   - "aplicaextensao" "SIM"
35 34 END
36 35 NAME "biomashp"
37 36 STATUS OFF
... ... @@ -41,62 +40,62 @@ MAP
41 40 UNITS METERS
42 41 CLASS
43 42 NAME "CAATINGA"
44   - EXPRESSION ('[ID]'eq'2.00')
  43 + EXPRESSION ('[CD_LEGENDA]'eq'CAATINGA')
45 44 STYLE
46 45 ANGLE 360
47   - COLOR 138 134 150
48   - OPACITY 100
  46 + COLOR 21 44 114
49 47 SYMBOL 0
  48 + WIDTH 1
50 49 END
51 50 END
52 51 CLASS
53 52 NAME "PAMPA"
54   - EXPRESSION ('[ID]'eq'5.00')
  53 + EXPRESSION ('[CD_LEGENDA]'eq'PAMPA')
55 54 STYLE
56 55 ANGLE 360
57   - COLOR 105 219 217
58   - OPACITY 100
  56 + COLOR 225 189 199
59 57 SYMBOL 0
  58 + WIDTH 1
60 59 END
61 60 END
62 61 CLASS
63 62 NAME "CERRADO"
64   - EXPRESSION ('[ID]'eq'3.00')
  63 + EXPRESSION ('[CD_LEGENDA]'eq'CERRADO')
65 64 STYLE
66 65 ANGLE 360
67   - COLOR 186 52 176
68   - OPACITY 100
  66 + COLOR 17 235 39
69 67 SYMBOL 0
  68 + WIDTH 1
70 69 END
71 70 END
72 71 CLASS
73 72 NAME "PANTANAL"
74   - EXPRESSION ('[ID]'eq'6.00')
  73 + EXPRESSION ('[CD_LEGENDA]'eq'PANTANAL')
75 74 STYLE
76 75 ANGLE 360
77   - COLOR 125 128 2
78   - OPACITY 100
  76 + COLOR 242 192 145
79 77 SYMBOL 0
  78 + WIDTH 1
80 79 END
81 80 END
82 81 CLASS
83   - NAME "AMAZÔNIA"
84   - EXPRESSION ('[ID]'eq'1.00')
  82 + NAME "AMAZONIA"
  83 + EXPRESSION ('[CD_LEGENDA]'eq'AMAZONIA')
85 84 STYLE
86 85 ANGLE 360
87   - COLOR 129 234 3
88   - OPACITY 100
  86 + COLOR 149 120 37
89 87 SYMBOL 0
  88 + WIDTH 1
90 89 END
91 90 END
92 91 CLASS
93   - NAME "MATA ATLÂNTICA"
94   - EXPRESSION ('[ID]'eq'4.00')
  92 + NAME "MATA ATLANTICA"
  93 + EXPRESSION ('[CD_LEGENDA]'eq'MATA ATLANTICA')
95 94 STYLE
96 95 ANGLE 360
97   - COLOR 159 226 219
98   - OPACITY 100
  96 + COLOR 208 160 125
99 97 SYMBOL 0
  98 + WIDTH 1
100 99 END
101 100 END
102 101 END
... ...