Setting Reference Map's extent dynamically
cool frenz
coolfrenz85 at YAHOO.COM
Thu Oct 18 12:16:04 PDT 2007
Hi,
I wish to create different reference map dynamically corresponding to different villages. I have been able to do that but the problem is how to set the extent of this reference map ? I know the extent to put but dont know how. Please let me know the way if it is possible.
Given below are the methods i tried and errors i got.
Code Snippet:
//Creating New reference image dynamically
$ret=$image_ref->saveImage("C:/ms4w/Apache/htdocs/eSagu/map/reference_img.gif");
//Now setting new extents
$map->reference->set("extent",$new_rect_obj);
$new_rect_obj is a rect obj and contains valid extents. But i am getting following error:
Fatal error: Property 'extent' is an object and cannot be set using set(). Use the extent object's methods instead. in C:\ms4w\Apache\htdocs\eSagu\htdocs\eSaguGIS_137.php on line 466
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.
Please help me out !
Thanks,
Piyush
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20071018/519f6645/attachment.htm>
More information about the MapServer-users
mailing list