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

Phil Scadden p.scadden at gns.cri.nz
Wed Nov 9 19:29:19 EST 2011


With every release, I  patch linearRing.js to add a swapXY method. The 
reason for do it is pretty specialised - creating a polygon filter to 
use in ECQL through a protocol.script implementation. You need it if 
your application is running off a USB but want to do polygon filter on 
remote wfs server AND the native SRS is lat/long.

So, not likely that method is going to get into the main OL code. Better 
would be have code in my application that just extended it. What is best 
practise in JS for doing this? (I'm  a newcomer to this).
-- 
Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, 
Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.



More information about the Dev mailing list