[OpenLayers-Dev] Re: Advice on best way to extend a OL class.

Fabian Patzke 2 listensammler at patzi.de
Mon Nov 14 06:29:27 EST 2011


If I need an extra function on any OL class, I simply extend it in an extra
JS file that is loaded after the OL ones.

In your case that should be like this:

OpenLayers.Geometry.LinearRing.prototype.swapXY = function(){
    //... your code
};

That should work as well and is as I think.

Greetings,
Fabian

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Advice-on-best-way-to-extend-a-OL-class-tp6980129p6992145.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.


More information about the Dev mailing list