From 37e256cd6aafa1cd03e042a2a5609eaf4a3f4e7b Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Sun, 18 Oct 2009 02:21:23 +0000 Subject: [PATCH] #232 resolvido --- admin/js/editormapfile.js | 4 +++- admin/php/editormapfile.php | 4 +++- aplicmap/legenda2.htm | 2 +- menutemas/admin.db | Bin 53248 -> 0 bytes temas/biomashp.map | 12 ++++++++---- temas/geopr_sipam_vege.map | 52 +++++++++++++++++++++++++--------------------------- temas/vegetacao.map | 235 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------------------------- 7 files changed, 182 insertions(+), 127 deletions(-) diff --git a/admin/js/editormapfile.js b/admin/js/editormapfile.js index 8baf063..c545b3c 100644 --- a/admin/js/editormapfile.js +++ b/admin/js/editormapfile.js @@ -941,6 +941,8 @@ function montaEditorClasseGeral(dados) "linhas":[ {ajuda:"Nome da classe para ser mostrada na legenda", titulo:"Name",id:"name",value:dados.name,tipo:"text"}, + {ajuda:"Descrição da classe (mostrada na legenda quando o mouse é sobreposto", + titulo:"Title",id:"title",value:dados.title,tipo:"text"}, {ajuda:"Sets the current display status of the class. Default turns the class on", titulo:"Status",id:"",value:dados.status,tipo:"text",div:"
"}, {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.
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).
Regular expressions function just like previous versions of MapServer. However, you must now delimit a regular expression using /regex/. No quotes should be used.

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.
One string function exists: length(). This obviously computes the length of a string. An example follows:
EXPRESSION (length('[NAME_E]') < 8)
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, } if(tipo == "classeGeral") { - var campos = new Array("status","minscale","maxscale","name","keyimage") + var campos = new Array("status","minscale","maxscale","name","title","keyimage") var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&indiceClasse="+indiceClasse var temp = $i("expression").value; var re = /]/g; diff --git a/admin/php/editormapfile.php b/admin/php/editormapfile.php index 0b9890b..4948b40 100644 --- a/admin/php/editormapfile.php +++ b/admin/php/editormapfile.php @@ -675,6 +675,7 @@ function pegaClasseGeral() $layer = $mapa->getlayerbyname($codigoLayer); $classe = $layer->getclass($indiceClasse); $dados["name"] = $classe->name; + $dados["title"] = $classe->title; $temp = $classe->getExpression(); $temp = str_replace("[","_C",$temp); $temp = str_replace("]","C_",$temp); @@ -694,13 +695,14 @@ function pegaClasseGeral() } function alterarClasseGeral() { - global $codigoMap,$codigoLayer,$indiceClasse,$locaplic,$status,$minscale,$maxscale,$name,$expression,$keyimage; + global $codigoMap,$codigoLayer,$indiceClasse,$locaplic,$status,$minscale,$maxscale,$name,$expression,$keyimage,$title; $dados = array(); $mapfile = $locaplic."/temas/".$codigoMap.".map"; $mapa = ms_newMapObj($mapfile); $layer = $mapa->getlayerbyname($codigoLayer); $classe = $layer->getclass($indiceClasse); $classe->set("name",$name); + $classe->set("title",$title); $temp = str_replace("_C","[",$expression); $temp = str_replace("C_","]",$temp); $temp = str_replace("_A_","'",$temp); diff --git a/aplicmap/legenda2.htm b/aplicmap/legenda2.htm index bda2845..2f504af 100644 --- a/aplicmap/legenda2.htm +++ b/aplicmap/legenda2.htm @@ -1 +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]
 [leg_class_name]
[/if][/leg_class_html] \ No newline at end of file +[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]
 [leg_class_name]
[/if][/leg_class_html] \ No newline at end of file diff --git a/menutemas/admin.db b/menutemas/admin.db index 80d6822..6da71e0 100644 Binary files a/menutemas/admin.db and b/menutemas/admin.db differ diff --git a/temas/biomashp.map b/temas/biomashp.map index 42542a6..9f09b0f 100644 --- a/temas/biomashp.map +++ b/temas/biomashp.map @@ -1,8 +1,7 @@ MAP -SYMBOLSET ../symbols/simbolos.sym -FONTSET "../symbols/fontes.txt" LAYER DATA "c:\ms4w\apache\htdocs\geodados\brasil\vegetacao\biomas.shp" + GROUP "Grupo 1" METADATA "CLASSE" "SIM" "permitekmz" "sim" @@ -12,8 +11,7 @@ FONTSET "../symbols/fontes.txt" "permiteogc" "" "permitekml" "sim" "TEMA" "Biomas shapefile" - END - GROUP "Grupo 1" + END NAME "biomashp" STATUS OFF TEMPLATE "none.htm" @@ -28,6 +26,7 @@ FONTSET "../symbols/fontes.txt" OPACITY 100 SYMBOL 0 END + TITLE "Isto é um teste de inclusão de um texto descritivo para cada classe da legenda." END CLASS NAME "PAMPA" @@ -38,6 +37,7 @@ FONTSET "../symbols/fontes.txt" OPACITY 100 SYMBOL 0 END + TITLE "" END CLASS NAME "MATA ATLANTICA" @@ -48,6 +48,7 @@ FONTSET "../symbols/fontes.txt" OPACITY 100 SYMBOL 0 END + TITLE "Isto é um teste de inclusão de um texto descritivo para cada classe da legenda" END CLASS NAME "CERRADO" @@ -58,6 +59,7 @@ FONTSET "../symbols/fontes.txt" OPACITY 100 SYMBOL 0 END + TITLE "Isto é um teste de inclusão de um texto descritivo para cada classe da legenda" END CLASS NAME "CAATINGA" @@ -68,6 +70,7 @@ FONTSET "../symbols/fontes.txt" OPACITY 100 SYMBOL 0 END + TITLE "Isto é um teste de inclusão de um texto descritivo para cada classe da legenda" END CLASS NAME "AMAZONIA" @@ -78,6 +81,7 @@ FONTSET "../symbols/fontes.txt" OPACITY 100 SYMBOL 0 END + TITLE "Isto é um teste de inclusão de um texto descritivo para cada classe da legenda" END END diff --git a/temas/geopr_sipam_vege.map b/temas/geopr_sipam_vege.map index ad39d17..bc467ed 100644 --- a/temas/geopr_sipam_vege.map +++ b/temas/geopr_sipam_vege.map @@ -1,41 +1,39 @@ -MAP - - -SYMBOLSET ../symbols/simbolos.sym -FONTSET "../symbols/fontes.txt" -LAYER +MAP + LAYER CONNECTION "http://www2.sipam.gov.br:80/geoserver/wms?SERVICE=WMS" CONNECTIONTYPE WMS DATA "" - METADATA - "wms_srs" "EPSG:4291" - "wms_exceptions_format" "application/vnd.ogc.se_xml" - "CLASSE" "SIM" - "wfs" "nao" - "TEXTO" "NAO" - "wms_force_separate_request" "1" - "formatosinfo" "text/plain,text/html,application/vnd.ogc.gml" - "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" - "wms_format" "image/png" - "wms_connectiontimeout" "30" - "wms_server_version" "1.1.1" - "wms_name" "amazonia:tvar_poligono" - "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" - "wms_style" "tvar_poligono" - "TEMA" "Vegetação" - END + METADATA + "wms_srs" "EPSG:4291" + "wms_exceptions_format" "application/vnd.ogc.se_xml" + "CLASSE" "SIM" + "permitekmz" "" + "wfs" "nao" + "wms_force_separate_request" "1" + "TEXTO" "NAO" + "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" + "wms_name" "amazonia:tvar_poligono" + "formatosinfo" "text/plain,text/html,application/vnd.ogc.gml" + "permitedownload" "" + "wms_format" "image/png" + "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" + "wms_connectiontimeout" "30" + "permitekml" "" + "permiteogc" "" + "TEMA" "Vegetação" + "wms_server_version" "1.1.1" + "wms_style" "tvar_poligono" + END NAME "geopr_sipam_vege" OFFSITE 255 255 255 - SIZEUNITS PIXELS STATUS DEFAULT TOLERANCE 0 - TOLERANCEUNITS PIXELS TYPE RASTER UNITS METERS CLASS NAME " " - METADATA - END END END + END + diff --git a/temas/vegetacao.map b/temas/vegetacao.map index 5452116..9c05a38 100644 --- a/temas/vegetacao.map +++ b/temas/vegetacao.map @@ -1,95 +1,144 @@ -MAP - - -SYMBOLSET ../symbols/simbolos.sym -FONTSET "../symbols/fontes.txt" -LAYER - NAME vegetacao # ok - TYPE Polygon - STATUS off - TEMPLATE "vegetacao.htm" - METADATA - TEMA "Vegetação do Brasil (1:5.000.000)" - CLASSE "SIM" - ITENS "nome,tipo,desc_tipo,sigla" - ITENSDESC "Nome,Tipo,Descrição,Sigla" - TEXTO "" - ESCALA "5000000" +MAP + LAYER + DATA "c:\ms4w\apache\htdocs\geodados\brasil\vegetacao\vegetacao.shp" + METADATA + "CLASSE" "SIM" + "permitekmz" "nao" + "ITENSDESC" "Nome,Tipo,Descrição,Sigla" + "ESCALA" "5000000" + "TEXTO" "" + "permitedownload" "sim" + "ITENS" "nome,tipo,desc_tipo,sigla" + "permitekml" "sim" + "permiteogc" "sim" + "TEMA" "Vegetação do Brasil (1:5.000.000)" + END + NAME "vegetacao" + STATUS OFF + TEMPLATE "vegetacao.htm" + TYPE POLYGON + UNITS METERS + CLASS + NAME "Vegetacao Lenhosa Oligotrofica dos Pantanos e das Acumulacoes Arenosas" + EXPRESSION ('[NOME]'eq'Vegetacao Lenhosa Oligotrofica dos Pantanos e das Acumulacoes Arenosas') + STYLE + ANGLE 360 + COLOR 255 255 204 + OPACITY 100 + SYMBOL 0 + END + END + CLASS + NAME "Estepe" + EXPRESSION ('[NOME]'eq'Estepe') + STYLE + ANGLE 360 + COLOR 255 153 0 + OPACITY 100 + SYMBOL 0 + END + END + CLASS + NAME "Savana" + EXPRESSION ('[NOME]'eq'Savana') + STYLE + ANGLE 360 + COLOR 204 102 0 + OPACITY 100 + SYMBOL 0 + END + END + CLASS + NAME "Savana Estépica" + EXPRESSION ('[NOME]'eq'Savana Estepica') + STYLE + ANGLE 360 + COLOR 153 0 0 + OPACITY 100 + SYMBOL 0 + END + END + CLASS + NAME "Floresta Estacional Decidual" + EXPRESSION ('[NOME]'eq'Floresta Estacional Decidual') + STYLE + ANGLE 360 + COLOR 204 255 255 + OPACITY 100 + SYMBOL 0 + END + END + CLASS + NAME "Floresta Estacional Semidecidual" + EXPRESSION ('[NOME]'eq'Floresta Estacional Semidecidual') + STYLE + ANGLE 360 + COLOR 204 255 204 + OPACITY 100 + SYMBOL 0 + END + END + CLASS + NAME "Floresta Ombrófila Aberta" + EXPRESSION ('[NOME]'eq'Floresta Ombrofila Aberta') + STYLE + ANGLE 360 + COLOR 0 255 102 + OPACITY 100 + SYMBOL 0 + END + END + CLASS + NAME "Floresta Ombrófila Mista" + EXPRESSION ('[NOME]'eq'Floresta Ombrofila Mista') + STYLE + ANGLE 360 + COLOR 153 255 153 + OPACITY 100 + SYMBOL 0 + END + END + CLASS + NAME "Floresta Ombrófila Densa" + EXPRESSION ('[NOME]'eq'Floresta Ombrofila Densa') + STYLE + ANGLE 360 + COLOR 0 102 51 + OPACITY 100 + SYMBOL 0 + END + END + CLASS + NAME "Refúgio Ecológico" + EXPRESSION ('[NOME]'eq'Refugio Ecologico') + STYLE + ANGLE 360 + COLOR 255 0 0 + OPACITY 100 + SYMBOL 0 + END + END + CLASS + NAME "Áreas das Formações Pioneiras" + EXPRESSION ('[NOME]'eq'Areas das Formacoes Pioneiras') + STYLE + ANGLE 360 + COLOR 153 153 255 + OPACITY 100 + SYMBOL 0 + END + END + CLASS + NAME "Área de Tensão Ecológica" + EXPRESSION ('[NOME]'eq'Areas de Tensao Ecologica') + STYLE + ANGLE 360 + COLOR 204 204 204 + OPACITY 100 + SYMBOL 0 + END + END END - TRANSPARENCY 100 - DATA "c:\ms4w\apache\htdocs\geodados\brasil\vegetacao\vegetacao.shp" - CLASS - Name 'Vegetacao Lenhosa Oligotrofica dos Pantanos e das Acumulacoes Arenosas' - EXPRESSION ('[NOME]'eq'Vegetacao Lenhosa Oligotrofica dos Pantanos e das Acumulacoes Arenosas') - COLOR 255 255 204 - OUTLINECOLOR -1 -1 -1 - END # CLASS - CLASS - Name 'Estepe' - EXPRESSION ('[NOME]'eq'Estepe') - COLOR 255 153 0 - OUTLINECOLOR -1 -1 -1 - END # CLASS - CLASS - Name 'Savana' - EXPRESSION ('[NOME]'eq'Savana') - COLOR 204 102 0 - OUTLINECOLOR -1 -1 -1 - END # CLASS - CLASS - Name 'Savana Estépica' - EXPRESSION ('[NOME]'eq'Savana Estepica') - COLOR 153 0 0 - OUTLINECOLOR -1 -1 -1 - END # CLASS - CLASS - Name 'Floresta Estacional Decidual' - EXPRESSION ('[NOME]'eq'Floresta Estacional Decidual') - COLOR 204 255 255 - OUTLINECOLOR -1 -1 -1 - END # CLASS - CLASS - Name 'Floresta Estacional Semidecidual' - EXPRESSION ('[NOME]'eq'Floresta Estacional Semidecidual') - COLOR 204 255 204 - OUTLINECOLOR -1 -1 -1 - END # CLASS - CLASS - Name 'Floresta Ombrófila Aberta' - EXPRESSION ('[NOME]'eq'Floresta Ombrofila Aberta') - COLOR 0 255 102 - OUTLINECOLOR -1 -1 -1 - END # CLASS - CLASS - Name 'Floresta Ombrófila Mista' - EXPRESSION ('[NOME]'eq'Floresta Ombrofila Mista') - COLOR 153 255 153 - OUTLINECOLOR -1 -1 -1 - END # CLASS - CLASS - Name 'Floresta Ombrófila Densa' - EXPRESSION ('[NOME]'eq'Floresta Ombrofila Densa') - COLOR 0 102 51 - OUTLINECOLOR -1 -1 -1 - END # CLASS - CLASS - Name 'Refúgio Ecológico' - EXPRESSION ('[NOME]'eq'Refugio Ecologico') - COLOR 255 0 0 - OUTLINECOLOR -1 -1 -1 - END # CLASS - CLASS - Name 'Áreas das Formações Pioneiras' - EXPRESSION ('[NOME]'eq'Areas das Formacoes Pioneiras') - COLOR 153 153 255 - OUTLINECOLOR -1 -1 -1 - END # CLASS - CLASS - Name 'Área de Tensão Ecológica' - EXPRESSION ('[NOME]'eq'Areas de Tensao Ecologica') - COLOR 204 204 204 - OUTLINECOLOR -1 -1 -1 - END # CLASS -END -END + END + -- libgit2 0.21.2