Hi!

Thanks! That fixed my first probelem! 

But the 'onSelect' still doesn't get called, unless I remove the activate
function. Any ideas?

-Z



Eric Lemoine wrote:
> 
> Hi. Try:
> 
> control.handlers.feature.stopDown = false;
> 
> Cheers
> 
> Eric
> 
> 2009/1/15, Zer <[email protected]>:
>>
>> 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.
>>
>> _______________________________________________
>> Users mailing list
>> [email protected]
>> http://openlayers.org/mailman/listinfo/users
>>
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/Problems-with-OpenLayers.Control.SelectFeature-after-upgrading-from-OL-2.6-to-2.7-tp2163130p2164779.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to