I want to add some functions inside a existent class in OpenLayers. For example, I want to add function A() and B() and a variable C inside OpenLayers.Layer.Vector.
var X = function() {
A() = funtion { /* something */ },
B() = funtion { /* something */ },
C = 'something'
}
So when I create a new layer inside a map object I could call those function by:
map.layer[1].A();
or could change:
map.layer[1].C = 'something else';
I tried many ways but didn't worked well. And most of the time, when I tried to change the C var inside one layer it changed the other too.