I am trying two draw route between two location,For that I Fetch all the points from Google Map API Web Service.(JSON
Output Format). After parsing JSON
Data and De cording points i stored all points on NSMutableArray
.
Each array of index contains this type of values.
"<+10.90180969, +76.19167328> +/- 0.00m (speed -1.00 mps / course -1.00) @ 12/04/12 10:18:10 AM India Standard Time",
Now i want to separate latitude and longitude values.
latitude : +10.90180969
longitude : +76.19167328
How to get this values from each index of array?
Here is something in a very crude form and I guess its a brute solution
Looking at the string it shows that you are printing the description of a CLLocation object "someObject" , You can also access the latitude and longitude such as
OutPut will be : Latitude: 28.621873 Longitude: 77.388897
but this won't give you the signs i.e "+" , or "-"
Hope it helps.
This is just one way to do this.:
This is how I do it in my code - tried to adapt to your case:
Header file:
And the implementation: