Commit 2347fea54f97483dd99518efed0be4733f9bf598
1 parent
5ba70b97
Exists in
master
and in
7 other branches
#258
Showing
1 changed file
with
10 additions
and
1 deletions
Show diff stats
classesphp/classe_shp.php
... | ... | @@ -305,7 +305,16 @@ string - xy |
305 | 305 | if(!$this->layer){return "erro";} |
306 | 306 | $sopen = $this->layer->open(); |
307 | 307 | if($sopen == MS_FAILURE){return "erro";} |
308 | - $this->layer->whichShapes($this->mapa->extent); | |
308 | + $prjMapa = $this->mapa->getProjection(); | |
309 | + $prjTema = $this->layer->getProjection(); | |
310 | + $ret = $this->mapa->extent; | |
311 | + if (($prjTema != "") && ($prjMapa != $prjTema)) | |
312 | + { | |
313 | + $projOutObj = ms_newprojectionobj($prjTema); | |
314 | + $projInObj = ms_newprojectionobj($prjMapa); | |
315 | + $ret->project($projInObj, $projOutObj); | |
316 | + } | |
317 | + $this->layer->whichShapes($ret); | |
309 | 318 | $xy = array(); |
310 | 319 | while ($shape = $this->layer->nextShape()) |
311 | 320 | { | ... | ... |