Commit e27b93ade26ed9683ed19540377c341c04e63440
1 parent
bda8a81c
Exists in
master
and in
7 other branches
#263
Showing
1 changed file
with
10 additions
and
1 deletions
Show diff stats
classesphp/classe_shp.php
| ... | ... | @@ -413,6 +413,7 @@ $para - linha|poligono |
| 413 | 413 | |
| 414 | 414 | $prjMapa = $this->mapa->getProjection(); |
| 415 | 415 | $prjTema = $this->layer->getProjection(); |
| 416 | + | |
| 416 | 417 | $ret = $this->mapa->extent; |
| 417 | 418 | if (($prjTema != "") && ($prjMapa != $prjTema)) |
| 418 | 419 | { |
| ... | ... | @@ -422,20 +423,28 @@ $para - linha|poligono |
| 422 | 423 | } |
| 423 | 424 | $this->layer->whichShapes($ret); |
| 424 | 425 | $linha = ms_newLineObj(); |
| 426 | + $pponto = ""; | |
| 425 | 427 | while ($shape = $this->layer->nextShape()) |
| 426 | 428 | { |
| 427 | 429 | $lin = $shape->line(0); |
| 428 | 430 | $pt = $lin->point(0); |
| 431 | + if($pponto == "") | |
| 432 | + {$pponto = $pt;} | |
| 429 | 433 | if (($prjTema != "") && ($prjMapa != $prjTema)) |
| 430 | 434 | {$pt->project($projInObj, $projOutObj);} |
| 431 | 435 | $linha->add($pt); |
| 432 | 436 | } |
| 433 | 437 | if ($para == "poligono") |
| 434 | 438 | { |
| 435 | - $linha->add($linha->point(0)); | |
| 439 | + $linha->add($pponto); | |
| 436 | 440 | } |
| 437 | 441 | $shape = ms_newShapeObj($tipos); |
| 438 | 442 | $shape->add($linha); |
| 443 | + | |
| 444 | + //for ($i=0;$i < $linha->numpoints;$i++) | |
| 445 | + //{var_dump($linha->point($i));} | |
| 446 | + | |
| 447 | + | |
| 439 | 448 | foreach ($items as $ni) |
| 440 | 449 | {$reg[] = "-";} |
| 441 | 450 | $novoshpf->addShape($shape); | ... | ... |