code: function (elem, event) {
              var self = this;
              if (elem === undefined) return;
  
              /* Handle tooltip position update */
              if (elem.options.tooltip !== undefined) {
                  var mouseX = event.pageX;
                  var mouseY = event.pageY;
  
                  var offsetLeft = 10;
                  var offsetTop = 20;
                  if (typeof elem.options.tooltip.offset === "object") {
                      if (typeof elem.options.tooltip.offset.left !== "undefined") {
                          offsetLeft = elem.options.tooltip.offset.left;
                      }
                      if (typeof elem.options.tooltip.offset.top !== "undefined") {
                          offsetTop = elem.options.tooltip.offset.top;
                      }
                  }
  
                  var tooltipPosition = {
                      "left": Math.min(self.$map.width() - self.$tooltip.outerWidth() - 5,
                                       mouseX - self.$map.offset().left + offsetLeft),
                      "top": Math.min(self.$map.height() - self.$tooltip.outerHeight() - 5,
                                      mouseY - self.$map.offset().top + offsetTop)
                  };
  
                  if (typeof elem.options.tooltip.overflow === "object") {
                      if (elem.options.tooltip.overflow.right === true) {
                          tooltipPosition.left = mouseX - self.$map.offset().left + 10;
                      }
                      if (elem.options.tooltip.overflow.bottom === true) {
                          tooltipPosition.top = mouseY - self.$map.offset().top + 20;
                      }
                  }
  
                  self.$tooltip.css(tooltipPosition);
              }
          }
docs: /*
  Set the behaviour when mouse moves in element ("mousemove" event)
  @param elem the map element