Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex Flex 4.5 navigateToURL maps.google.com使用街道地址而不是lat和long_Apache Flex_Flex4.5 - Fatal编程技术网

Apache flex Flex 4.5 navigateToURL maps.google.com使用街道地址而不是lat和long

Apache flex Flex 4.5 navigateToURL maps.google.com使用街道地址而不是lat和long,apache-flex,flex4.5,Apache Flex,Flex4.5,我有一个应用程序,用户将单击一个按钮,并在本地GoogleMapAPI上映射一个地址。我可以找到很多关于如何使用lat+long实现这一点的示例,但没有关于如何传递地址的示例。我可以执行以下操作,其中homeLoc.text是纬度和经度:navigateToURL(新的URLRequest(“http://maps.google.com/?q=“+homeLoc.text”) 很难相信这会很困难,但我找不到任何使用街道地址的例子 有人做过这样的事吗?这一定是一个非常常见的用例 谢谢 向右标记。直

我有一个应用程序,用户将单击一个按钮,并在本地GoogleMapAPI上映射一个地址。我可以找到很多关于如何使用lat+long实现这一点的示例,但没有关于如何传递地址的示例。我可以执行以下操作,其中homeLoc.text是纬度和经度:navigateToURL(新的URLRequest(“http://maps.google.com/?q=“+homeLoc.text”)

很难相信这会很困难,但我找不到任何使用街道地址的例子

有人做过这样的事吗?这一定是一个非常常见的用例

谢谢


向右标记。直接使用地址的问题在于它不知道有多少可能的结果。它可以是1,也可以是数百万


正因为如此,谷歌坚持要你用他们的地址来获取一个LatLong。如果只返回一个结果,您可以在正确的位置打开google maps,但是如果返回多个(或没有)结果,您可以在继续之前在应用程序中自行处理。

对。直接使用地址的问题在于它不知道有多少可能的结果。它可以是1,也可以是数百万

Alert.show("Open new tab to search in Google Maps?", "No places found", Alert.YES | 
Alert.NO, null, alertListener, null, Alert.NO);

    function alertListener(eventObj:CloseEvent):void {
     // Open Google in new tab.
     if (eventObj.detail==Alert.YES) 
     {
    var url:String = "http://maps.google.com.au/maps?q=" + onelineaddress.text; 
    var urlReq:URLRequest = new URLRequest(url);
navigateToURL(urlReq, "_blank");   
    }                        
    }
正因为如此,谷歌坚持要你用他们的地址来获取一个LatLong。如果只返回一个结果,您可以在正确的位置打开google maps,但是如果返回多个(或没有)结果,您可以在继续之前在应用程序中自行处理

Alert.show("Open new tab to search in Google Maps?", "No places found", Alert.YES | 
Alert.NO, null, alertListener, null, Alert.NO);

    function alertListener(eventObj:CloseEvent):void {
     // Open Google in new tab.
     if (eventObj.detail==Alert.YES) 
     {
    var url:String = "http://maps.google.com.au/maps?q=" + onelineaddress.text; 
    var urlReq:URLRequest = new URLRequest(url);
navigateToURL(urlReq, "_blank");   
    }                        
    }
这对我有用

这对我有用