[Chameleon] How to pass forward user specific extents?

Ken Sanderson ken at rockies.ca
Tue Aug 24 13:46:37 EDT 2004


That worked perfect Bill, thanks!!

One last question, well atleast in regards to this topic. Is there a way
to set the current view extents vs the overall extents? Basically I need
the user to go to their prefered starting extent, but if they hit the
'zoom to full extents' button it should take them to the overall extents
of the MAP file, not the ones I have just set via the setextent()
function. Right now, if you use the 'zoom to full extent' tool it takes
them to the values I set with setextent() at instead of the full map
extents.

Hope that makes sense. I am thinking I need to save the original extents
to variables and then reset it after the original load?

Ken

-----Original Message-----
From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of William A.
Bronsema
Sent: August 24, 2004 10:27 AM
To: Ken Sanderson
Cc: chameleon at lists.maptools.org
Subject: Re: [Chameleon] How to pass forward user specific extents?


Ken,

Add a hidden input tag like:
<input type="hidden" name="myLoadCheck" value='1'>

Use php to check the form variables that are passed over the URL.  On 
the initial load the form variable "myLoadCheck" will not be set so you 
know it is the first load.  Subsequent page load will have the variable
set.

something like:

$bNotFirstLoad = ( isset( $_GET['myLoadCheck'] ) ||
                   isset( $_POST['myLoadCheck'] ) );

I haven't tried it, but something like this should work.

Regards,
Bill

Ken Sanderson wrote:

> Thanks Paul and Bill.
> 
> I used Bill's method of:
> $oApp->moMapSession->oMap->setextent
> 
> As this was creating an unknown object error: 
> $this->moMapObject->oMap->extent->setextent
> 
> How do you suggest checking for first load? I had assumed that the 
> script in PHTML only was read on the original load.
> 
> Ken
> 


-- 

William A. Bronsema, C.E.T.
Applications Developer,
DM Solutions Group Inc.

e-mail: wbronsema at dmsolutions.ca
Web   : http://www.dmsolutions.ca
Phone : (613) 565-5056 ext.25
Fax   : (613) 565-0925
________________________________________________

_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon




More information about the Chameleon mailing list