<br><br>On Sunday, November 13, 2011, Phil Scadden <<a href="mailto:p.scadden@gns.cri.nz">p.scadden@gns.cri.nz</a>> wrote:<br>><br>>> The "Strategy Cluster Extended" would be a good class extending<br>
>> example :<br>>><br>>> <a href="http://openlayers.org/dev/examples/strategy-cluster-extended.html">http://openlayers.org/dev/examples/strategy-cluster-extended.html</a><br>> Thanks for that. Still got a javascript issue though.<br>
><br>> Suppose I extend linearRing with the swapXY method - call it linearRingEx.<br>><br>> The code calling context though is:<br>> } else if (filter.type ===<br>> OpenLayers.Filter.Spatial.INTERSECTS) {<br>
> var geom = filter.value;<br>> transformGeometry(geom);<br>> geom.components[0].swapXY();<br>> params.cql_filter = 'INTERSECTS(SHAPE,'<br>
> + geom.toString() + ')';<br>><br>> To call the swapXY method, I need to somehow cast the geom object (a<br>> superclass) so that the linearRing descendent is of linearRingEx. I am<br>> struggling to see how to do this in JS.<br>
<br><br>Why can't you just have a swapXY function that takes a LinearRing as its 1st argument and modifies it in place? Sorry if I'm not understanding your issue.<br><br>-- <br>Eric Lemoine<br><br>Camptocamp France SAS<br>
Savoie Technolac, BP 352<br>73377 Le Bourget du Lac, Cedex<br><br>Tel : 00 33 4 79 44 44 96<br>Mail : <a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a><br><a href="http://www.camptocamp.com">http://www.camptocamp.com</a><br>
<br>