[OpenLayers-Dev] SelectFeature outFeature method

Denis Rykov rykovd at gmail.com
Fri Jul 29 06:22:35 EDT 2011


Hi!

I have two SelectFeature control on my map:

#1
var sfbm = new OpenLayers.Control.SelectFeature(
                map_vector_layer, {hover: true,
                               highlightOnly: true,
                               geometryTypes:
["OpenLayers.Geometry.Polygon", "OpenLayers.Geometry.MultiPolygon"],
                               eventListeners: {
                                   featurehighlighted:   showTooltip,
                                   featureunhighlighted: hideTooltip
                               }
            });

#2
var sfbm2 = new OpenLayers.Control.SelectFeature(
                map_vector_layer, {hover: false,
                               onSelect: function(f) {
                                   updateTable();
                               }
            });

I've faced with following issue. If I highlight feature by first
control and then select this feature by second control and move cursor
out - featureunhighlighted event not fired.
I've tryed to analyze source code and found outFeature() method of
control which contains string "control.highlight(feature);"  I guess
it is cause my problem. Please explain me - what is purpose of this
instruction and how I can solve my problem. Thanks!


More information about the Dev mailing list