2013-03-13 42 views
0

我想製作一個按鈕,當用戶的本地GPS應用程序被按下時,其地址已經放入「to」字段。as3 flex air如何訪問GPS「到」文本框

我可以用電話撥號程序類似這樣:

// ---------------------- CALL SOMEONE! ------------ 
const callURL:String="tel:6094329861"; 
var targetURL:URLRequest = new URLRequest(callURL); 
navigateToURL(targetURL); 
// ------------------------------------------------------ 
+0

退房http://stackoverflow.com/questions/10769631/is-there-a-map-uri-prefix-to-launch-map-application-like-mailto-or-tel – James 2013-03-14 12:56:34

回答

0

您可以通過的navigateToUrl做(),如果他想在broweser或應用程序來打開用戶將被要求。

var long:Number = destinationLong; 
var lat:Number = destinationLat; 
navigateToURL(new URLRequest("http://maps.google.com/?q="+String(lat)+","+String(long))); 
+0

確定。我期待輸入的是一個地址。 – Jim 2013-03-14 18:08:54