MapServer / MapServer-import

3 stars 2 forks source link

implement PHP MapScript zoom* functions in standard MapScript #363

Closed tbonfort closed 12 years ago

tbonfort commented 12 years ago

Reporter: sgillies@frii.com Date: 2003/07/15 - 17:55

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.
tbonfort commented 12 years ago

Author: sgillies@frii.com Date: 2003/07/16 - 02:32

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.
tbonfort commented 12 years ago

Author: sdlime Date: 2003/07/16 - 16:20

Sweet, nice job! This will make porting apps between scripting languages easier.
tbonfort commented 12 years ago

Author: dmorissette Date: 2003/07/21 - 16:39

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.
tbonfort commented 12 years ago

Author: sgillies@frii.com Date: 2003/07/30 - 23:56

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.