URL(tUrl) inconsitencies in iOS Simulator

Peter Haworth pete at mollysrevenge.com
Wed Dec 29 12:55:08 EST 2010


Hi Colin,
I have a need to calculate driving distances between two points (not  
in iOS but OSX) and didn't know about the Google maps API, I hope you  
get it working.  How did you get the initial latitude and longitude of  
the start and end points?  Is that available through Google maps API  
as well?

Pete Haworth

On Dec 28, 2010, at 6:21 PM, RevList wrote:

> I am working on an application for tracking mileage.
> In my app  I determine the longitude and latitude of a site and then
> calclulate the driving distance between them using the GoogleMaps API.
>
> A snippet of the code is like this, with a populated pOrigin and
> pDestination
> This works 100% of the time in the IDE, but only occasionally when I
> simulate the operation
> If I replace the first two lines of code with
>   Put fld OriginLat & comma & fld OriginLong into pOrigin
>   Put fld DestinationLat & comma & fld DestinationLong into  
> pDestination
>
> it Never works in the simulator, but 100% of the time in the IDE.
> Any ideas?  I am at a road block now
>
>   Put "49.3447,-123.08076" into pOrigin
>   Put "49.881421,-119.44365" into pDestination
>   Put "http://maps.googleapis.com/maps/api/directions/xml?origin=" &
> pOrigin & "&destination=" & pDestination & "&sensor=false" into tUrl
>   PUT URL(tUrl) into tReply
>   Put tReply
>
>
> ******************************************
> Stewart Lynch
> CreaTECH Solutions
> slynch at CreaTECHSol.com
> 604.484.8499
> Skype:StewartLynch
>
> There are only 10 kinds of people.  Those who understand binary and  
> those
> who don't.
> ******************************************
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>





More information about the use-livecode mailing list