Opened 21 years ago

Closed 21 years ago

#363 closed defect (fixed)

implement PHP MapScript zoom* functions in standard MapScript

Reported by: sgillies@… Owned by: sgillies@…
Priority: lowest Milestone:
Component: MapScript Version: 4.0
Severity: normal Keywords:
Cc:

Description

At Steve's request, I am implementing zoomPoint, ZoomRectangle, and zoomScale
in the standard mapscript.  These will extend the mapObj class.

It would be nice to simply include the relevant code from php_mapscript.c,
but it's full of PHP globals stuff, and all the function args come in as
some kind of a pointer.  I'll have to write much if it from scratch but
will stay as close as possible to DM's code, including the argument checking
and error reporting.

Attachments (3)

zoom_tests.txt (7.9 KB ) - added by sgillies@… 21 years ago.
test cases for mapObj zoom* methods
zoom_tests.2.txt (7.9 KB ) - added by sgillies@… 21 years ago.
test cases for mapObj zoom* methods
zoom_tests.3.txt (7.9 KB ) - added by sgillies@… 21 years ago.
test cases for mapObj zoom* methods

Download all attachments as: .zip

Change History (9)

by sgillies@…, 21 years ago

Attachment: zoom_tests.txt added

test cases for mapObj zoom* methods

by sgillies@…, 21 years ago

Attachment: zoom_tests.2.txt added

test cases for mapObj zoom* methods

by sgillies@…, 21 years ago

Attachment: zoom_tests.3.txt added

test cases for mapObj zoom* methods

comment:1 by sgillies@…, 21 years ago

Status: newassigned
Have made a new interface file for map zooming convenience functions,
mapzoom.i.  In it are three methods that extend mapObj: zoomPoint,
zoomRectangle, and zoomScale.  These follow the PHP MapScript 
functions as closely as possible.

The only difference is that the last argument, the maximum bounding
extent is NOT optional.  However, just pass a NULL pointer as this
argument if you don't want to be constrained.

Have written 13 new tests for these methods to make sure they do
what we want and raise the proper errors.  Have attached the relevant
test code to this bug so that folks can see what I've tested so far.



comment:2 by sgillies@…, 21 years ago

attachments.isobsolete: 01

comment:3 by sgillies@…, 21 years ago

attachments.isobsolete: 01

comment:4 by sdlime, 21 years ago

Sweet, nice job! This will make porting apps between scripting languages easier.

comment:5 by dmorissette, 21 years ago

Cc: assefa@… morissette@… added
We should cleanup the PHP code to share the same code as the other SWIG methods. 
 Not sure if I can do that before the 4.0 release but I'll try.

comment:6 by sgillies@…, 21 years ago

Resolution: fixed
Status: assignedclosed
I think that Steve indicated to me that these work, so I'll resolve
this.

BTW, I could have put the code for the zoom* methods into a C source
file to be built alongside mapscript_wrap.c, but opted for a SWIG
interface file so that we could attach exception action to the
methods.

Note: See TracTickets for help on using tickets.