You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by CodeGirl <Mi...@yahoo.com> on 2016/08/10 18:27:42 UTC
Flex and Google API
I see Google does have a Web Service to get distances between two cities.
Has anyone done this inside of Flex? How did you do it?
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flex-and-Google-API-tp13254.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Flex and Google API
Posted by CodeGirl <Mi...@yahoo.com>.
FYI, Here it is.
Here is the URL minus my key:
https://maps.googleapis.com/maps/api/distancematrix/xml?origins=Dallas,%20TX&destinations=Houston,%20TX&units=imperial&key=
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:googledistance="services.googledistance.*"
minWidth="955" minHeight="600">
<fx:Script>
</fx:Script>
<fx:Declarations>
<s:CallResponder id="GetDistanceResult"/>
<googledistance:GoogleDistance id="googleDistance"
fault="Alert.show(event.fault.faultString + '\n' +
event.fault.faultDetail)"
showBusyCursor="true"/>
</fx:Declarations>
<s:DataGrid id="accountsDG" left="5" right="5" top="5" bottom="5"
creationComplete="accountsDG_creationCompleteHandler(event)">
<s:columns>
<s:ArrayList>
<s:GridColumn dataField="status" headerText="status"></s:GridColumn>
<s:GridColumn dataField="origin_address"
headerText="origin_address"></s:GridColumn>
<s:GridColumn dataField="destination_address"
headerText="destination_address"></s:GridColumn>
<s:GridColumn dataField="row.element.duration.text"
headerText="duration"></s:GridColumn>
<s:GridColumn dataField="row.element.distance.text"
headerText="distance"></s:GridColumn>
</s:ArrayList>
</s:columns>
<s:AsyncListView
list="{TypeUtility.convertToCollection(GetDistanceResult.lastResult)}"/>
</s:DataGrid>
</s:Application>
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flex-and-Google-API-tp13254p13256.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.