public class JsGeolocation extends JsElementalMixinBase implements Geolocation
SVG_ZOOMANDPAN_DISABLE, SVG_ZOOMANDPAN_MAGNIFY, SVG_ZOOMANDPAN_UNKNOWN
Modifier | Constructor and Description |
---|---|
protected |
JsGeolocation() |
Modifier and Type | Method and Description |
---|---|
void |
clearWatch(int watchId)
When the
clearWatch() method is called, the watch() process stops calling for new position identifiers and cease invoking callbacks. |
void |
getCurrentPosition(PositionCallback successCallback)
Acquires the user's current position via a new position object.
|
void |
getCurrentPosition(PositionCallback successCallback,
PositionErrorCallback errorCallback)
Acquires the user's current position via a new position object.
|
int |
watchPosition(PositionCallback successCallback)
Similar to
getCurrentPosition() , except it continues to call the callback with updated position information periodically until clearWatch() is called. |
int |
watchPosition(PositionCallback successCallback,
PositionErrorCallback errorCallback)
Similar to
getCurrentPosition() , except it continues to call the callback with updated position information periodically until clearWatch() is called. |
addEventListener, addEventListener, beginElement, beginElementAt, dispatchEvent, endElement, endElementAt, getAnimatedClassName, getAnimatedHeight, getAnimatedHref, getAnimatedResult, getAnimatedTransform, getAnimatedWidth, getAnimatedX, getAnimatedY, getBBox, getChildElementCount, getCTM, getExternalResourcesRequired, getFarthestViewportElement, getFirstElementChild, getLastElementChild, getNearestViewportElement, getNextElementSibling, getPresentationAttribute, getPreserveAspectRatio, getPreviousElementSibling, getRequiredExtensions, getRequiredFeatures, getScreenCTM, getSvgStyle, getSystemLanguage, getTransformToElement, getViewBox, getXmllang, getXmlspace, getZoomAndPan, hasExtension, querySelector, querySelectorAll, removeEventListener, removeEventListener, setXmllang, setXmlspace, setZoomAndPan
at, at, intAt, intAt, length, numberAt, numberAt, setAt, setAt, setAt, setAt, setAt, setAt
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
intAt, length
numberAt
public final void clearWatch(int watchId)
Geolocation
clearWatch()
method is called, the watch()
process stops calling for new position identifiers and cease invoking callbacks.clearWatch
in interface Geolocation
public final void getCurrentPosition(PositionCallback successCallback)
Geolocation
Acquires the user's current position via a new position object. If this fails, errorCallback
is invoked with an nsIDOMGeoPositionError
argument.
successCallback
nsIDOMGeoPositionCallback
to be called when the current position is available.errorCallback
nsIDOMGeoPositionErrorCallback
that is called if an error occurs while retrieving the position; this parameter is optional.options
nsIDOMGeoPositionOptions
object specifying options; this parameter is optional.getCurrentPosition
in interface Geolocation
public final void getCurrentPosition(PositionCallback successCallback, PositionErrorCallback errorCallback)
Geolocation
Acquires the user's current position via a new position object. If this fails, errorCallback
is invoked with an nsIDOMGeoPositionError
argument.
successCallback
nsIDOMGeoPositionCallback
to be called when the current position is available.errorCallback
nsIDOMGeoPositionErrorCallback
that is called if an error occurs while retrieving the position; this parameter is optional.options
nsIDOMGeoPositionOptions
object specifying options; this parameter is optional.getCurrentPosition
in interface Geolocation
public final int watchPosition(PositionCallback successCallback)
Geolocation
Similar to getCurrentPosition()
, except it continues to call the callback with updated position information periodically until clearWatch()
is called.
successCallback
nsIDOMGeoPositionCallback
that is to be called whenever new position information is available.errorCallback
nsIDOMGeoPositionErrorCallback
to call when an error occurs; this is an optional parameter.options
nsIDOMGeoPositionOptions
object specifying options; this parameter is optional.An ID number that can be used to reference the watcher in the future when calling clearWatch()
.
watchPosition
in interface Geolocation
public final int watchPosition(PositionCallback successCallback, PositionErrorCallback errorCallback)
Geolocation
Similar to getCurrentPosition()
, except it continues to call the callback with updated position information periodically until clearWatch()
is called.
successCallback
nsIDOMGeoPositionCallback
that is to be called whenever new position information is available.errorCallback
nsIDOMGeoPositionErrorCallback
to call when an error occurs; this is an optional parameter.options
nsIDOMGeoPositionOptions
object specifying options; this parameter is optional.An ID number that can be used to reference the watcher in the future when calling clearWatch()
.
watchPosition
in interface Geolocation
Copyright © 2018. All rights reserved.