Commit 25fd30e148bb52ffd07458370d98a958cd2f17c0
1 parent
292c9a2d
Exists in
master
and in
7 other branches
Leitura do PRJ ao adicionar tema de arquivo shp
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
classesphp/classe_mapa.php
| ... | ... | @@ -2117,6 +2117,10 @@ class Mapa |
| 2117 | 2117 | } |
| 2118 | 2118 | $layer = criaLayer($this->mapa,$tipo,MS_DEFAULT,basename($arq),"SIM"); |
| 2119 | 2119 | $layer->set("data",$arq); |
| 2120 | + //verifica se existe o arquivo PRJ | |
| 2121 | + if(file_exists(str_replace(".shp","",$arq).".prj")){ | |
| 2122 | + $layer->setprojection("AUTO"); | |
| 2123 | + } | |
| 2120 | 2124 | $layer->set("name",basename($arq)); |
| 2121 | 2125 | $layer->setmetadata("DOWNLOAD","nao"); |
| 2122 | 2126 | $layer->setmetadata("TEMALOCAL","NAO"); | ... | ... |