Hi,

simple question: How can I overwrite specific functions? For example, I would like to overwrite OpenLayers.Control.SelectFeature.downfeature() with my own function. Here's what I tried:
--
OpenLayers.Control.SelectFeature.downFeature = function(feature){
alert('Overwritten!');
};
map = new OpenLayers.Map('map', {controls: []});
mySelect = new OpenLayers.Control.SelectFeature(vectors, {onSelect: serialize, onUnselect: deselect,multiple: true});
map.addControl(mySelect);
--
doesn't work, second try:
--
map = new OpenLayers.Map('map', {controls: []});
mySelect = new OpenLayers.Control.SelectFeature(vectors, {onSelect: serialize, onUnselect: deselect,multiple: true});
mySelect.downFeature = function(feature){
alert('Overwritten!');
};
map.addControl(mySelect);
--

Doesn't work, too. I think I just don't see the beginners mistake...

Thanks,

Kevin.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

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

Reply via email to