Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7116] MobileWeb: Complete Ti.Geolocation implementation

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2012-03-08T16:13:24.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sSprint 2012-05, Release 2.0.0
ComponentsMobileWeb
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2012-01-11T14:59:27.000+0000
Updated2017-03-04T00:23:00.000+0000

Description

Ti.Geolocation has a good start, but is not complete. Extends Evented. Methods: * forwardGeocoder() - call to api.appcelerator.net/p/v1/geo using require() * getCurrentHeading() - use webkitCompassHeading: http://tinyurl.com/85a7rjo * getCurrentPosition() * reverseGeocoder() - call to api.appcelerator.net/p/v1/geo using require() Properties: * distanceFilter - iOS specific, but may be doable * headingFilter - iOS specific, but may be doable * preferredProvider - is this doable? Constants: * locationServicesEnabled - true if navigator.geolocation is not undefined Remove all AUTHORIZATION_* constants. Update API docs show correct support of methods/constants/properties. Might find some useful bits here: http://code.google.com/p/geo-location-javascript/source/browse/trunk/js/geo.js

Attachments

FileDateSize
app.js2012-03-06T15:26:01.000+00003338

Comments

  1. Bryan Hughes 2012-03-05

    forward and reverse geocoders will remains stubbed out but unimplemented until TIMOB-4880 is resolved.
  2. Neeraj Gupta 2012-03-05

    TIMOB-4880 will not be resolved as per the recent decision to go with mapquest. We should fix this ticket in the current form.
  3. Bryan Hughes 2012-03-06

    Pull Request: https://github.com/appcelerator/titanium_mobile/pull/1573
  4. Bryan Hughes 2012-03-06

    Here is my relevant nginx config. A proxy must be configured to access api.appcelerator.net.
       	server {
       		listen 8031;
       		index index.html;
       		autoindex on;
                       root /Users/bhughes/Work/htdocs;
       		proxy_intercept_errors on;
       		location / {
       			if ($request_method = 'OPTIONS') {
       				add_header Access-Control-Allow-Origin *;
       				add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
       				add_header Access-Control-Max-Age 1728000;
       				add_header Access-Control-Allow-Headers "Origin,Content-Type,UserAgent";
       				add_header Content-Type "text/plain; charset=UTF-8";
       				return 200;
       			}
       	
       			if ($request_method = 'GET') {
       				add_header Access-Control-Allow-Origin *;
       				add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
       				add_header Access-Control-Max-Age 1728000;
       				add_header Access-Control-Allow-Headers "Origin,Content-Type,UserAgent";
       				proxy_pass https://api.appcelerator.net;
       			}
       	
       			if ($request_method = 'POST') {
       				add_header Access-Control-Allow-Origin *;
       				add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
       				add_header Access-Control-Max-Age 1728000;
       				add_header Access-Control-Allow-Headers "Origin,Content-Type,UserAgent";
       				proxy_pass https://api.appcelerator.net;
       			}
       		}
       	}
       
  5. Lee Morris 2017-03-04

    Closing ticket due to MobileWeb no longer being supported.

JSON Source