[OpenLayers-Dev] Implement OpenLayers.Layer.Vector.getFeaturesByGeometryType method

Marc Jansen jansen at terrestris.de
Mon Aug 1 03:53:38 EDT 2011

Hi Denis,

I shared my thoughts already in the ticket.

One additional thought: If I read it right, your method expects to be
called with a string argument, right? Maybe it'd be good to also support
passing the constructor. You'd then need to check the type of the
argument and if it is a fucntion, do an instanceof check.

Maybe even better than any specific implementation would be a method
like "findFeaturesByFunc" (or so) that'd accept a method and optionally
a scope. We would call teh method with every feature and if the function
returned true, we'd add it to the foundFeatures array.

What would you think?


On 01.08.2011 01:27, Denis Rykov wrote:
> Hi!
> Could anyone review my first patch to OpenLayers:
> http://trac.osgeo.org/openlayers/ticket/3446. This method returns an
> array of features that have the given geometry type. I use this method
> very extensively and guess it may be useful for another users.
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20110801/5631eb41/attachment.html

More information about the Dev mailing list