Problems with the Zoom Function of the PHP MapScript Module

Assefa Yewondwossen assefa at dmsolutions.ca
Wed Mar 7 14:13:14 EST 2001


Hi There,

 I added a new optional parameter for the zoomrectangle function so you can
specify the maximum extents allowed when you are zooming :

 eg :
    $oGeorefMaxExt->setextent($dfMaxExtMinX, $dfMaxExtMinY,
                                              $dfMaxExtMaxX, $dfMaxExtMaxY);

      $gpoMap->zoomrectangle($oPixelRect, $dfWidthPix,  $dfHeightPix,
$oGeorefExt, $oGeorefMaxExt);

 So you could set this parameter equal to your map extents so you would not
zoom pass that extent.

 This fix is in the CVS version and would be available for version 3.5.

 Meanwhile if you are on a windows and want a dll with these modifications
(and compatible with Mapserver 3.3.011), please let me know off the list I
could get it to you.

Best Regards,


Christian Fuerpasz wrote:

> Hello everybody!
>
> In my  Application there appears a problem in the Zoom Function in one
> special Case, otherwise it  works  correct.
>
> I use the Mapserver 3.3.011, PHP Mapscript from DM Solutions and also
> the the Rosa Applet.
> When i use the zoom function it works almost correctly. I can use it by
> a single click or by drawing a Rectangle. Its not allowed to zoom in
> more then specified in the .map file. But this works only in the middle
> of the Map.
>
> When you use the Zoom Button and Zoom in with drawing a small rectangle
> very near the border of the Map i get a map in the bigest scale (which
> should be correct) but with the Mapextends outside the specified
> extends.
> Now i can see the background which should never be seen. When i use now
> the pan function in this black (from me in the .map file defined)
> background the map is replaced correctly so that the border of the map
> is the border of the image.
>
> In all other Functions the Zoom Function works correctly.
>
> I think the Solution of this “Problem” can found in the PHP Map Script
> but I
> would be happy if you can give me some hints to develop a fast solution.
>
> An other Problem with the ROSA Applet is, that if you draw a Rectangle
> and
> first Click in the Map than move the mouse outside the Map and than
> release
> the Mouse Button you will get a Map which should not been drawn in this
> way. I
> tried to correct this, by setting the coordinates of the maxx and maxy
> to the
> maxextends of the Map but than I could suddenly zoom in over the given
> Min
> Scale which should also not appear.
>
> Also in this Point I hope to get some help from you.
>
> Thank you for your time.
>
> With best regards
>
> Christian Fuerpasz
>
> --
> ________________________________________________________
> Institut fuer Geographie der Universitaet Wien
>    Kartografie und Geoinformation
>
> Deptartment of Geography and Regional Science
>    University of Vienna
>    Cartography and GIS
>
>   Tel:            (+43 1) 4277 48658
>   Fax:            (+43 1) 4277 48649
>   E-Mail:       mailto:fuerp at atlas.gis.univie.ac.at
>   Snail-Mail: Universitaetstr. 7, A-1010 Wien, AUSTRIA
>
>   WWW:        http://www.gis.univie.ac.at/karto/
> _______________________________________________________

--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056
----------------------------------------------------------------





More information about the mapserver-users mailing list