The changes of http://trac.openlayers.org/changeset/5158 are breaking the VML renderer for externalGraphic:
- A border will be rendered around the image.
- Opacity does not render correctly any more. A semi-opaque white rectangle will appear around the image if an opacity different than 1 is specified.
If vector-features.html.patch is applied to the trunk, this behaviour can be seen in the "vector-features.html" example.
The attached patch "Renderer.diff" fixes this issue, along with a minor performance improvement and code cleanup. Renderer/Elements, Renderer/VML and Renderer/SVG are affected:
- Changed the getNodeType method: added second parameter "style", because the node type can be different depending on styles (if externalGraphic is specified, the node type will be different than in plain points).
- The above change enables us to remove the code in Renderer/VML and Renderer/SVG that overwrites the existing node in the setStyle method when an externalGraphic style is specified.
- Added a new method postDraw. Only Renderer/VML implements this method. It compares the fillcolor and strokecolor attributes of the rendered node to the requested style. If those differ, they will be set again. This fixes the second issue described above.
- In Renderer/VML.js, options.isStroked is set to false for nodes with an externalGraphic style instead of setting style.strokecolor to "none". This fixes the first issue described above.