Copyright | (c) 2015 Altera Praxis Pty Ltd |
---|---|
License | BSD |
Maintainer | eocallaghan@alterapraxis.com |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
This module encapsulates Fay Javascript for the GeoPosition API specified as in the W3C spec.
- geoPositionErrorMessage :: GeoPositionError -> String
- geoPositionErrorCode :: GeoPositionError -> GeoPositionErrorCode
- data GeoPositionCallbacks m = GeoPositionCallbacks {
- geoPositionCallback :: GeoPositionCallback m
- geoPositionErrorCallback :: Maybe (GeoPositionErrorCallback m)
- data GeoPositionOptions = GeoPositionOptions {
- enableHighAccuracy :: Bool
- timeout :: Int
- maximumAge :: Int
- data GeoPosition = GeoPosition {}
- data GeoCoordinates = GeoCoordinates {}
- data GeoPositionError = GeoPositionError {}
- data GeoPositionErrorCode
Documentation
geoPositionErrorMessage :: GeoPositionError -> String Source
Helper function extracts UTC-16 encoded error message
geoPositionErrorCode :: GeoPositionError -> GeoPositionErrorCode Source
Helper function decodes enumerated error code
into the GeoPositionErrorCode
type
data GeoPositionCallbacks m Source
See section [5.1 - W3C Geolocation API] Requires the monad type that the callbacks have action on
GeoPositionCallbacks | |
|
data GeoPositionOptions Source
See section [5.2 - W3C Geolocation API]
GeoPositionOptions | |
|
data GeoPosition Source
See section [5.3 - W3C Geolocation API]
GeoPosition | |
|
data GeoPositionError Source
See section [5.5 - W3C Geolocation API]
GeoPositionError | |
|
data GeoPositionErrorCode Source
N.B. Fay does not support the Enum type class :(
Thus, use the geoPositionErrorCode
function to decode the value to the
GeoPositionErrorCode
type.
PermissionDenied | The acquisition of the geolocation information failed because the page didn't have the permission to do it. |
PositionUnavailable | The acquisition of the geolocation failed because at least one internal source of position returned an internal error. |
Timeout | The time allowed to acquire the geolocation, defined by |
Unknown | Out of spec error code |