[Chameleon] Custom Query Widget
Paul Spencer
pspencer at dmsolutions.ca
Thu Jan 13 07:43:46 EST 2005
Eric,
I assume you are willing to write a widget for this, or modify an
existing one. There are a couple of widgets in Chameleon that do
something similar, i.e. they change the map obj while the app is
executing. The trick is mostly in timing, which is what widget
priorities are for :)
Note: Widgets are not supposed to use values gathered from ProcessURL
for drawing, they are supposed to wait until all widgets have finished
processing. There have been some bugs related to this that I have fixed
as they were found, but it is possible that some widgets are still
violating this principle.
So, your widget can be set to either the highest priority (it gets run
first) or lowest (it gets run last). Lowest will expose bugs related to
the note above, highest will avoid them.
My approach to this would be to have a highest priority widget, it can
do the query and then set the form variable used by the time widget. As
long as the new query widget runs before the time widget, you should be
fine. The time widget should see time coming in the various form
variables and update the layer sources as if the user had entered the
time themselves.
Don't know if that makes sense ... it does to me :)
Cheers,
Paul
Eric Bridger wrote:
> At the request of a user I struggled with this issue for quite a few
> days. Last night the reason for my failure suddenly came to me, so I'm
> posting to see if anyone has an alternative approach.
>
> The request: The project I'm working on uses a time stamp to filter most
> of the WMS and Postgis layers on the map. The user wanted a new query
> type tool which would allow him to click a symbol on the map, query the
> time stamp data behind the symbol, then use the returned results (a new
> time stamp) to reset the time stamp for the whole map.
>
> It finally came to me today (Chameleon of course hides a lot of the gory
> details) that this cannot be accomplished simply with Chameleon because:
> the map must be drawn (or created with the old filters) BEFORE any query
> can be executed. Then the map would have to be re-drawn or re-created
> with the new filter.
>
> In a pure mapscript application, this can be done. I.e. create the
> current map, i.e. set proper layers on, setFilters, zoom,etc. Execute
> the query, then create a new map, set new Filters, save the image.
>
> The question is whether this can be done in Chameleon? If so, any ideas
> on how to go about it?
>
> Eric
>
> P.S. Congrats on the 2.0 Release.
>
>
>
> _______________________________________________
> 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