Zoom to custom extent - PHP
William Bronsema
wbronsema at DMSOLUTIONS.CA
Tue Jan 25 10:32:41 PST 2005
Kevin,
You will need to add a chunk of code like this:
**********************************************************
// 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] );
}
***********************************************************
to your <application>.php file probably just after the navigation code.
(Note, you indicated that you built your app using maplab. This code
snippet is built with that in mind - but has not been tested ;) )
HTH
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 25, 2005 1:05 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] Zoom to custom extent - PHP
>
> Well, I haven't given up trying yet. The problem is that I have bits of
> code everywhere and my confusion is growing. As mentioned before, I'm
> trying to mimic the GMAP example. But can't I have the code all in one
> file? It seems like I have 3 different files with code pertaining to this
> one little feature. Is there not some sort of code repository somewhere
> that I can just get the complete code from (and info telling me what file
> it has to go in)? I'm boggled with trying to write PHP, thats why I'm
> trying to borrow code directly from the GMAP example.
More information about the MapServer-users
mailing list