[Chameleon] popup from rectangle

Paul Spencer pspencer at dmsolutions.ca
Sat Nov 20 09:36:18 EST 2004


this is one of the things that I would like to fix.  For now, you have 
to manually edit MapDHTML.js.  Search for QUERY (upper case), you should 
see it in three places as part of a large if() structure ... and the 
name that your widget puts in NAV_CMD into this if structure to make 
MapDHTML avoid submitting for your widget.

In the near future, I will be rethinking how this works to make it the 
responsibility of the widget to submit the page instead of the MapDHTML



Ken-ichi wrote:
> 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
> 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
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon

|Paul Spencer                           pspencer at dmsolutions.ca   |
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|

More information about the Chameleon mailing list