[GIS] OpenLayers featureclick event does not work with named graphic (graphicName)

eventsfeaturesopenlayers-2

OpenLayers 2.13. (and 2.13.1) I have been trying to make featureclick event working with vector layers and named graphic features. It works with externalGraphic, but not named graphic (graphicName: …).

Although it does work in IE8, but not IE9, IE10 or IE11. Does not work in FF and Chrome neither. See this example: http://jsfiddle.net/rwgHY/

The triangle is a named graphic feature and clicking it does not do anything (this is the problem). The marker is a PNG graphic (external graphic) and when clicked, the event is triggered and the alert shown.

The event is hooked on the map level. Features are placed on two different vector layers.

I've been looking for solutions on the net, but did not find anything. Is it something silly I am missing here?

Best Answer

You found a bug. I created a pull request with a fix.