[OpenLayers-Users] possible issue in wfs markers...

Christopher Schmidt crschmidt at metacarta.com
Tue Apr 10 19:28:33 EDT 2007


On Tue, Apr 10, 2007 at 06:59:20PM -0400, Stephen Woodbridge wrote:
> Erik,
> 
> I just updated my copy of trunk, but I seem to have another problem 
> unrelated to John's where the hover over the features is no longer 
> displaying the feature.attributes. I don't know when this broke, but it 
> was working after the 2.4 merge was integrated into the trunk.
> 
> http://imaptools.com/ld-testv.html
> click the link for Algers, DZ and hovering over any of the orange 
> feature circles should display the attributes on the left side of the page.

geometry no longer has a feature property. openmnnd demo has been
updated. You probably need something like:

        function feature_info_hover(feature) {
            if (displayedFeature != feature && 
               (!feature.layer.selectedFeatures.length || 
               (feature.layer.selectedFeatures[0] == feature))) {
            feature_info(feature);
            displayedFeature = feature;
           }
        }    
        function feature_info(feature) {
            var html = "<ul>";
            for(var i in feature.attributes)
               html += "<li><b>" + i + "</b>: "+  feature.attributes[i]
+ "</li>";
            html += "</ul>";
            $('feature_info').innerHTML = html;
        }

To do what you were doing before. 

-- Chris



More information about the Users mailing list