[Users] insert a map in a tree node

Eric Lemoine eric.lemoine at camptocamp.com
Wed Aug 19 13:26:33 CEST 2009


2009/8/18 ivan marchesini <ivan.marchesini at gmail.com>:
> Hi Eric and others,
>
>> <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 suggested I have tested this code:
> ________________________________
>
>        var styleMap = new OpenLayers.StyleMap(OpenLayers.Util.applyDefaults(
>                  {fillColor: "green", fillOpacity: 1, strokeColor: "black"},
>                  OpenLayers.Feature.Vector.style["default"]));
>
>
>        var formPanel = new GeoExt.form.FormPanel({
>                //renderTo: "formpanel",
>                region: 'south',
>                width: 600,
>                height: 75,
>                protocol: new OpenLayers.Protocol.WFS({
>                        url: "http://geoserver.irpi.cnr.it/geoserver/wfs",
>                        featureType: "peric_tem",
>                        featureNS: "http://geoserver.irpi.cnr.it/geoserver/irpi" }),

Try adding featurePrefix:"irpi" in the protocol options.

-- 
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