[Chameleon] query normal widget and query custom widget in
different widgets
Julien-Samuel Lacroix
jlacroix at mapgears.com
Mon Dec 24 12:48:07 EST 2007
Hi,
The query widget use special query function to interact with the map
instead of bein based on the NavTool class like ofther navigation tools.
It uses javascript functions define in the Query.widget.php file to
trap the mousemove and mouseclick javascript events. You can change that
in your custom widget, no problem...until the MapDHTML widget. The
MapDHTML widget check for the QUERY NAV_CMD. This is hardcoded. So if
you want your own custom query widget, you will have to modify the
MapDHTML too, to add your own NAV_CMD in there too (Check the
MapDHTML.js file as well as the MapDHTML.widget.php file).
That's what I meant by not possible out-of-the-box.
Julien
Alexys Herleym Rodriguez Avellaneda wrote:
> Thanks Samuel, and thanks for the short time in the answer.
>
> I will try to do your two suggest: variable, and brand new based on
> querybyshape widget
>
> But i have another question, i am trying to change all names in query2
> (brand new widget based on query, similar logical, but diferent names to
> normal query), i am changing javascript functions, etc. What is exactly
> the reason to this answer:
> -You can't have 2 query widget on the same page (or one query and
> one copy of the query)
> - No it's not possible out-of-the-box.
>
> There are something especial en query widget that only can exist one time.
>
> Thanks for your answer.
>
> Alexys H
>
> ----- Mensaje original ----
> De: Julien-Samuel Lacroix <jlacroix at mapgears.com>
> Para: Alexys Herleym Rodriguez Avellaneda <alexys_6 at yahoo.es>
> CC: chameleon <chameleon at lists.maptools.org>
> Enviado: viernes, 21 de diciembre, 2007 16:08:32
> Asunto: Re: [Chameleon] query normal widget and query custom widget in
> different widgets
>
> Hi,
>
> No it's not possible out-of-the-box. What I may suggest to you is to use
> your query2 widget you created earlier. This new widget will do exactly
> the same thing as the normal query. However, it will set a special
> variable when you will click on the button (via JavaScript). Then with
> your myOnQuery function (see
> http://chameleon-tiki.maptools.org/tiki-index.php?page=QueryWidgetCustomizingResults
>
> ) you will check for this variable. If it is set, you will only open
> your custom popup.
>
> Your other choice is to create yourself a brand new widget (See the
> QueryByShape widget).
>
> Julien
>
>
> Alexys Herleym Rodriguez Avellaneda wrote:
> > Thanks Samuel, i follow this document
> > (_QueryWidgetCustomizingResults_). I can show in one button only the
> > normal query (popupresults = true in the CWC2 for query widget), and i
> > can show the two querys (normal and custom) with popupresults = false in
> > the CWC2 for query widget.
> >
> > My question is can i put another button with the custom query only? (it
> > is possible in the same query widget?). I need to have two buttons,
> > first with normal query, and second with de custom query only.
> >
> > Thanks Samuel.
> >
> > Alexys H
> >
> >
> > ----- Mensaje original ----
> > De: Julien-Samuel Lacroix <jlacroix at mapgears.com
> <mailto:jlacroix at mapgears.com>>
> > Para: Alexys Herleym Rodriguez Avellaneda <alexys_6 at yahoo.es
> <mailto:alexys_6 at yahoo.es>>
> > CC: chameleon <chameleon at lists.maptools.org
> <mailto:chameleon at lists.maptools.org>>
> > Enviado: viernes, 21 de diciembre, 2007 15:17:46
> > Asunto: Re: [Chameleon] query normal widget and query custom widget in
> > different widgets
> >
> > Hi,
> >
> > You can't have 2 query widget on the same page (or one query and one
> > copy of the query) because of the javascript function calls. To make
> > your custom query see:
> >
> http://chameleon-tiki.maptools.org/tiki-index.php?page=QueryWidgetCustomizingResults
> >
> > Julien
> >
> > Alexys Herleym Rodriguez Avellaneda wrote:
> > > Hi,
> > >
> > > I wish mery cristsmas for all.
> > >
> > > I want to do a copy (query2) of the query widget, for to do a custom
> > > query widget. When i run the query2 and delete que normal query
> widget,
> > > my custom work fine, but when the two widgets (query normal, and
> > > query2) exist (are together in chamaleon widgets folder), the query2
> > > send the popup window from query normal. How can i have the normal
> > > widget working (i.e in button 1) at the same time that que query
> > > custom (i.e. in button 2).
> > >
> > > The option popupresults="false" is limited, i need to show the next 3
> > > options: only normal query (already exist), only custom query
> (exist?),
> > > custom and normal (already exist).
> > >
> > > If the second option doesn't exist, the solution is create a query2
> > widget?
> > >
> > > Thanks.
> > >
> > > Alexys H
> > >
> > > this is the cwc2 code for call to query and query2, in the same
> project:
> > >
> > >
> > >
> > > <td><cwc2 type="Query" visible="true" imagetip="Mostrar
> > > Informacion" PopupWidth="500" PopupHeight="600" Toolbar="false"
> > > Status="false" Menubar="false" RADIUS="3" MAXFEATURES="5"
> > > image="icons/icon_query.png" toolset="Navigation"
> > > styleresource="NavButtons" popupstyleresource="TextButtons"
> > > highlightresults="false" popupresults="true" allowrectangle="true"
> > > persistentresults="true" submitpage="false">
> > > <image state="normal"/>
> > > <image state="hover"/>
> > > <image state="selected"/>
> > > </cwc2></td>
> > > <td><cwc2 type="Query2" visible="true" imagetip="Consulta
> Fedegan"
> > > PopupWidth="500" PopupHeight="600" Toolbar="false" Status="false"
> > > Menubar="false" RADIUS="3" MAXFEATURES="5"
> image="icons/icon_query.png"
> > > toolset="Navigation" styleresource="NavButtons"
> > > popupstyleresource="TextButtons" highlightresults="true"
> > > popupresults="false" allowrectangle="false" persistentresults="true"
> > > submitpage="true">
> > > <image state="normal"/>
> > > <image state="hover"/>
> > > <image state="selected"/>
> > > </cwc2></td>
> > >
> > >
> > >
> > >
> ------------------------------------------------------------------------
> > >
> > > ¿Chef por primera vez? - Sé un mejor Cocinillas.
> > > Entra en Yahoo! Respuestas
> > >
> >
> <http://es.rd.yahoo.com/evt:51361/*http://es.answers.yahoo.com/dir/index;_ylc=X3oDMTE4ZWhyZjU0BF9TAzIxMTQ3MTQzMjIEc2VjA0Jhbm5lcgRzbGsDQWNxdWlzaXRpb24-?link=over&sid=396545367
> <http://es.rd.yahoo.com/evt:51361/*http://es.answers.yahoo.com/dir/index;_ylc=X3oDMTE4ZWhyZjU0BF9TAzIxMTQ3MTQzMjIEc2VjA0Jhbm5lcgRzbGsDQWNxdWlzaXRpb24-?link=over&sid=396545367>
>
> >
> <http://es.rd.yahoo.com/evt:51361/*http://es.answers.yahoo.com/dir/index;_ylc=X3oDMTE4ZWhyZjU0BF9TAzIxMTQ3MTQzMjIEc2VjA0Jhbm5lcgRzbGsDQWNxdWlzaXRpb24-?link=over&sid=396545367
> <http://es.rd.yahoo.com/evt:51361/*http://es.answers.yahoo.com/dir/index;_ylc=X3oDMTE4ZWhyZjU0BF9TAzIxMTQ3MTQzMjIEc2VjA0Jhbm5lcgRzbGsDQWNxdWlzaXRpb24-?link=over&sid=396545367>>>.
> > >
> > >
> > >
> ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > Chameleon mailing list
> > > Chameleon at lists.maptools.org <mailto:Chameleon at lists.maptools.org>
> <mailto:Chameleon at lists.maptools.org <mailto:Chameleon at lists.maptools.org>>
> > > http://lists.maptools.org/mailman/listinfo/chameleon
> >
> > --
> > Julien-Samuel Lacroix
> > Mapgears
> > http://www.mapgears.com/
> >
> >
> > ------------------------------------------------------------------------
> >
> > ¿Chef por primera vez? - Sé un mejor Cocinillas.
> > Entra en Yahoo! Respuestas
> >
> <http://es.rd.yahoo.com/evt:51361/*http://es.answers.yahoo.com/dir/index;_ylc=X3oDMTE4ZWhyZjU0BF9TAzIxMTQ3MTQzMjIEc2VjA0Jhbm5lcgRzbGsDQWNxdWlzaXRpb24-?link=over&sid=396545367
> <http://es.rd.yahoo.com/evt:51361/*http://es.answers.yahoo.com/dir/index;_ylc=X3oDMTE4ZWhyZjU0BF9TAzIxMTQ3MTQzMjIEc2VjA0Jhbm5lcgRzbGsDQWNxdWlzaXRpb24-?link=over&sid=396545367>>.
>
> --
> Julien-Samuel Lacroix
> Mapgears
> http://www.mapgears.com/
>
>
> ------------------------------------------------------------------------
>
> ¿Chef por primera vez? - Sé un mejor Cocinillas.
> Entra en Yahoo! Respuestas
> <http://es.rd.yahoo.com/evt:51361/*http://es.answers.yahoo.com/dir/index;_ylc=X3oDMTE4ZWhyZjU0BF9TAzIxMTQ3MTQzMjIEc2VjA0Jhbm5lcgRzbGsDQWNxdWlzaXRpb24-?link=over&sid=396545367>.
--
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/
More information about the Chameleon
mailing list