Commit a76c65d9dda3ba5d15f8a937fb822b0fc16bcf4d
1 parent
ed464a2e
Exists in
master
and in
7 other branches
Correção de erros no tratamento de simbolos complexos que estavam abortando a geração do mapfile
Showing
2 changed files
with
15 additions
and
11 deletions
Show diff stats
pacotes/gvsig/gvsig2mapfile/class.gvsig2mapfile.php
@@ -261,8 +261,10 @@ class gvsig2mapfile{ | @@ -261,8 +261,10 @@ class gvsig2mapfile{ | ||
261 | $oLayer->set("status",MS_DEFAULT); | 261 | $oLayer->set("status",MS_DEFAULT); |
262 | if($dataLayer["visible"] == "false") | 262 | if($dataLayer["visible"] == "false") |
263 | {$oLayer->set("status",MS_OFF);} | 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 | if($dataLayer["minScale"] > 0) | 268 | if($dataLayer["minScale"] > 0) |
267 | {$oLayer->set("minscaledenom",$dataLayer["minScale"]);} | 269 | {$oLayer->set("minscaledenom",$dataLayer["minScale"]);} |
268 | if($dataLayer["maxScale"] > 0) | 270 | if($dataLayer["maxScale"] > 0) |
@@ -283,15 +285,17 @@ class gvsig2mapfile{ | @@ -283,15 +285,17 @@ class gvsig2mapfile{ | ||
283 | if($oLayer->type == 0){ | 285 | if($oLayer->type == 0){ |
284 | $estilo->set("symbolname","ponto"); | 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 | if($data["size"] != false) | 300 | if($data["size"] != false) |
297 | {$estilo->set("size",$data["size"]);} | 301 | {$estilo->set("size",$data["size"]);} |
pacotes/gvsig/gvsig2mapfile/gvsig2mapfile.zip
No preview for this file type