[Users] Add WFS to map and ClickableFeatures

Moen Endre endre.moen at imr.no
Tue Aug 11 09:00:47 CEST 2015


This should be supported out of the box from geoexplorer (I think the code is in gxp). What version of geoexplorer are you using?

If you add the layers with the composer constructor which begins with:
var app = new GeoExplorer.Composer({ …
                    layers: [
                    {
                                   source: "ol",
                                   type: "OpenLayers.Layer.WMS",
…

You can add queryable: true to enable WFS, and it should be available in the “get feature info” button in the toolbar.

Or you can add it when creating the layer with gxp.plugins.OLSource.prototype.createLayerRecord({source: "ol", ...})

-Endre

From: users-bounces at geoext.org [mailto:users-bounces at geoext.org] On Behalf Of pablo zader
Sent: 11. august 2015 08:03
To: Users at geoext.org
Subject: [Users] Add WFS to map and ClickableFeatures

Hi list
I am working with Geoexplorer (GXP + Openlayers + GeoExt) and need add WFS layer to Map. how can I do it?
What I really need is to load a WFS layer and select a feature with the mouse.

I am trying with this code. but can't add to map:

var WFSgeoDB=new OpenLayers.Layer.Vector("WFS", {
               strategies: [new OpenLayers.Strategy.BBOX()],
               protocol: new OpenLayers.Protocol.WFS.v1_1_0({
                 url: "http://localhost:8080/services/WFSgeoDB",
                 featureType: "streets",
                 featureNS: "http://www.deegree.org/app",
                 featurePrefix: "app",
                 geometryName: "road"
               })
             });

Then I discovered this class: gxp.plugins.ClickableFeatures (http://horizon.boundlessgeo.com/opengeo-docs/sdk-api/lib/plugins/ClickableFeatures.html)
 , but not how to use it. You can serve this class for what I want? someone could give some example of its use?


Thanks in advanced

Pablo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20150811/02937704/attachment.htm 


More information about the Users mailing list