[Chameleon] Zoom to query - how to set extents in

scdyoung at tpg.com.au scdyoung at tpg.com.au
Tue Feb 14 23:41:03 EST 2006


Hi again

Thanks Bill

It appears that I am having trouble setting the new extents via the $oMapSession->oMap->extents 
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!) 


Regards

Dale


Hi Dale,

To just refresh the map image without submitting the page, I use a simple
JavaScript function in my template and call it when necessary:

function redrawMap()
{
    var img = CWCDHTML_GetImage( 'MapLayerDivImg' );
    img.src = gMapDHTMLURL + "&ts="+Math.random();
}

HTH,
Bill

________________________________________________

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 required
> 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




More information about the Chameleon mailing list