Instance Method


Returns an array of overlays at a given point on the webpage.


mapkit.Overlay[] overlaysAtPoint(DOMPoint point);



A point in the page's coordinate system, such as new DOMPoint(event.pageX, event.pageY) when handling a mouse event.

Return Value

Returns an array of overlays. If there are no overlays at the point, the array is empty.


If the point is above an overlay fill or stroke, the overlay is returned. Overlays are returned in the order they are displayed, with the first overlay in the array closest to the background, and the last overlay closest to the foreground.

Similar to overlay selection events, this method considers the overlay's style at the point.

For example, the following cases do not return an overlay:

  • The point is on an overlay's fill, but the fill color is null.

  • The point is on an overlay's stroke, but the stroke color is null.

  • The point is on an overlay's stroke, but the line width is 0.

Opacity is not considered and can have any value. For example, if the point is on an overlay whose opacity is set to 0, that overlay is returned.

See Also

Adding and Removing Overlays


An array of all of the map's overlays.


The overlay on the map that is selected.


Adds an overlay to the map.


Adds multiple overlays to the map.


Removes an overlay from the map.


Removes multiple overlays from the map.


Returns the topmost overlay at a given point on the webpage.