Take the 2-minute tour ×

Is it possible to get the total number of objects (Lines,Points) at a given pixel position in the map?

share|improve this question

1 Answer 1

You can create Point geometry from given pixel position and calculate number of other geometries of layer's features which intersects this one. See OpenLayers.Geometry.Point.intersects method.

share|improve this answer
But I think this function only determines if the two geometries intersects..I would like to get all the overlapped features at pixel position because SelectFeature only gets the topmost object..There is a function getObjectsAt(x, y) in nokia maps api which returns an array with all the overlapped objects at that pixel position. Do we have something similar in openlayers? –  user9685 Aug 28 '12 at 13:07

Your Answer


