[mapserver-users] mapextent of a selected polygon

E Perik erwin at perik.nu
Wed Aug 28 09:57:12 PDT 2002


Using PHPmapscript you can get the extents from single objects.
Collect them and then 'filter' for:

Xmin Ymin Xmax Ymax

###
$shapeExtObj = $shapeFileObj->getExtent($value);
$ShapeMinX = $shapeExtObj->minx;
$ShapeMinY = $shapeExtObj->miny;
$ShapeMaxX = $shapeExtObj->maxx;
$ShapeMaxY = $shapeExtObj->maxy;
###

$value is the object's index

Me.


-----Original Message-----
From: owner-mapserver-users at lists.gis.umn.edu
[mailto:owner-mapserver-users at lists.gis.umn.edu] On Behalf Of Lionel
Sent: woensdag 28 augustus 2002 9:37
To: mapserver-users at lists.gis.umn.edu
Subject: [mapserver-users] mapextent of a selected polygon

Hi,

I know it's possible to obtain a layer global mapextent. But do you know
if 
it's possible to obtain the mapextent of a selected polygon in a layer.
I 
work with phpmapscript and I would like to zoom at an entire polygon (or

group of polygons) when it's selected by a user.
Another solution is to store each mapextent of each polygon obtained
with 
another software (like arcinfo or grass) in a separate file, but I'd
like to 
avoid this and to keep a dynamic method.
Thanks in advance,
Lionel
-- 
AgrogeomaTIC
CNERTA-ENESAD, 4 rue champs-prevois, batiment grand-champs, 21000 Dijon
03.80.77.28.49




More information about the MapServer-users mailing list