Geolocation

@native @JSType
trait Geolocation extends Object

The Geolocation interface represents an object able to programmatically obtain the position of the device. It gives Web content access to the location of the device. This allows a Web site or app offer customized results based on the user's location.

class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

def clearWatch(watchId: Int): Unit

The Geolocation.clearWatch() method is used to unregister location/error monitoring handlers previously installed using Geolocation.watchPosition().

The Geolocation.clearWatch() method is used to unregister location/error monitoring handlers previously installed using Geolocation.watchPosition().

def getCurrentPosition(successCallback: Function1[Position, _], errorCallback: Function1[PositionError, _], options: PositionOptions): Unit
def getCurrentPosition(successCallback: Function1[Position, _]): Unit

The Geolocation.getCurrentPosition() method is used to get the current position of the device.

The Geolocation.getCurrentPosition() method is used to get the current position of the device.

def watchPosition(successCallback: Function1[Position, _], errorCallback: Function1[PositionError, _], options: PositionOptions): Int

The Geolocation.watchPosition() method is used to register a handler function that will be called automatically each time the position of the device changes. You can also, optionally, specify an error handling callback function.

The Geolocation.watchPosition() method is used to register a handler function that will be called automatically each time the position of the device changes. You can also, optionally, specify an error handling callback function.

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from:
Object
def isPrototypeOf(v: Object): Boolean
Inherited from:
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from:
Object
def toLocaleString(): String
Inherited from:
Object
def valueOf(): Any
Inherited from:
Object