[OpenLayers-Users] Problems with selectControl after upgrading from
OL 2.6 to 2.7
Zer
zer_matt at hotmail.com
Thu Jan 15 10:43:54 EST 2009
Dear List,
In OL 2.6 this code worked just fine. After upgrading to OL 2.7 I have some
problems:
1. When loading the page, I get an error (‘selectControl.handler is null’)
on this row ‘selectControl.handler.stopDown = false;’, so I tried to removed
the lines…
2. Now the ‘onSelect’ never gets called. However, if I remove the
activate-function, the onSelect gets called. But I need to do something
every time the control is activated. Does anyone know what the problem could
be?
Thanks,
Z
var selectOptions =
{
hover :false,
toggle :true,
multiple :true,
activate : function()
{
OpenLayers.Control.prototype.activate.apply(this, arguments);
//here I call a function to do some initiation;
},
deactivate : function()
{
OpenLayers.Control.prototype.deactivate.apply(this,arguments);
},
onSelect : function(feature)
{
// here I call a function
},
onUnselect : function(feature)
{
// here I call a function
}
};
var selectControl = new
OpenLayers.Control.SelectFeature(wfsTeLayer,selectOptions);
map.addControl(selectControl);
selectControl.handler.stopDown = false;
selectControl.handler.stopUp = false;
--
View this message in context: http://n2.nabble.com/Problems-with-selectControl-after-upgrading-from-OL-2.6-to-2.7-tp2163130p2163130.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list