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 8165 Geo fix. #1785

Merged
merged 4 commits into from
Mar 21, 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
5 changes: 4 additions & 1 deletion apidoc/Titanium/Platform/Platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ events:
methods:
- name: canOpenURL
summary: |
Returns whether the system is configured with a default application to handle the URL's protocol.
Returns whether the system is configured with a default application to handle the URL's protocol.
description: |
On Mobile Web, this method always returns true, even if the browser can't open the specific URL,
unless the URL is empty or undefined.
returns:
type: Boolean
platforms: [iphone, ipad]
Expand Down
4 changes: 2 additions & 2 deletions mobileweb/titanium/Ti/Geolocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ define(["Ti/_/Evented", "Ti/_/lang", "Ti/Network"], function(Evented, lang, Netw
},
timeout : api.MobileWeb.forwardGeocoderTimeout
});
client.open("GET", "http://api.appcelerator.com/p/v1/geo?d=f&" +
client.open("GET", "http://api.appcelerator.net/p/v1/geo?d=f&" +
// TODO "c=" + Locale.getCurrentCountry() +
"q=" + escape(address));
client.send();
Expand All @@ -120,7 +120,7 @@ define(["Ti/_/Evented", "Ti/_/lang", "Ti/Network"], function(Evented, lang, Netw
},
timeout : api.MobileWeb.forwardGeocoderTimeout
});
client.open("GET", "http://api.appcelerator.com/p/v1/geo?d=r&" +
client.open("GET", "http://api.appcelerator.net/p/v1/geo?d=r&" +
// TODO "c=" + Locale.getCurrentCountry() +
"q=" + latitude + "," + longitude);
client.send();
Expand Down
8 changes: 4 additions & 4 deletions mobileweb/titanium/Ti/Platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ define(["Ti/_", "Ti/_/browser", "Ti/_/Evented", "Ti/_/lang", "Ti/Locale", "Ti/_/
battery = nav.battery || nav.webkitBattery || nav.mozBattery,
Platform = lang.setObject("Ti.Platform", Evented, {

canOpenURL: function(url) {
return !!url;
},

createUUID: _.uuid,

is24HourTimeFormat: function() {
return false;
},

canOpenUrl: function() {
return true;
},

openURL: function(url){
if (/^([tel|sms|mailto])/.test(url)) {
Expand Down