Hi everyone, this is my first time posting.  

I'm running a PostGIS database that uses GeoServer to display a table, and I
have a WFS layer that retrieves the GeoServer layer and displays an
openlayers popup with some attributes.  When I update the value of the
attributes from my PostGIS database, I don't see the attributes updated in
the popup, and my attribute-based styles don't update.  They only update
when I refresh the page.  I've tried using the layer events featuremodified
and afterfeaturemodified with some alert statements, but I can't even see
the alerts.

Here's a simplified version of my code:
// my WFS layer
var intxnLayer = new OpenLayers.Layer.WFS(
"Intersections", mapUrl+"/geoserver/wfs",
{typename: 'rose:intersectionview'}, {
    featureNS: 'http://www.openplans.org/rose',
    extractAttributes: true,
    styleMap:''
}
);

// events on the WFS layer
    intxnLayer.events.on({
        "featureselected": function(e) {
            popup = new OpenLayers.Popup.FramedCloud("Popup_I" +
e.feature.attributes.id,
                e.feature.geometry.getBounds().getCenterLonLat(),
                new OpenLayers.Size(250,75),
                "<div style='font-size:small'>" + e.feature.attributes.id +
": " 
                + e.feature.attributes.name + "</div>",
                e.feature.marker, true);
            roseMap.addPopup(popup);
        },
        "featuremodified": function(o) {
            alert("featuremodified");
        },
        "afterfeaturemodified": function(e) {
            alert ("afterfeaturemodified");
        },        
        "featureunselected": function(e) {}
    });

Could someone please offer some advice?  I've searched the forums and other
sites without any success.  My manager's been waiting for this code and I've
been struggling for a few days now. 

Thanks in advance,
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/How-to-Update-Attribute-Based-Style-and-Popup-Contents-On-Attribute-Change-tp5543708p5543708.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to