[Chameleon] How to pass forward user specific extents?

William A. Bronsema wbronsema at dmsolutions.ca
Tue Aug 24 07:36:13 EDT 2004


Hi Ken,

All you need to do is determine the extent you wish to use and set it 
between the CWCInitialize call and the CWCExecute call.

Your code would look something like this:

// init app
$oApp->CWCInitialize( $szTemplateName, $szMapFile  );

// determine if is first load or not
......

// get user extents
......

// override extent if necessary
if ( $bIsFirstLoad )
{
     // set extent
     $oApp->moMapSession->oMap->setextent(
                                      $dUserMinX,
                                      $dUserMinY,
                                      $dUserMaxX,
                                      $dUserMaxY );
}

// execute app
$oApp->CWCExecute();


Hope this helps.

Regards,
Bill



Ken Sanderson wrote:
> Here is what I have setup. I have a phtml file similar to the ones found
> in the samples (using beta 1.99b), only I have added code to handle a
> username and password first and I have put the related HTML tempalate
> file in a non-accesible directory. In short it only runs the core of the
> original PHTML file if they have the right username and password.
> 
> I also want to have them select the extent they wish start off the map
> with. Full extent will be an option which would be the extents set in
> the MAP file, but there will be a few choices that I want to over-ride
> the MAP file extents when it loads, instead using the choosen extents.
> Is there a way I can send new extents before the map loads?
> 
> Thanks,
> 
> Ken Sanderson
> 
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 

-- 

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
________________________________________________



More information about the Chameleon mailing list