Commit a76c65d9dda3ba5d15f8a937fb822b0fc16bcf4d

Authored by Edmar Moretti
1 parent ed464a2e

Correção de erros no tratamento de simbolos complexos que estavam abortando a geração do mapfile

pacotes/gvsig/gvsig2mapfile/class.gvsig2mapfile.php
... ... @@ -261,8 +261,10 @@ class gvsig2mapfile{
261 261 $oLayer->set("status",MS_DEFAULT);
262 262 if($dataLayer["visible"] == "false")
263 263 {$oLayer->set("status",MS_OFF);}
264   - $opacidade = ($dataLayer["transparency"] * 100) / 255;
265   - $oLayer->set("opacity",$opacidade);
  264 + if(!empty($dataLayer["transparency"])){
  265 + $opacidade = ($dataLayer["transparency"] * 100) / 255;
  266 + $oLayer->set("opacity",$opacidade);
  267 + }
266 268 if($dataLayer["minScale"] > 0)
267 269 {$oLayer->set("minscaledenom",$dataLayer["minScale"]);}
268 270 if($dataLayer["maxScale"] > 0)
... ... @@ -283,15 +285,17 @@ class gvsig2mapfile{
283 285 if($oLayer->type == 0){
284 286 $estilo->set("symbolname","ponto");
285 287 }
286   - if($data["hasFill"] == "true"){
287   - $ncor = explode(",",$data["color"]);
288   - $cor = $estilo->color;
289   - $cor->setrgb($ncor[0],$ncor[1],$ncor[2]);
290   - }
291   - if($data["hasOutline"] == "true" && $data["outline"] != ""){
292   - $ncor = explode(",",$data["outline"]);
293   - $cor = $estilo->outlinecolor;
294   - $cor->setrgb($ncor[0],$ncor[1],$ncor[2]);
  288 + if(!empty($data["color"])){
  289 + if($data["hasFill"] == "true"){
  290 + $ncor = explode(",",$data["color"]);
  291 + $cor = $estilo->color;
  292 + $cor->setrgb($ncor[0],$ncor[1],$ncor[2]);
  293 + }
  294 + if($data["hasOutline"] == "true" && $data["outline"] != ""){
  295 + $ncor = explode(",",$data["outline"]);
  296 + $cor = $estilo->outlinecolor;
  297 + $cor->setrgb($ncor[0],$ncor[1],$ncor[2]);
  298 + }
295 299 }
296 300 if($data["size"] != false)
297 301 {$estilo->set("size",$data["size"]);}
... ...
pacotes/gvsig/gvsig2mapfile/gvsig2mapfile.zip
No preview for this file type