[Chameleon] popup from rectangle

Ken-ichi kueda at wso.williams.edu
Fri Nov 19 18:13:33 EST 2004

So I'm still working on this widget (essentially a query-like tool that 
uses a rectangle) and it really has me stumped.  When I junk ZoomIn's 
ParseURL and add the JS functions from Query (renaming everything 
appropriately, I hope), the form just submits whenever you click on the 
map, instead of bringing up the popup window.  This happens regardless 
of whether $this->mnAllowRectangle = 0 or not.  I even dropped an alert( 
'blah' ) into the widgetNameWMouseClick() JS function, only to find it 
doesn't even get called when I click on the map.  widgetNameWMouseMove() 
works fine.  When I try the other route and set $this->mnAllowRectangle 
= 1 in the Query widget, it has no effect: no rectangle.

So I guess my question is, how does Chameleon decide when a click on the 
map submits the form, and when it defers to a widget's JavaScript?


Ken-ichi wrote:

> Hi again.  I'm trying to make a query-like widget that pops up a 
> results window based on a point OR a rectangular selection on the 
> map.  The Query widget seems to handle the point by just opening up a 
> new window and passing it the values in the form variables 
> MAP_CURSOR_POS_X and MAP_CURSOR_POS_Y.  I've been doing my newbie best 
> to sift through the code and find out how the corner coord. of that 
> DHTML rubber-band box gets translated into form variables before the 
> form is submitted by something like ZoomIn, but to no avail.  Can 
> anyone tell me how one accesses both coordinate pairs for a 
> rubber-band box with JavaScript?
> -Ken-ichi
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon

More information about the Chameleon mailing list