In my app I want to show the Direction between two Place.
I get the Latitude & Longitude for Both two places.
and want add that lat,long in this URL,
NSURL *strlist = [NSURL URLWithString:@"http://maps.google.com/maps?saddr=%f,%f&daddr=%f,%f"];
But when i give lat,long Like this,
NSURL *strlist = [NSURL URLWithString:[NSString stringWithFormat:@"http://maps.google.com/maps?saddr=%f,%f & daddr=%f,%f",c_lat,c_long,lat,lat]];
//c_lat – Current Latitude //in Double format
//c_long – Current Longitude //in Double format
//lat – Particular Place Latitude //in Double format
//lat – Particular Place Longitude //in Double format
In NSlog(“URL:%@”,strlist); I got NULL Value.
How to add that Lat & Long in NSURL ?
Remove the space between
%fand&Similarly remove the space between
&anddaddrIt should be like this