Privacy/Reviews/GeolocationAPI: Difference between revisions

Line 79: Line 79:
This is a browser component in privileged code that brokers communication between the page requesting the location information and the third party location services. This component begins to handle the request by asking the user for permission to use geolocation.
This is a browser component in privileged code that brokers communication between the page requesting the location information and the third party location services. This component begins to handle the request by asking the user for permission to use geolocation.


* Not sure if we should be asking for permission if website is not requesting the user's location (ie. just converting an arbitrary location into a civic address)
''Not sure if we should be asking for permission if website is not requesting the user's location (ie. just converting an arbitrary location into a civic address)''


''Sid: Yes, we should ask if the user has not beem prompted for that site.  Do we allow third party content (iframes on the page, for instance) to invoke this API?''
''Sid: Yes, we should ask if the user has not beem prompted for that site.  Do we allow third party content (iframes on the page, for instance) to invoke this API?''


''TODO: verify that we ask permission if the user has not currently authorized other geolocation activity on the page.'''
''We are planning to have the implementation only ask permission if the user has not currently authorized other geolocation activity on the page.''


If permission is given, this request is processed, and the location's lat/long is then sent to the platform's reverse geocoding API (if available).  If not, the request is not performed, and the interaction stops here.
If permission is given, this request is processed, and the location's lat/long is then sent to the platform's reverse geocoding API (if available).  If not, the request is not performed, and the interaction stops here.
Line 94: Line 94:
! Where
! Where
|-
|-
| location data  
| Location data  
| nsIDOMGeoPositionCoords object stored as an nsCOMPtr property in the request object
| nsIDOMGeoPositionCoords object stored as an nsCOMPtr property in the request object
|}
|}


The civic addresses are not stored in this component, and are only retrieved and passed as parameter arguments to/from the third party geocoding API. No actual civic address object is being stored in this component.  The location data stored in this component are provided by the page holding location request and may or may not have been obtained through the other geolocation API.
The civic addresses are not stored in this component, and are only retrieved and passed as parameter arguments to/from the third party geocoding API. No actual civic address object is being stored in this component.  The location data stored in this component are provided by the page holding location request and may or may not have been obtained through the other geolocation API.
'''Note:''' "location data" in this context is equivalent to the coordinates interface as described in the W3C Geolocation API documentation here: http://dev.w3.org/geo/api/spec-source.html#coordinates_interface


'''Communication with page requesting location data:'''
'''Communication with page requesting location data:'''
Line 116: Line 114:
|-
|-
| ''In:''  
| ''In:''  
| apiEndpoint return
| 3rd party API (such as Android's getFromLocation) return point
| specific types of data received from Geocoding API with this API call
| Address object(s), which are converted to the general form described below
|  
|  
|-
|-
| ''Out:''  
| ''Out:''  
| apiEndpointCall
| 3rd party API (such as Android's getFromLocation) entry point
| specific types of data sent to Geocoding API with this API call
| Latitude and longitude from user's location data ONLY
|  
|  
|}
|}


''TODO: document the API here -- what are the third party request API call names?  What data (specifically) do we send them and what do they return?'''
''The 3rd party APIs vary from platform to platform, but we would only ever be handing over the latitude and longitude to these 3rd party APIs. For example, on the Android platform, we use a call to getFromLocation (documented here: http://developer.android.com/reference/android/location/Geocoder.html#getFromLocation(double, double, int)).
 
This call would return a list of Address objects, which should be of the general form that is documented here: http://arreth.wordpress.com/2012/03/13/proposed-changes-to-geolocation-api-specification/
 
On the Android platform, the Address objects are of the form documented here: http://developer.android.com/reference/android/location/Address.html'''


===Platform Reverse Geocoding API (3rd-Party)===
===Platform Reverse Geocoding API (3rd-Party)===
4

edits