[Chameleon] How to pass forward user specific extents?
Paul Spencer
pagameba at magma.ca
Tue Aug 24 14:00:05 EDT 2004
Ken, there is a mechanism for that too! Chameleon uses metadata at the
map object level to maintain the full extents when you first loaded the
map ... you can override this behaviour by supplying your own full
extents ...
"original_extents" "<minx> <miny> <maxx> <maxy>"
if your users can change projection, then you will also need an
"original_projection" entry ...
when you run a chameleon app, it stores temporary files in the place
indicated in your php.ini ... if you are using ms4w it is in c:/ms4w/tmp
... you will see a bunch of directories called sess_xxxxxxxxx and inside
these directories are a bunch of files, including map files. You can
open one of these map files to see the metadata that chameleon creates
on first load ...
Cheers,
Paul
Ken Sanderson wrote:
> 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
>>
>
>
>
--
-----------------------------------------------------------------
|Paul Spencer pspencer at dmsolutions.ca |
|-----------------------------------------------------------------|
|Applications & Software Development |
|DM Solutions Group Inc http://www.dmsolutions.ca/|
-----------------------------------------------------------------
More information about the Chameleon
mailing list