Setting Reference Map's extent dynamically

Didrik Pinte dpinte at ITAE.BE
Fri Oct 19 00:32:08 PDT 2007


On Thu, 2007-10-18 at 12:16 -0700, cool frenz wrote:
> 
> I tried using :
> $map->reference->setextent( $new_rect_obj->minx - $pad,
> $new_rect_obj->miny - $pad, $new_rect_obj->maxx +$pad,
> $new_rect_obj->maxy + $pad );
> 
> But i got an error saying setextent method doesnt exist.
> 
> http://mapserver.gis.umn.edu/docs/reference/phpmapscript-class/classes/referencemapobj
> According to this i dont have any method except set.

ReferenceMapObj has only the method set but it has an object attribute
that is extent, a rectObj. Thus, you can use it :

$map->reference->extent->minx = $new_rect_obj->minx
$map->reference->extent->miny = $new_rect_obj->miny
...


Didrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20071019/45f75c5c/attachment.sig>


More information about the MapServer-users mailing list