Opened 21 years ago
Closed 21 years ago
#363 closed defect (fixed)
implement PHP MapScript zoom* functions in standard MapScript
Reported by: | Owned by: | ||
---|---|---|---|
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)
Change History (9)
by , 21 years ago
Attachment: | zoom_tests.txt added |
---|
comment:1 by , 21 years ago
Status: | new → assigned |
---|
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 , 21 years ago
attachments.isobsolete: | 0 → 1 |
---|
comment:3 by , 21 years ago
attachments.isobsolete: | 0 → 1 |
---|
comment:4 by , 21 years ago
Sweet, nice job! This will make porting apps between scripting languages easier.
comment:5 by , 21 years ago
Cc: | 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 , 21 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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.
test cases for mapObj zoom* methods