[Chameleon] Zoom to query - how to set extents in
wbronsema at dmsolutions.ca
Fri Feb 17 11:37:01 EST 2006
You are on the correct path for sure. What you need to do is save the map
state back to the session:
$_SESSION['gszCurrentState'] = $oMapSession->saveState();
Just make that call after you are done making changes to your map (i.e.
William A. Bronsema, C.E.T.
Software & Applications Development,
DM Solutions Group Inc.
> -----Original Message-----
> From: chameleon-bounces at lists.maptools.org [mailto:chameleon-
> bounces at lists.maptools.org] On Behalf Of scdyoung at tpg.com.au
> Sent: Tuesday, February 14, 2006 11:41 PM
> To: chameleon at lists.maptools.org
> Subject: [Chameleon] Zoom to query - how to set extents in
> Hi again
> Thanks Bill
> It appears that I am having trouble setting the new extents via the
> method in my query.phtml. Naively (fingers crossed) I was making the
> assumption that by setting
> the params at this point things would propogate. This is not the case,
> and I'm guessing that I need
> to write to the savesessionpath or something along those lines ? is there
> some other application
> variable I might be able to set, and if so how ? or am I going about this
> the wrong way ? (learning
> quite a bit I might add!)
> Hi Dale,
> To just refresh the map image without submitting the page, I use a simple
> function redrawMap()
> var img = CWCDHTML_GetImage( 'MapLayerDivImg' );
> img.src = gMapDHTMLURL + "&ts="+Math.random();
> William A. Bronsema, C.E.T.
> Software & Applications Development,
> DM Solutions Group Inc.
> > -----Original Message-----
> > From: chameleon-bounces at lists.maptools.org [mailto:chameleon-
> > bounces at lists.maptools.org] On Behalf Of scdyoung at tpg.com.au
> > Sent: Sunday, February 12, 2006 7:44 PM
> > To: chameleon at lists.maptools.org
> > Subject: [Chameleon] Zoom to Query
> > Hi all,
> > I have been attempting to write a query widget that will zoom to the
> > extents of a selected feature (in
> > this case a polygon).
> > Using the 'executeQuery' function from utils I am to isolate the
> > layer and shape indexes,
> > and extract the appropriate shape bounds. I am then able to set the new
> > extents of $oMapSession-
> > >oMap accordingly, though am unsure as to how I 'refresh' the mapping
> > interface; note that this is
> > my first attempt at writing my own widget.
> > Any help/direction would be appreciated.
> > Regards
> > Dale
> > _______________________________________________
> > Chameleon mailing list
> > Chameleon at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/chameleon
> Chameleon mailing list
> Chameleon at lists.maptools.org
More information about the Chameleon