Canvas issue with externalGraphic

vector, feature, selecting, selection, advanced, canvas, externalGraphic

This example demonstrates an issue when using the Canvas renderer with externalGraphic elements.


The 3 pins on top are using externalGraphic, while those at the bottom use the default rendering method. Use Canvas renderer to reproduce the issue. Click on any number of features to select them, then click out. You should see the issue appear. If you pan the map then, the issue disapear.

To change renderer, click on the according link: Canvas, SVG or VML.

Tested on Chrome, Firefox and IE9, with OpenLayers 2.12, 2.13 and 2.13.1. All show the issue.


Below is what the issue looks like. On the left, all features are selected. On the right, right after unselecting all features, the issue is shown.

Select Select

Workaround

See a workaround to avoid this.

Fix

Xavier Mamano proposed a fix that was tested and works. It was merged in OpenLayers master branch. See the two according pull requests 1092 1096 on GitHub.