Suport for tooltips on externalGraphics using the graphicTitle

symbolizer property. Only supported in IE and FF. Patch by zspitzer, 
modified by me (added some docs, moved code that sets the title tag so 
it gets executed for externalGraphics. p=zspitzer, r=me (closes #1946)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@9097 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2009-03-19 18:53:15 +00:00
parent e49f1435bc
commit 567d32f35f
5 changed files with 14 additions and 1 deletions

View File

@@ -190,6 +190,10 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, {
drawExternalGraphic: function(pt, style) {
var img = new Image();
img.src = style.externalGraphic;
if(style.graphicTitle) {
img.title=style.graphicTitle;
}
var width = style.graphicWidth || style.graphicHeight;
var height = style.graphicHeight || style.graphicWidth;