Skip to content

Commit

Permalink
Merge pull request #1785 from bryan-m-hughes/timob-8165
Browse files Browse the repository at this point in the history
Timob 8165 Geo fix.
  • Loading branch information
cb1kenobi committed Mar 21, 2012
2 parents 179266c + 804b523 commit 4aa1137
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
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

0 comments on commit 4aa1137

Please sign in to comment.