I'm using Openlayers 2 with Gmaps and a vector layer to display features with icons.
I'm using this code to set the icons on the features:
feature.style = {
externalGraphic : iconUrl,
graphicWidth : 30,
graphicHeight : 20,
fillOpacity : 1
};
The problem is that I'm using the same icons in the site with css sprites and it would better to use them with openlayers rather than requesting the same icons from the server.
So I'm looking for a way to give each feautre a css class rather than a url for the icon.