Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timob 7116 Geolocation. #1573

Merged
merged 8 commits into from
Mar 9, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
48 changes: 27 additions & 21 deletions apidoc/Titanium/Geolocation/Geolocation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ methods:
- name: callback
summary: function to invoke on success or failure. The event object contains the properties described as the `place` dictionary in <Titanium.Geolocation.reverseGeocoder>.
type: Callback<Object>
platforms: [android, iphone, ipad]
platforms: [android, iphone, ipad, mobileweb]
- name: getCurrentHeading
summary: retrieve the current compass heading.
parameters:
- name: callback
summary: function to invoke on success or failure of obtaining the current heading. See heading event in <Titanium.Geolocation>.
type: Callback<Object>
platforms: [android, iphone, ipad]
platforms: [android, iphone, ipad, mobileweb]
- name: getCurrentPosition
summary: retrieve the last known location from the device. On Android, the radios are not turned on to update the location. On iOS the radios MAY be used if the location is too "old".
parameters:
- name: callback
summary: function to invoke on success or failure of obtaining the current location. See location event in <Titanium.Geolocation>.
type: Callback<Object>
platforms: [android, iphone, ipad, mobileweb]
- name: reverseGeocoder
summary: tries to resolve a location to an address.
parameters:
Expand All @@ -40,10 +41,10 @@ methods:
summary: |
function to invoke on success or failure. The event object passed contains a `places` array of zero or more place dictionaries. Each `place` dictionary contains the following properties: `street`, `street1`, `city`, `region1`, `region2`, `postalCode`, `country`, `countryCode`, `longitude`, `latitude`, `displayAddress`, `address`.
type: Callback<Object>
platforms: [android, iphone, ipad]
platforms: [android, iphone, ipad, mobileweb]
- name: setShowCalibration
summary: configure the calibration UI. set the false to disable the calibration display.
platforms: [iphone, ipad, mobileweb]
platforms: [iphone, ipad]
events:
- name: calibration
summary: fired when the device detects interface and requires calibration. when this event is fired, the calibration UI is being displayed to the end user.
Expand All @@ -60,14 +61,14 @@ events:
summary: if success is false, returns a string of the error description
- name: heading
summary: |
heading results dictionary with the following sub-pro perties: `magneticHeading`, `trueHeading`, `accuracy`, `x`, `y`, `z`, `timestamp`.
platforms: [android, iphone, ipad]
heading results dictionary with the following sub-properties: `magneticHeading`, `trueHeading` (iPhone, iPad only), `accuracy`, `x` (iPhone, iPad only), `y` (iPhone, iPad only), `z` (iPhone, iPad only), `timestamp`.
platforms: [android, iphone, ipad, mobileweb]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sub-pro perties?

- name: location
summary: fired when a location event is received
properties:
- name: code
summary: if success is false, the error code if available
platforms: [iphone, ipad]
summary: if success is false, the error code if available.
platforms: [iphone, ipad, mobileweb]
- name: success
summary: boolean to indicate if the location event was successfully received or an error occurred
- name: provider
Expand Down Expand Up @@ -104,45 +105,45 @@ properties:
summary: authorization constant
type: Number
permission: read-only
platforms: [iphone, ipad, mobileweb]
platforms: [iphone, ipad]
- name: AUTHORIZATION_DENIED
summary: authorization constant (user disabled authorization)
type: Number
permission: read-only
platforms: [iphone, ipad, mobileweb]
platforms: [iphone, ipad]
- name: AUTHORIZATION_RESTRICTED
summary: authorization constant (system disabled authorization)
type: Number
permission: read-only
platforms: [iphone, ipad, mobileweb]
platforms: [iphone, ipad]
- name: AUTHORIZATION_UNKNOWN
summary: authorization constant
type: Number
permission: read-only
platforms: [iphone, ipad, mobileweb]
platforms: [iphone, ipad]
- name: ERROR_DENIED
summary: error constant
platforms: [iphone, ipad, mobileweb]
platforms: [iphone, ipad]
type: Number
permission: read-only
- name: ERROR_HEADING_FAILURE
summary: error constant
platforms: [iphone, ipad, mobileweb]
platforms: [iphone, ipad]
type: Number
permission: read-only
- name: ERROR_LOCATION_UNKNOWN
summary: error constant
platforms: [iphone, ipad, mobileweb]
platforms: [iphone, ipad]
type: Number
permission: read-only
- name: ERROR_NETWORK
summary: error constant
platforms: [iphone, ipad, mobileweb]
platforms: [iphone, ipad]
type: Number
permission: read-only
- name: ERROR_REGION_MONITORING_DELAYED
summary: error constant
platforms: [iphone, ipad, mobileweb]
platforms: [iphone, ipad]
permission: read-only
osver:
ios:
Expand All @@ -152,28 +153,33 @@ properties:
summary: error constant
type: Number
permission: read-only
platforms: [iphone, ipad, mobileweb]
platforms: [iphone, ipad]
osver:
ios:
min: "4.0"
- name: ERROR_REGION_MONITORING_FAILURE
summary: error constant
type: Number
permission: read-only
platforms: [iphone, ipad, mobileweb]
platforms: [iphone, ipad]
osver:
ios:
min: "4.0"
- name: ERROR_TIMEOUT
summary: error constant
platforms: [mobileweb]
type: Number
permission: read-only
- name: PROVIDER_GPS
summary: The GPS location provider
type: String
permission: read-only
platforms: [android, mobileweb]
platforms: [android]
- name: PROVIDER_NETWORK
summary: The Network location provider
type: String
permission: read-only
platforms: [android, mobileweb]
platforms: [android]
- name: distanceFilter
summary: The minimum change of position (in meters) before a 'location' event is fired. Default is 0, meaning that location events are continuously generated.
type: Number
Expand Down
25 changes: 25 additions & 0 deletions apidoc/Titanium/Geolocation/MobileWeb/MobileWeb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Titanium.Geolocation.MobileWeb
summary: The Mobile Web specific geolocation capabilities.
extends: Titanium.Module
since: "1.9"
platforms: [mobileweb]
properties:
- name: locationTimeout
summary: The time within which location requests must succeed, in milliseconds.
default: Infinity
type: Number
- name: maximumLocationAge
summary: The maximum age of cached locations acceptible for location requests, in milliseconds.
default: 0
type: Number
- name: maximumHeadingAge
summary: The maximum age of cached locations acceptible for heading requests, in milliseconds.
default: 1000
type: Number
- name: forwardGeocoderTimeout
summary: The time within which forward geocoder requests must succeed, in milliseconds.
type: Number
- name: reverseGeocoderTimeout
summary: The time within which reverse geocoder requests must succeed, in milliseconds.
type: Number