Zoom to custom extent - PHP

Kevin Grootendorst kgrootendorst at BAIRD.COM
Thu Jan 27 09:07:55 EST 2005


Bill,
OK, now we're getting somewhere.  I included the following before the if
statement:
echo '<pre>';
print_r ($http_form_vars);
echo '</pre>';

On a normal page load, the following is returned:

Array
(
    [0] =>
)


When I select the 'QuickZoom' feature, I receive the following:

Array
(
    [WMSlayers] => 1
    [layer_status] => Array
        (
            [0] => New York Counties
            [1] => Ontario Municipalities
        )

    [ViewRegion] => 7200000,833270,7291840,894520
    [PrevStateKey] =>
BBOX=7121000,814428.33333333,7600000,1133571.6666667|SRS=init%3Depsg%
3A50000|MAPSIZE=600,400|LAYERS=0,1
    [NotFirstLoad] => 1
    [RosaMode] => 1
    [ROSA_CMD] =>
    [INPUT_TYPE] =>
    [INPUT_COORD] =>
    [QueryString] =>
    [doQuickZoom] => 1
)

Note that the page just refreshes with the current extents.  It did not
zoom to the municipality I selected.  However, the $adExtents[n] variables
are being set to the right extents.

Kevin





On Thu, 27 Jan 2005 06:38:25 -0500, William Bronsema
<wbronsema at DMSOLUTIONS.CA> wrote:

>Kevin,
>
>PHP variables are case sensitive.  I just took a quick peek at the code you
>sent me earlier.  Your app uses $http_form_vars not $HTTP_FORM_VARS.
>
>Try changing to $http_form_vars and let me know how it goes.
>
>Regards,
>Bill
>
>
>________________________________________________
>William A. Bronsema, C.E.T.
>Applications and Software Development,
>DM Solutions Group Inc.
>
>
>
>
>> -----Original Message-----
>> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu] On
>> Behalf Of Kevin Grootendorst
>> Sent: January 26, 2005 3:42 PM
>> To: MAPSERVER-USERS at lists.umn.edu
>> Subject: Re: [UMN_MAPSERVER-USERS] Zoom to custom extent - PHP
>>
>> Bill,
>> I added that code, right before the IF statement.
>> There was no output...
>> Does that tell us that ($HTTP_FORM_VARS) is null?
>> ?
>>
>>
>> On Wed, 26 Jan 2005 15:20:01 -0500, William Bronsema
>> <wbronsema at DMSOLUTIONS.CA> wrote:
>>
>> >Kevin,
>> >
>> >It sounds like $HTTP_FORM_VARS['doQuickZoom'] is not being set.
>> >
>> >Add this:
>> >echo '<pre>';
>> >print_r( $HTTP_FORM_VARS );
>> >echo '</pre>';
>> >
>> >just before the if statement and send me the output for both an intial
>> page
>> >load and quickzoom page load.  This will tell us exactly what is being
>> set
>> >(or not set ;) ).
>> >
>> >Regards,
>> >Bill
>> >
>> >
>> >
>> >________________________________________________
>> >William A. Bronsema, C.E.T.
>> >Applications and Software Development,
>> >DM Solutions Group Inc.
>> >
>> >
>> >
>> >> -----Original Message-----
>> >> From: Kevin Grootendorst [mailto:kgrootendorst at BAIRD.COM]
>> >> Sent: January 26, 2005 3:12 PM
>> >> To: MAPSERVER-USERS at LISTS.UMN.EDU; William Bronsema
>> >> Subject: Re: Zoom to custom extent - PHP
>> >>
>> >> Bill,
>> >> OK.  This makes sense.
>> >>
>> >> But, using the following statement:
>> >> If ( isset( $HTTP_FORM_VARS['doQuickZoom']) && $HTTP_FORM_VARS
>> >> ['doQuickZoom'] == "1" )
>> >> This returns a false, and the QuickZoom php code is not executed.
>> >>
>> >> Using this statement:
>> >> If ( isset( $HTTP_FORM_VARS['doQuickZoom']) && $HTTP_FORM_VARS
>> >> ['doQuickZoom'] == "" )
>> >> Also returns a false.
>> >>
>> >> Using this statement:
>> >> If ($HTTP_FORM_VARS['doQuickZoom'] == "")
>> >> Returns a TRUE - and the php code is executed.  But the map does not
>> draw
>> >> to the desired extents.  It just refreshes the current map extent.
>> >>
>> >> Thanks.
>> >>
>> >> Kevin
>> >>
>> >>
>> >> On Wed, 26 Jan 2005 14:52:35 -0500, William Bronsema
>> >> <wbronsema at DMSOLUTIONS.CA> wrote:
>> >>
>> >> >Kevin,
>> >> >
>> >> >doQuickZoom is supposed to go back to "".  echo
>> >> >$HTTP_FORM_VARS['doQuickZoom'] before your "If ( isset(
>> >> >$HTTP_FORM_VARS['doQuickZoom'])...." statement to see what I mean.
It
>> >> >should only echo 1 after a quick zoom is called.  You only want it to
>> be
>> >> 1
>> >> >when you want to do a quick zoom.  Make sense?
>> >> >
>> >> >Is the PHP code being called to perform the quick zoom and the map is
>> >> just
>> >> >not zooming?  Or is the PHP code not being called?
>> >> >
>> >> >Regards,
>> >> >Bill
>> >> >
>> >> >________________________________________________
>> >> >William A. Bronsema, C.E.T.
>> >> >Applications and Software Development,
>> >> >DM Solutions Group Inc.
>> >> >



More information about the mapserver-users mailing list