[Users] insert a map in a tree node

Eric Lemoine eric.lemoine at camptocamp.com
Fri Aug 7 22:57:48 CEST 2009


On Friday, August 7, 2009, ivan marchesini <ivan.marchesini at gmail.com> wrote:
> Dear all geoext users,
> I have created this page (a lot of you well know this page  :-)
>
> http://alderaan.irpi.cnr.it/test_geoext/test_geoext9c.html
>
> I'm going to ask something about it...
>
> first of all:
>
> as you can see in the layer tree there are to folders (called "My Maps
> 1" and "My Maps 2").
> I have seen from tutorials that at the moment is not possible to filter
> the gc_overlaylayercontainer to obtain only some maps to put inside a
> folder.
> what a need to do is to include only some maps into the "My Maps *"
> folders...
> the question is:
> which is the code to insert openLayers layer into the tree node?
> I cant figure haw to obtain this simple task .. sorry...  :-(
> I have tryed with GeoExt.tree.LayerNode but with no success...
>
>
> second question:
>
> as you can see I have included the code to create a search form.
> I see from the post answer that the query is right..
> my next questions are:
> is it possible to put the result of the query into the map? i.e. to see
> only features resulting from the search?
> is there any example/documentation I can look at to understand how to
> obtain this...


<http://geoext.org/lib/GeoExt/widgets/form/FormPanel.html>

Register an actioncomplete listener on the form panel. The listener
receives in its second argument a reference to the search action,
which itself includes a reference to the OpenLayers.Protocol.Reponse
instance associated with the request. Example:

    listeners: {
        actioncomplete: function(form, action) {
            var features = action.response.features;
            layer.addFeatures(features);
        }
    }

Hope this helps,


>
> as you can understand the aims is to allow users to select the features
> by means of attributes columns.....
>
>
> many thanks...
>
> ivan
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> Ti prego di cercare di non inviarmi files .dwg, .doc, .xls, .ppt.
> Preferisco formati liberi.
> Please try to avoid to send me .dwg, .doc, .xls, .ppt files.
> I prefer free formats.
> http://it.wikipedia.org/wiki/Formato_aperto
> http://en.wikipedia.org/wiki/Open_format
>
> Ivan Marchesini
> Perugia (Italy)
> Socio fondatore GFOSS "Geospatial Free and Open Source Software" http://www.gfoss.it
> e-mail: marchesini at unipg.it
>         ivan.marchesini at gmail.com
> fax (home): +39(0)5782830887
> jabber: geoivan73 at jabber.org
> skype: geoivan73
>

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com


More information about the Users mailing list