From 9bf4c324f055ee1198c72070c4ad7b7473514440 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Mon, 7 Feb 2011 12:48:00 +0000 Subject: [PATCH] Inclusão de parâmetro (metadado) para cancelar efeito de transição de zoom na interface Openlayers --- admin/admin.db | Bin 70656 -> 0 bytes admin/js/editormapfile.js | 8 +++++++- admin/php/editormapfile.php | 8 ++++++-- classesjs/classe_interface.js | 6 ++++-- classesphp/classe_mapa.php | 10 +++++++++- temas/locali.map | 24 ++++++++++++++---------- 6 files changed, 40 insertions(+), 16 deletions(-) diff --git a/admin/admin.db b/admin/admin.db index 4d9726e..5044dfe 100644 Binary files a/admin/admin.db and b/admin/admin.db differ diff --git a/admin/js/editormapfile.js b/admin/js/editormapfile.js index 3bf9189..16128c0 100644 --- a/admin/js/editormapfile.js +++ b/admin/js/editormapfile.js @@ -1139,6 +1139,8 @@ function montaEditorMetadados(dados) titulo:"Escondido (ESCONDIDO)",id:"",value:dados.escondido,tipo:"text",div:"
"}, {ajuda:"Indica se o tema irá ser mostrado na ferramenta de identificação", titulo:"Identifica (IDENTIFICA)",id:"",value:dados.identifica,tipo:"text",div:"
"}, + {ajuda:"Aplica efeitos de transição nas operações de zoom e pan na interface Openlayers", + titulo:"Efeitos de transição zoom (TRANSITIONEFFECT)",id:"",value:dados.transitioneffect,tipo:"text",div:"
"}, {ajuda:"Nomes das colunas da tabela de atributos do tema, que serão mostradas na ferramenta de identificação. Se for vazio, todas as colunas serão mostradas. A lista de itens deve ser separada por ',' e grafada em caixa alta no caso de shapefile.", titulo:"Itens (ITENS)",id:"itens",value:dados.itens,tipo:"text"}, {ajuda:"Lista com os 'alias', ou apelidos, para os nomes das colunas listados no metadata 'itens'. Os alias devem ser separados por ',' e seguir a ordem definida em ITENS.", @@ -1225,6 +1227,10 @@ function montaEditorMetadados(dados) temp += core_combosimnao(dados.identifica) temp += "" $i("cIdentifica").innerHTML = temp + temp = "" + $i("cTransitioneffect").innerHTML = temp var temp = function() {salvarDadosEditor('metadados',dados.codigoMap,dados.codigoLayer)} @@ -1569,7 +1575,7 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo, else {alert("Valor de escala incorreto");return;} } - var campos = new Array("permitecomentario","cache","iconetema","ltempoformatodata","ltempoiteminicio","ltempoitemfim","ltempoitemtitulo","ltempoitemdescricao","ltempoitemtip","ltempoitemimagem","ltempoitemicone","ltempoitemlink","editorsql","description_template","palletefile","palletestep","arquivodownload","aplicaextensao","classestamanho","classessimbolo","classescor","classesnome","classesitem","mensagem","identifica","extensao","escondido","download","escala","tema","classe","tip","itenslink","itens","itensdesc") + var campos = new Array("permitecomentario","cache","iconetema","ltempoformatodata","ltempoiteminicio","ltempoitemfim","ltempoitemtitulo","ltempoitemdescricao","ltempoitemtip","ltempoitemimagem","ltempoitemicone","ltempoitemlink","editorsql","description_template","palletefile","palletestep","arquivodownload","aplicaextensao","classestamanho","classessimbolo","classescor","classesnome","classesitem","mensagem","identifica","transitioneffect","extensao","escondido","download","escala","tema","classe","tip","itenslink","itens","itensdesc") var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer var prog = "../php/editormapfile.php?funcao=alterarMetadados" } diff --git a/admin/php/editormapfile.php b/admin/php/editormapfile.php index 6d3feee..59a6c57 100644 --- a/admin/php/editormapfile.php +++ b/admin/php/editormapfile.php @@ -668,6 +668,8 @@ switch (strtoupper($funcao)) identifica + transitioneffect + extensao escondido @@ -1307,6 +1309,7 @@ function pegaMetadados() $dados["escondido"] = $layer->getmetadata("escondido"); $dados["extensao"] = $layer->getmetadata("extensao"); $dados["identifica"] = $layer->getmetadata("identifica"); + $dados["transitioneffect"] = $layer->getmetadata("transitioneffect"); $dados["mensagem"] = $layer->getmetadata("mensagem"); $dados["classesitem"] = $layer->getmetadata("classesitem"); $dados["classesnome"] = $layer->getmetadata("classesnome"); @@ -1338,7 +1341,7 @@ function pegaMetadados() } function alterarMetadados() { - global $permitecomentario,$iconetema,$ltempoformatodata,$ltempoiteminicio,$ltempoitemfim,$ltempoitemtitulo,$ltempoitemdescricao,$ltempoitemtip,$ltempoitemimagem,$ltempoitemicone,$ltempoitemlink,$description_template,$palletestep,$palletefile,$arquivodownload,$codigoMap,$codigoLayer,$locaplic,$aplicaextensao,$classestamanho,$classessimbolo,$classescor,$classesnome,$classesitem,$mensagem,$identifica,$extensao,$escondido,$download,$escala,$tema,$classe,$tip,$itenslink,$itens,$itensdesc,$editorsql,$cache; + global $permitecomentario,$iconetema,$ltempoformatodata,$ltempoiteminicio,$ltempoitemfim,$ltempoitemtitulo,$ltempoitemdescricao,$ltempoitemtip,$ltempoitemimagem,$ltempoitemicone,$ltempoitemlink,$description_template,$palletestep,$palletefile,$arquivodownload,$codigoMap,$codigoLayer,$locaplic,$aplicaextensao,$classestamanho,$classessimbolo,$classescor,$classesnome,$classesitem,$mensagem,$identifica,$transitioneffect,$extensao,$escondido,$download,$escala,$tema,$classe,$tip,$itenslink,$itens,$itensdesc,$editorsql,$cache; $dados = array(); $mapfile = $locaplic."/temas/".$codigoMap.".map"; $mapa = ms_newMapObj($mapfile); @@ -1354,6 +1357,7 @@ function alterarMetadados() $layer->setmetadata("escondido",$escondido); $layer->setmetadata("extensao",$extensao); $layer->setmetadata("identifica",$identifica); + $layer->setmetadata("transitioneffect",$transitioneffect); $layer->setmetadata("mensagem",$mensagem); $layer->setmetadata("classesitem",$classesitem); $layer->setmetadata("classesnome",$classesnome); @@ -1735,7 +1739,7 @@ function removeCabecalho($arq,$symbolset=true) $teste = str_replace("'","",$teste); $teste = str_replace('"',"",$teste); $teste = preg_replace('/[\n\r\t ]*/', '', $teste); - $testar = array("KEYIMAGE","TILEINDEX","TILEITEM","SYMBOL","LABELITEM","FILTERITEM","GROUP","ENCODING","TIP","CLASSE","ITENSDESC","CLASSESNOME","ITENSLINK","ESCALA","CLASSESSIMBOLO","MENSAGEM","EXTENSAO","CLASSESITEM","ESCONDIDO","CLASSESCOR","DOWNLOAD","CLASSESTAMANHO","ITENS","TEMA","APLICAEXTENSAO","IDENTIFICA"); + $testar = array("KEYIMAGE","TILEINDEX","TILEITEM","SYMBOL","LABELITEM","FILTERITEM","GROUP","ENCODING","TIP","CLASSE","ITENSDESC","CLASSESNOME","ITENSLINK","ESCALA","CLASSESSIMBOLO","MENSAGEM","EXTENSAO","CLASSESITEM","ESCONDIDO","CLASSESCOR","DOWNLOAD","CLASSESTAMANHO","ITENS","TEMA","APLICAEXTENSAO","IDENTIFICA","TRANSITIONEFFECT"); $passou = true; foreach ($testar as $t) {if($teste == $t){$passou = false;}} diff --git a/classesjs/classe_interface.js b/classesjs/classe_interface.js index dd57179..6842cf2 100644 --- a/classesjs/classe_interface.js +++ b/classesjs/classe_interface.js @@ -822,6 +822,7 @@ i3GEO.Interface = { ratio:1, buffer:i3GEO.Interface.openlayers.BUFFER, wrapDateLine:true, + transitionEffect: "resize", eventListeners:{ "loadstart": i3GEO.Interface.openlayers.loadStartLayer, "loadend": i3GEO.Interface.openlayers.loadStopLayer @@ -838,11 +839,12 @@ i3GEO.Interface = { camada.type === 3 ? opcoes.singleTile = false : opcoes.singleTile = !(i3GEO.Interface.openlayers.TILES); } camada.type === 0 ? opcoes.gutter = 20 : opcoes.gutter = 0; + camada.transitioneffect === "nao" ? opcoes.transitionEffect = "null" : opcoes.transitionEffect = "resize"; } catch(e){} layer = new OpenLayers.Layer.WMS(camada.name, urllayer,{map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes); - if(camada.escondido !== "sim") - {layer.transitionEffect ="resize";} + if(camada.escondido === "sim") + {layer.transitionEffect = "null";} i3geoOL.addLayer(layer); } else diff --git a/classesphp/classe_mapa.php b/classesphp/classe_mapa.php index 09373b3..46bf92e 100644 --- a/classesphp/classe_mapa.php +++ b/classesphp/classe_mapa.php @@ -228,6 +228,13 @@ string - javascript com os parametros $ltempo = "nao"; if($oLayer->getmetadata("ltempoformatodata") !== "") {$ltempo = "sim";} + // + //verifica se o tema receberá efeito de transição de zoom + // + $transitioneffect = "sim"; + if($oLayer->getmetadata("transitioneffect") == "NAO") + {$transitioneffect = "nao";} + // $permitecomentario = "nao"; if($oLayer->getmetadata("nomeoriginal") != "" && strtoupper($oLayer->getmetadata("pemitecomentario")) != "NAO") {$permitecomentario = "sim";} @@ -256,7 +263,8 @@ string - javascript com os parametros "classe"=>($oLayer->getmetadata("classe")), "permitecomentario"=>$permitecomentario, "exttema"=>$exttema, - "aplicaextensao"=>$aplicaextensao + "aplicaextensao"=>$aplicaextensao, + "transitioneffect"=>$transitioneffect ); } } diff --git a/temas/locali.map b/temas/locali.map index 2102313..df58ec9 100644 --- a/temas/locali.map +++ b/temas/locali.map @@ -1,27 +1,31 @@ MAP - FONTSET "c:\ms4w\apache\htdocs\i3geo/symbols/fontes.txt" - SYMBOLSET "c:\ms4w\apache\htdocs\i3geo/symbols/simbolos.sym" + FONTSET "c:\ms4w\apache\htdocs\i3geo/symbols/fontes.txt" + SYMBOLSET "c:\ms4w\apache\htdocs\i3geo/symbols/simbolos.sym" LAYER CONNECTION "" DATA "c:\ms4w\apache\htdocs\i3geo\aplicmap\dados\locali" METADATA + "cache" "" + "TIP" "TIPO,ANOCRIA,NOMELOC" "LTEMPOITEMIMAGEM" "" - "LTEMPOITEMDESCRICAO" "TIPO" "CLASSE" "SIM" - "palletestep" "" + "LTEMPOITEMDESCRICAO" "TIPO" "LTEMPOITEMINICIO" "ANOCRIA" + "palletestep" "" "LTEMPOITEMTIP" "ANOCRIA" - "description_template" "" + "iconetema" "" "LTEMPOITEMTITULO" "NOMELOC" + "description_template" "" "LTEMPOITEMLINK" "" "palletefile" "" "LTEMPOFORMATODATA" "iso8601" + "permitecomentario" "" "LTEMPOITEMICONE" "" "arquivodownload" "" + "transitioneffect" "NAO" "TEMA" "Localidades" "editorsql" "" - "LTEMPOITEMFIM" "" - "TIP" "TIPO,ANOCRIA,NOMELOC" + "LTEMPOITEMFIM" "" END NAME "locali" STATUS OFF @@ -34,9 +38,9 @@ MAP STYLE ANGLE 360 COLOR 209 36 9 - OPACITY 100 SIZE 4 SYMBOL "ponto" + WIDTH 1 END END CLASS @@ -45,9 +49,9 @@ MAP STYLE ANGLE 360 COLOR 62 9 41 - OPACITY 100 SIZE 6 SYMBOL "ponto" + WIDTH 1 END END CLASS @@ -56,9 +60,9 @@ MAP STYLE ANGLE 360 COLOR 112 203 244 - OPACITY 100 SIZE 6 SYMBOL "capital" + WIDTH 1 END END END -- libgit2 0.21.2