From e27b93ade26ed9683ed19540377c341c04e63440 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Sat, 21 Nov 2009 02:59:49 +0000 Subject: [PATCH] #263 --- classesphp/classe_shp.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/classesphp/classe_shp.php b/classesphp/classe_shp.php index 48242cb..8edc66a 100644 --- a/classesphp/classe_shp.php +++ b/classesphp/classe_shp.php @@ -413,6 +413,7 @@ $para - linha|poligono $prjMapa = $this->mapa->getProjection(); $prjTema = $this->layer->getProjection(); + $ret = $this->mapa->extent; if (($prjTema != "") && ($prjMapa != $prjTema)) { @@ -422,20 +423,28 @@ $para - linha|poligono } $this->layer->whichShapes($ret); $linha = ms_newLineObj(); + $pponto = ""; while ($shape = $this->layer->nextShape()) { $lin = $shape->line(0); $pt = $lin->point(0); + if($pponto == "") + {$pponto = $pt;} if (($prjTema != "") && ($prjMapa != $prjTema)) {$pt->project($projInObj, $projOutObj);} $linha->add($pt); } if ($para == "poligono") { - $linha->add($linha->point(0)); + $linha->add($pponto); } $shape = ms_newShapeObj($tipos); $shape->add($linha); + + //for ($i=0;$i < $linha->numpoints;$i++) + //{var_dump($linha->point($i));} + + foreach ($items as $ni) {$reg[] = "-";} $novoshpf->addShape($shape); -- libgit2 0.21.2