[mapserver-users] Zooming Strangeness

Stephen Woodbridge woodbri at swoodbridge.com
Thu Feb 28 12:48:10 EST 2002


OK, a little debugging and some good guessing and things are looking
much better for me anyway. I had two separate problems that were
thankfully uncoupled :)

1) The ZOOM OUT problem.

This require the follow change to be made to gmap75.php3, search for
ZOOM_OUT and change the if condition to:

/* ----------------------------------------------------------------- */
/*      Check for zoom out (auto-submit) button.                     */
/* ----------------------------------------------------------------- */
    else if ($HTTP_FORM_VARS["CMD"] == "ZOOM_OUT" &&
             ($HTTP_FORM_VARS["INPUT_COORD"] == "0,0;0,0" ||
              $HTTP_FORM_VARS["INPUT_COORD"] == "") &&
             !$HTTP_FORM_VARS["mainmap_x"])
    {

This was required because INPUT_COORD was equally to "" or "0,0;0,0"
depending on diferent conditions. This might be because of changes I
made to gmap75 but it should be a safe change for everyone.

2) Zoom way in

This turned out to be a problem where the extents of my map file had a
different aspect ratio the the image size.

>> problematic:
SIZE 600 600
EXTENTS -180 -90 180 90

>> no problem:
SIZE 600 600
EXTENTS -180 -180 -180 180 180

I have asked Assefa to see if it is possible to make gmap detect this
and make appropriate ajustments so it will be more robust. Otherwise, if
you had image sizes that did not ALL have the same aspect ratio them you
would run into this problem just by changing the image size.

I want to thank everyone that responded to my request for help both on
and off the list. It seems that at least two other people were having
zoom problems. Also major thanks to DM Solutions for their offer to help
solve this problem.

-Steve



More information about the mapserver-users mailing list