docs: function(geometry, options) {
          var edge = !(options && options.edge === false);
          var details = edge && options && options.details;
          var distance, x0, y0, x1, y1, result;
          if(geometry instanceof OpenLayers.Geometry.Point) {
              x0 = this.x;
              y0 = this.y;
              x1 = geometry.x;
              y1 = geometry.y;
              distance = Math.sqrt(Math.pow(x0 - x1, 2) + Math.pow(y0 - y1, 2));
              result = !details ?
                  distance : {x0: x0, y0: y0, x1: x1, y1: y1, distance: distance};
          } else {
              result = geometry.distanceTo(this, options);
              if(details) {
                  // switch coord order since this geom is target
                  result = {
                      x0: result.x1, y0: result.y1,
                      x1: result.x0, y1: result.y0,
                      distance: result.distance
                  };
              }
          }
          return result;
      }