[OpenLayers-Users] WFS Layers, Markers, Popups

Arnd Wippermann arnd.wippermann at web.de
Mon Oct 27 12:59:29 EDT 2008


you can use a select control for the wfs layer. 
 
http://openlayers.org/dev/examples/select-feature-openpopup.html
 
If you have load the wfs layer with extractAttributes: true, then your wfs
data are saved in the attributes of the features.
 
Arnd Wippermann
 
  _____  

Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Indika Tantrigoda
Gesendet: Montag, 27. Oktober 2008 16:17
An: OpenLayers users mailing list
Betreff: [OpenLayers-Users] WFS Layers, Markers, Popups


Hi,
I have a wfs layer that displays points on my map, using markers.
I would like to have a popup that displays data regarding the point which
would get activated for a click event.

I tried the following but, it seems to return all the data regarding the wfs
layer, not the single point, irrespective of
where I click on the map.

 wfs_cities.events.register('click', map, function (e) {
                document.getElementById('nodelist').innerHTML = "Loading...
please wait...";
                var url =  map.layers[2].getFullRequestString(
                    {
                        REQUEST: "GetFeature",
                        EXCEPTIONS: "application/vnd.ogc.se_xml",
                        BBOX: map.getExtent().toBBOX(),
                        X: e.xy.x,
                        Y: e.xy.y,
                        INFO_FORMAT: 'text/html',
                        QUERY_LAYERS: map.layers[2].params.LAYERS,
                        FEATURE_COUNT: 50,
                        WIDTH: map.size.w,
                        HEIGHT: map.size.h
                    },
                    "http://localhost:8080/geoserver/wfs"
                );

Any ideas how I can get around this ?

Thanks in advance.

Regards,
Indika

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081027/9f658853/attachment.html


More information about the Users mailing list