Commit 37e256cd6aafa1cd03e042a2a5609eaf4a3f4e7b

Authored by Edmar Moretti
1 parent 7330370b

#232 resolvido

admin/js/editormapfile.js
... ... @@ -941,6 +941,8 @@ function montaEditorClasseGeral(dados)
941 941 "linhas":[
942 942 {ajuda:"Nome da classe para ser mostrada na legenda",
943 943 titulo:"Name",id:"name",value:dados.name,tipo:"text"},
  944 + {ajuda:"Descrição da classe (mostrada na legenda quando o mouse é sobreposto",
  945 + titulo:"Title",id:"title",value:dados.title,tipo:"text"},
944 946 {ajuda:"Sets the current display status of the class. Default turns the class on",
945 947 titulo:"Status",id:"",value:dados.status,tipo:"text",div:"<div id=cStatus ></div>"},
946 948 {ajuda:"Four types of expressions are now supported to define class membership. String comparisons, regular expressions, simple logical expressions, and string functions. If no expression is given, then all features are said to belong to this class.<br>String comparisons are case sensitive and are the fastest to evaluate. No special delimiters are necessary although string must be quoted if they contain special characters. (As a matter of good habit, it is recommended you quote all strings).<br>Regular expressions function just like previous versions of MapServer. However, you must now delimit a regular expression using /regex/. No quotes should be used.<br><br>Logical expressions allow you to build fairly complex tests based on one or more attributes and therefore are only available with shapefiles. Logical expressions are delimited by parentheses '(expression)'. Attribute names are delimited by square brackets '[ATTRIBUTE]'. These names are case sensitive and must match the items in the shapefile. For example: EXPRESSION ([POPULATION] > 50000 AND '[LANGUAGE]' eq 'FRENCH') ... The following logical operators are supported: =,>,<,<=,>=,=,or,and,lt,gt,ge,le,eq,ne. As you might expect this level of complexity is slower to process.<br>One string function exists: length(). This obviously computes the length of a string. An example follows:<br>EXPRESSION (length('[NAME_E]') < 8)<br>String comparisons and regular expressions work from the classitem defined at the layer level. You may mix expression types within the different classes of a layer",
... ... @@ -1158,7 +1160,7 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo,
1158 1160 }
1159 1161 if(tipo == "classeGeral")
1160 1162 {
1161   - var campos = new Array("status","minscale","maxscale","name","keyimage")
  1163 + var campos = new Array("status","minscale","maxscale","name","title","keyimage")
1162 1164 var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&indiceClasse="+indiceClasse
1163 1165 var temp = $i("expression").value;
1164 1166 var re = /]/g;
... ...
admin/php/editormapfile.php
... ... @@ -675,6 +675,7 @@ function pegaClasseGeral()
675 675 $layer = $mapa->getlayerbyname($codigoLayer);
676 676 $classe = $layer->getclass($indiceClasse);
677 677 $dados["name"] = $classe->name;
  678 + $dados["title"] = $classe->title;
678 679 $temp = $classe->getExpression();
679 680 $temp = str_replace("[","_C",$temp);
680 681 $temp = str_replace("]","C_",$temp);
... ... @@ -694,13 +695,14 @@ function pegaClasseGeral()
694 695 }
695 696 function alterarClasseGeral()
696 697 {
697   - global $codigoMap,$codigoLayer,$indiceClasse,$locaplic,$status,$minscale,$maxscale,$name,$expression,$keyimage;
  698 + global $codigoMap,$codigoLayer,$indiceClasse,$locaplic,$status,$minscale,$maxscale,$name,$expression,$keyimage,$title;
698 699 $dados = array();
699 700 $mapfile = $locaplic."/temas/".$codigoMap.".map";
700 701 $mapa = ms_newMapObj($mapfile);
701 702 $layer = $mapa->getlayerbyname($codigoLayer);
702 703 $classe = $layer->getclass($indiceClasse);
703 704 $classe->set("name",$name);
  705 + $classe->set("title",$title);
704 706 $temp = str_replace("_C","[",$expression);
705 707 $temp = str_replace("C_","]",$temp);
706 708 $temp = str_replace("_A_","'",$temp);
... ...
aplicmap/legenda2.htm
1   -[leg_layer_html opt_flag=1][if name=TEMA oper=neq value=NAO][/if][/leg_layer_html][leg_class_html][if name=CLASSE oper=neq value=NAO]<table><tr><td style=text-align:left colspan=2 width=42><input type=checkbox checked title=liga/desliga class=inputsb style='border: 0px solid red;cursor:pointer' value=[leg_class_index] name=[leg_layer_name] onclick='i3GEO.arvoreDeCamadas.inverteStatusClasse(this)' />&nbsp;<img src=[leg_icon] /></td><td style=text-align:left; ><span style=font-size:9px >[leg_class_name]</span></td></tr></table>[/if][/leg_class_html]
2 1 \ No newline at end of file
  2 +[leg_layer_html opt_flag=1][if name=TEMA oper=neq value=NAO][/if][/leg_layer_html][leg_class_html][if name=CLASSE oper=neq value=NAO]<table><tr><td style=text-align:left colspan=2 width=42><input type=checkbox checked title=liga/desliga class=inputsb style='border: 0px solid red;cursor:pointer' value=[leg_class_index] name=[leg_layer_name] onclick='i3GEO.arvoreDeCamadas.inverteStatusClasse(this)' />&nbsp;<img src='[leg_icon]' title='[leg_class_title]'/></td><td style=text-align:left; ><span style=font-size:9px >[leg_class_name]</span></td></tr></table>[/if][/leg_class_html]
3 3 \ No newline at end of file
... ...
menutemas/admin.db
No preview for this file type
temas/biomashp.map
1 1 MAP
2   -SYMBOLSET ../symbols/simbolos.sym
3   -FONTSET "../symbols/fontes.txt"
4 2 LAYER
5 3 DATA "c:\ms4w\apache\htdocs\geodados\brasil\vegetacao\biomas.shp"
  4 + GROUP "Grupo 1"
6 5 METADATA
7 6 "CLASSE" "SIM"
8 7 "permitekmz" "sim"
... ... @@ -12,8 +11,7 @@ FONTSET &quot;../symbols/fontes.txt&quot;
12 11 "permiteogc" ""
13 12 "permitekml" "sim"
14 13 "TEMA" "Biomas shapefile"
15   - END
16   - GROUP "Grupo 1"
  14 + END
17 15 NAME "biomashp"
18 16 STATUS OFF
19 17 TEMPLATE "none.htm"
... ... @@ -28,6 +26,7 @@ FONTSET &quot;../symbols/fontes.txt&quot;
28 26 OPACITY 100
29 27 SYMBOL 0
30 28 END
  29 + TITLE "Isto é um teste de inclusão de um texto descritivo para cada classe da legenda."
31 30 END
32 31 CLASS
33 32 NAME "PAMPA"
... ... @@ -38,6 +37,7 @@ FONTSET &quot;../symbols/fontes.txt&quot;
38 37 OPACITY 100
39 38 SYMBOL 0
40 39 END
  40 + TITLE ""
41 41 END
42 42 CLASS
43 43 NAME "MATA ATLANTICA"
... ... @@ -48,6 +48,7 @@ FONTSET &quot;../symbols/fontes.txt&quot;
48 48 OPACITY 100
49 49 SYMBOL 0
50 50 END
  51 + TITLE "Isto é um teste de inclusão de um texto descritivo para cada classe da legenda"
51 52 END
52 53 CLASS
53 54 NAME "CERRADO"
... ... @@ -58,6 +59,7 @@ FONTSET &quot;../symbols/fontes.txt&quot;
58 59 OPACITY 100
59 60 SYMBOL 0
60 61 END
  62 + TITLE "Isto é um teste de inclusão de um texto descritivo para cada classe da legenda"
61 63 END
62 64 CLASS
63 65 NAME "CAATINGA"
... ... @@ -68,6 +70,7 @@ FONTSET &quot;../symbols/fontes.txt&quot;
68 70 OPACITY 100
69 71 SYMBOL 0
70 72 END
  73 + TITLE "Isto é um teste de inclusão de um texto descritivo para cada classe da legenda"
71 74 END
72 75 CLASS
73 76 NAME "AMAZONIA"
... ... @@ -78,6 +81,7 @@ FONTSET &quot;../symbols/fontes.txt&quot;
78 81 OPACITY 100
79 82 SYMBOL 0
80 83 END
  84 + TITLE "Isto é um teste de inclusão de um texto descritivo para cada classe da legenda"
81 85 END
82 86 END
83 87  
... ...
temas/geopr_sipam_vege.map
1   -MAP
2   -
3   -
4   -SYMBOLSET ../symbols/simbolos.sym
5   -FONTSET "../symbols/fontes.txt"
6   -LAYER
  1 +MAP
  2 + LAYER
7 3 CONNECTION "http://www2.sipam.gov.br:80/geoserver/wms?SERVICE=WMS"
8 4 CONNECTIONTYPE WMS
9 5 DATA ""
10   - METADATA
11   - "wms_srs" "EPSG:4291"
12   - "wms_exceptions_format" "application/vnd.ogc.se_xml"
13   - "CLASSE" "SIM"
14   - "wfs" "nao"
15   - "TEXTO" "NAO"
16   - "wms_force_separate_request" "1"
17   - "formatosinfo" "text/plain,text/html,application/vnd.ogc.gml"
18   - "wms_formatlist" "image/png,application/atom xml,application/openlayers,application/pdf,application/rss xml,application/vnd.google-earth.kml xml,application/vnd.google-earth.kmz,image/geotiff,image/geotiff8,image/gif,image/jpeg,image/png8,image/svg xml,image/tiff,image/tiff8"
19   - "wms_format" "image/png"
20   - "wms_connectiontimeout" "30"
21   - "wms_server_version" "1.1.1"
22   - "wms_name" "amazonia:tvar_poligono"
23   - "legendawms" "http://www2.sipam.gov.br:80/geoserver/wms?SERVICE=WMS&service=wms&request=getlegendgraphic&version=1.1.1&service=wms&layer=amazonia:tvar_poligono&style=tvar_poligono&format=image/png"
24   - "wms_style" "tvar_poligono"
25   - "TEMA" "Vegetação"
26   - END
  6 + METADATA
  7 + "wms_srs" "EPSG:4291"
  8 + "wms_exceptions_format" "application/vnd.ogc.se_xml"
  9 + "CLASSE" "SIM"
  10 + "permitekmz" ""
  11 + "wfs" "nao"
  12 + "wms_force_separate_request" "1"
  13 + "TEXTO" "NAO"
  14 + "legendawms" "http://www2.sipam.gov.br:80/geoserver/wms?SERVICE=WMS&service=wms&request=getlegendgraphic&version=1.1.1&service=wms&layer=amazonia:tvar_poligono&style=tvar_poligono&format=image/png"
  15 + "wms_name" "amazonia:tvar_poligono"
  16 + "formatosinfo" "text/plain,text/html,application/vnd.ogc.gml"
  17 + "permitedownload" ""
  18 + "wms_format" "image/png"
  19 + "wms_formatlist" "image/png,application/atom xml,application/openlayers,application/pdf,application/rss xml,application/vnd.google-earth.kml xml,application/vnd.google-earth.kmz,image/geotiff,image/geotiff8,image/gif,image/jpeg,image/png8,image/svg xml,image/tiff,image/tiff8"
  20 + "wms_connectiontimeout" "30"
  21 + "permitekml" ""
  22 + "permiteogc" ""
  23 + "TEMA" "Vegetação"
  24 + "wms_server_version" "1.1.1"
  25 + "wms_style" "tvar_poligono"
  26 + END
27 27 NAME "geopr_sipam_vege"
28 28 OFFSITE 255 255 255
29   - SIZEUNITS PIXELS
30 29 STATUS DEFAULT
31 30 TOLERANCE 0
32   - TOLERANCEUNITS PIXELS
33 31 TYPE RASTER
34 32 UNITS METERS
35 33 CLASS
36 34 NAME " "
37   - METADATA
38   - END
39 35 END
40 36 END
  37 +
41 38 END
  39 +
... ...
temas/vegetacao.map
1   -MAP
2   -
3   -
4   -SYMBOLSET ../symbols/simbolos.sym
5   -FONTSET "../symbols/fontes.txt"
6   -LAYER
7   - NAME vegetacao # ok
8   - TYPE Polygon
9   - STATUS off
10   - TEMPLATE "vegetacao.htm"
11   - METADATA
12   - TEMA "Vegetação do Brasil (1:5.000.000)"
13   - CLASSE "SIM"
14   - ITENS "nome,tipo,desc_tipo,sigla"
15   - ITENSDESC "Nome,Tipo,Descrição,Sigla"
16   - TEXTO ""
17   - ESCALA "5000000"
  1 +MAP
  2 + LAYER
  3 + DATA "c:\ms4w\apache\htdocs\geodados\brasil\vegetacao\vegetacao.shp"
  4 + METADATA
  5 + "CLASSE" "SIM"
  6 + "permitekmz" "nao"
  7 + "ITENSDESC" "Nome,Tipo,Descrição,Sigla"
  8 + "ESCALA" "5000000"
  9 + "TEXTO" ""
  10 + "permitedownload" "sim"
  11 + "ITENS" "nome,tipo,desc_tipo,sigla"
  12 + "permitekml" "sim"
  13 + "permiteogc" "sim"
  14 + "TEMA" "Vegetação do Brasil (1:5.000.000)"
  15 + END
  16 + NAME "vegetacao"
  17 + STATUS OFF
  18 + TEMPLATE "vegetacao.htm"
  19 + TYPE POLYGON
  20 + UNITS METERS
  21 + CLASS
  22 + NAME "Vegetacao Lenhosa Oligotrofica dos Pantanos e das Acumulacoes Arenosas"
  23 + EXPRESSION ('[NOME]'eq'Vegetacao Lenhosa Oligotrofica dos Pantanos e das Acumulacoes Arenosas')
  24 + STYLE
  25 + ANGLE 360
  26 + COLOR 255 255 204
  27 + OPACITY 100
  28 + SYMBOL 0
  29 + END
  30 + END
  31 + CLASS
  32 + NAME "Estepe"
  33 + EXPRESSION ('[NOME]'eq'Estepe')
  34 + STYLE
  35 + ANGLE 360
  36 + COLOR 255 153 0
  37 + OPACITY 100
  38 + SYMBOL 0
  39 + END
  40 + END
  41 + CLASS
  42 + NAME "Savana"
  43 + EXPRESSION ('[NOME]'eq'Savana')
  44 + STYLE
  45 + ANGLE 360
  46 + COLOR 204 102 0
  47 + OPACITY 100
  48 + SYMBOL 0
  49 + END
  50 + END
  51 + CLASS
  52 + NAME "Savana Estépica"
  53 + EXPRESSION ('[NOME]'eq'Savana Estepica')
  54 + STYLE
  55 + ANGLE 360
  56 + COLOR 153 0 0
  57 + OPACITY 100
  58 + SYMBOL 0
  59 + END
  60 + END
  61 + CLASS
  62 + NAME "Floresta Estacional Decidual"
  63 + EXPRESSION ('[NOME]'eq'Floresta Estacional Decidual')
  64 + STYLE
  65 + ANGLE 360
  66 + COLOR 204 255 255
  67 + OPACITY 100
  68 + SYMBOL 0
  69 + END
  70 + END
  71 + CLASS
  72 + NAME "Floresta Estacional Semidecidual"
  73 + EXPRESSION ('[NOME]'eq'Floresta Estacional Semidecidual')
  74 + STYLE
  75 + ANGLE 360
  76 + COLOR 204 255 204
  77 + OPACITY 100
  78 + SYMBOL 0
  79 + END
  80 + END
  81 + CLASS
  82 + NAME "Floresta Ombrófila Aberta"
  83 + EXPRESSION ('[NOME]'eq'Floresta Ombrofila Aberta')
  84 + STYLE
  85 + ANGLE 360
  86 + COLOR 0 255 102
  87 + OPACITY 100
  88 + SYMBOL 0
  89 + END
  90 + END
  91 + CLASS
  92 + NAME "Floresta Ombrófila Mista"
  93 + EXPRESSION ('[NOME]'eq'Floresta Ombrofila Mista')
  94 + STYLE
  95 + ANGLE 360
  96 + COLOR 153 255 153
  97 + OPACITY 100
  98 + SYMBOL 0
  99 + END
  100 + END
  101 + CLASS
  102 + NAME "Floresta Ombrófila Densa"
  103 + EXPRESSION ('[NOME]'eq'Floresta Ombrofila Densa')
  104 + STYLE
  105 + ANGLE 360
  106 + COLOR 0 102 51
  107 + OPACITY 100
  108 + SYMBOL 0
  109 + END
  110 + END
  111 + CLASS
  112 + NAME "Refúgio Ecológico"
  113 + EXPRESSION ('[NOME]'eq'Refugio Ecologico')
  114 + STYLE
  115 + ANGLE 360
  116 + COLOR 255 0 0
  117 + OPACITY 100
  118 + SYMBOL 0
  119 + END
  120 + END
  121 + CLASS
  122 + NAME "Áreas das Formações Pioneiras"
  123 + EXPRESSION ('[NOME]'eq'Areas das Formacoes Pioneiras')
  124 + STYLE
  125 + ANGLE 360
  126 + COLOR 153 153 255
  127 + OPACITY 100
  128 + SYMBOL 0
  129 + END
  130 + END
  131 + CLASS
  132 + NAME "Área de Tensão Ecológica"
  133 + EXPRESSION ('[NOME]'eq'Areas de Tensao Ecologica')
  134 + STYLE
  135 + ANGLE 360
  136 + COLOR 204 204 204
  137 + OPACITY 100
  138 + SYMBOL 0
  139 + END
  140 + END
18 141 END
19   - TRANSPARENCY 100
20   - DATA "c:\ms4w\apache\htdocs\geodados\brasil\vegetacao\vegetacao.shp"
21   - CLASS
22   - Name 'Vegetacao Lenhosa Oligotrofica dos Pantanos e das Acumulacoes Arenosas'
23   - EXPRESSION ('[NOME]'eq'Vegetacao Lenhosa Oligotrofica dos Pantanos e das Acumulacoes Arenosas')
24   - COLOR 255 255 204
25   - OUTLINECOLOR -1 -1 -1
26   - END # CLASS
27   - CLASS
28   - Name 'Estepe'
29   - EXPRESSION ('[NOME]'eq'Estepe')
30   - COLOR 255 153 0
31   - OUTLINECOLOR -1 -1 -1
32   - END # CLASS
33   - CLASS
34   - Name 'Savana'
35   - EXPRESSION ('[NOME]'eq'Savana')
36   - COLOR 204 102 0
37   - OUTLINECOLOR -1 -1 -1
38   - END # CLASS
39   - CLASS
40   - Name 'Savana Estépica'
41   - EXPRESSION ('[NOME]'eq'Savana Estepica')
42   - COLOR 153 0 0
43   - OUTLINECOLOR -1 -1 -1
44   - END # CLASS
45   - CLASS
46   - Name 'Floresta Estacional Decidual'
47   - EXPRESSION ('[NOME]'eq'Floresta Estacional Decidual')
48   - COLOR 204 255 255
49   - OUTLINECOLOR -1 -1 -1
50   - END # CLASS
51   - CLASS
52   - Name 'Floresta Estacional Semidecidual'
53   - EXPRESSION ('[NOME]'eq'Floresta Estacional Semidecidual')
54   - COLOR 204 255 204
55   - OUTLINECOLOR -1 -1 -1
56   - END # CLASS
57   - CLASS
58   - Name 'Floresta Ombrófila Aberta'
59   - EXPRESSION ('[NOME]'eq'Floresta Ombrofila Aberta')
60   - COLOR 0 255 102
61   - OUTLINECOLOR -1 -1 -1
62   - END # CLASS
63   - CLASS
64   - Name 'Floresta Ombrófila Mista'
65   - EXPRESSION ('[NOME]'eq'Floresta Ombrofila Mista')
66   - COLOR 153 255 153
67   - OUTLINECOLOR -1 -1 -1
68   - END # CLASS
69   - CLASS
70   - Name 'Floresta Ombrófila Densa'
71   - EXPRESSION ('[NOME]'eq'Floresta Ombrofila Densa')
72   - COLOR 0 102 51
73   - OUTLINECOLOR -1 -1 -1
74   - END # CLASS
75   - CLASS
76   - Name 'Refúgio Ecológico'
77   - EXPRESSION ('[NOME]'eq'Refugio Ecologico')
78   - COLOR 255 0 0
79   - OUTLINECOLOR -1 -1 -1
80   - END # CLASS
81   - CLASS
82   - Name 'Áreas das Formações Pioneiras'
83   - EXPRESSION ('[NOME]'eq'Areas das Formacoes Pioneiras')
84   - COLOR 153 153 255
85   - OUTLINECOLOR -1 -1 -1
86   - END # CLASS
87   - CLASS
88   - Name 'Área de Tensão Ecológica'
89   - EXPRESSION ('[NOME]'eq'Areas de Tensao Ecologica')
90   - COLOR 204 204 204
91   - OUTLINECOLOR -1 -1 -1
92   - END # CLASS
93   -END
94   -END
  142 +
95 143 END
  144 +
... ...