code: function (position) {
          var center = new OpenLayers.LonLat(
              position.coords.longitude,
              position.coords.latitude
          ).transform(
              new OpenLayers.Projection("EPSG:4326"),
              this.map.getProjectionObject()
          );
          if (this.bind) {
              this.map.setCenter(center);
          }
          this.events.triggerEvent("locationupdated", {
              position: position,
              point: new OpenLayers.Geometry.Point(
                  center.lon, center.lat
              )
          });
      }
docs: Method: geolocate
  Activates the control.