[OpenLayers-Dev] SelectFeature outFeature method
scottseeker
scottseeker at gmail.com
Fri Jul 13 06:50:16 PDT 2012
Since I could not find the actual solution this problem and have fixed it my
own way I will post it incase it helps anyone else.
Version: Openlayers 2.11
In OpenLayers.Control.SelectFeature, I changed the out outFeature method as
follows:
outFeature: function(feature) {
if(this.hover) {
if(this.highlightOnly)
{
// we do nothing if we're not the last highlighter of the
// feature
if(feature._lastHighlighter == this.id)
{
// if another select control had highlighted the feature
before
// we did it ourself then we use that control to
highlight the
// feature as it was before we highlighted it, else we
just
// unhighlight it
if(feature._prevHighlighter &&
feature._prevHighlighter != this.id)
{
delete feature._lastHighlighter;
var control = this.map.getControl(
feature._prevHighlighter);
if(control) {
control.highlight(feature);
// THIS IS ADDED BY ME
this.events.triggerEvent("featureunhighlighted",
{feature : feature});
}
} else {
this.unhighlight(feature);
}
} else {
// THIS IS ELSE BLOCK AND TRIGGER CALL ADDED BY ME
this.events.triggerEvent("featureunhighlighted", {feature :
feature}); ;
}
} else {
this.unselect(feature);
}
}
},
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/SelectFeature-outFeature-method-tp3890333p4988237.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.
More information about the Dev
mailing list