Class Geolocation

java.lang.Object
org.loboevolution.js.AbstractScriptableDelegate
org.loboevolution.html.js.geolocation.Geolocation
All Implemented Interfaces:
ScriptableDelegate

public class Geolocation extends AbstractScriptableDelegate

The Geolocation class provides Java implementation of the "Geolocation Interface" as detailed out in the W3C Specifications ( http://www.w3.org/TR/geolocation-API/#geolocation_interface).

Note: This class must not have any sub-classes to ensure W3C Specifications are being strictly followed by the system or application that uses this geolocation package.

  • Constructor Details

    • Geolocation

      public Geolocation(WindowImpl window)

      Constructor for Geolocation.

      Parameters:
      window - a Window object.
  • Method Details

    • getCurrentPosition

      public void getCurrentPosition(Function success) throws Exception

      getCurrentPosition.

      Parameters:
      success - a Function object.
      Throws:
      Exception - if any.
    • getCurrentPosition

      public void getCurrentPosition(Function success, Function error)

      getCurrentPosition.

      Parameters:
      success - a Function object.
      error - a Function object.
    • watchPosition

      public long watchPosition(Function success)

      watchPosition.

      Parameters:
      success - a Function object.
      Returns:
      a long.
    • watchPosition

      public long watchPosition(Function success, Function error)

      watchPosition.

      Parameters:
      success - a Function object.
      error - a Function object.
      Returns:
      a long.