AS3柔性空气如何进入GPS"到"文字框 [英] as3 flex air How to access GPS "to" textbox

查看:109
本文介绍了AS3柔性空气如何进入GPS"到"文字框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要的地方,当推,用户的本地GPS应用的地址打开了一个按钮已经放在了到字段。

我可以做与电话拨号器这样类似的事情:

  // ----------------------骂人! ------------
常量callURL:字符串=电话:6094329861;
VAR TargetURL中:的URLRequest =新的URLRequest(callURL);
navigateToURL(TargetURL中);
// ------------------------------------------------ ------
 

解决方案

您可以通过navigateToURL(这样做),用户将被要求,如果他想在broweser或应用程序打开。

  VAR长:数= destinationLong;
VAR纬度:数= destinationLat;
navigateToURL(新的URLRequest(http://maps.google.com/?q=+字符串(LAT)+,+字符串(长)));
 

I want to make a button where, when pushed, the user's native gps application opens up with the address already put in for the "to" field.

I can do something similar with the telephone dialer this way:

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

解决方案

you can do it by navigateToURL() and the user will be asked if he wants to open in broweser or app.

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

这篇关于AS3柔性空气如何进入GPS"到"文字框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆