Zoom to custom extent - PHP

William Bronsema wbronsema at DMSOLUTIONS.CA
Tue Jan 25 14:35:12 EST 2005


I was just about to mention that and Matt beat me to it.  In your original
posting, you had commas as the delimiter not spaces.  The code I sent you is
based on comma delimited values.

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 Matt Brown
> Sent: January 25, 2005 2:26 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] Zoom to custom extent - PHP
>
> Kevin,
>
> you need to either separate your extents with a comma in the form, or
> change
> the first option in the explode function to look for a ' ' instead of ','
>
> Matt
>
> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
> Behalf Of Kevin Grootendorst
> Sent: Tuesday, January 25, 2005 1:11 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] Zoom to custom extent - PHP
>
>
> Bill,
> Thanks for the direction.  I'm still a little stuck.  Just to clarify, I
> have the following code:
>
> ----------
> In my app_contents.php file:
>
> <SELECT NAME="ViewRegion">
> <OPTION VALUE="7120999 827999 7599999 1119999">Lake Ontario</OPTION>
> <OPTION VALUE="7200000 833270 7291840 894520">Niagara (ON)</OPTION>
> <OPTION VALUE="7150000 878000 7210000 880000">Hamilton-Wentworth</OPTION>
> </SELECT >
>
> ----------
> In my app.php file:
>
> (the code that you provided)
> // check if quick zoom is requested
> if ( isset( $http_form_vars['ViewRegion'] ) && strlen($http_form_vars
> ['ViewRegion'] ) > 0 )
> {
>     // separate values
>     $adExtents = explode( ',', $http_form_vars['ViewRegion'] );
>
>     // set extent
>     $oMapSession->oMap->setExtent( $adExtents[0], $adExtents[1],$adExtents
> [2], $adExtents[3] );
> }
> -----------
>
> This isn't quite working yet, but is this really all the code I'll need?
> Should my drop-down box be set as a form?
> Thanks again for your help - this has been very frustrating.
>
> Kevin



More information about the mapserver-users mailing list