code: function(geometry, style, featureId) {
          var img = new Image();
  
          var title = style.title || style.graphicTitle;        
          if (title) {
              img.title = title;           
          }
  
          var width = style.graphicWidth || style.graphicHeight;
          var height = style.graphicHeight || style.graphicWidth;
          width = width ? width : style.pointRadius * 2;
          height = height ? height : style.pointRadius * 2;
          var xOffset = (style.graphicXOffset != undefined) ?
             style.graphicXOffset : -(0.5 * width);
          var yOffset = (style.graphicYOffset != undefined) ?
             style.graphicYOffset : -(0.5 * height);
  
          var opacity = style.graphicOpacity || style.fillOpacity;
          
          var onLoad = function() {
              if(!this.features[featureId]) {
                  return;
              }
              var pt = this.getLocalXY(geometry);
              var p0 = pt[0];
              var p1 = pt[1];
              if(!isNaN(p0) && !isNaN(p1)) {
                  var x = (p0 + xOffset) | 0;
                  var y = (p1 + yOffset) | 0;
                  var canvas = this.canvas;
                  canvas.globalAlpha = opacity;
                  var factor = OpenLayers.Renderer.Canvas.drawImageScaleFactor ||
                      (OpenLayers.Renderer.Canvas.drawImageScaleFactor =
                          /android 2.1/.test(navigator.userAgent.toLowerCase()) ?
                              // 320 is the screen width of the G1 phone, for
                              // which drawImage works out of the box.
                              320 / window.screen.width : 1
                      );
                  canvas.drawImage(
                      img, x*factor, y*factor, width*factor, height*factor
                  );
                  if (this.hitDetection) {
                      this.setHitContextStyle("fill", featureId);
                      this.hitContext.fillRect(x, y, width, height);
                  }
              }
          };
  
          img.onload = OpenLayers.Function.bind(onLoad, this);
          img.src = style.externalGraphic;
      }
docs: Method: drawExternalGraphic
  Called to draw External graphics.
  
  Parameters:
  geometry - {<OpenLayers.Geometry>}
  style    - {Object}
  featureId - {String}