An app which requires to show a google map in UIWebview. A google markers must rolls over map according to GPS coordinates. Also needs to draw the google polyline over the travelled way and calculate the speed km/hr.
As per above scenario, I have achieved the google map in UIwebview with markers rolls over the google map as per my physical movement. Now I have two requirements
1) Calculate Speed in km/hr
To achieve this, I am doing like this
Speed = (distance / timeElapsed) * 3.6
where distance is in meters and timeElapsed is in seconds. Is this the right way for getting speed?
2) Google Polyline over Google Map
I also created a function which draws google polyline as marker moves. It runs successfully for limited time and then app crash up. I have tried my best to draw the polyline over map but unsuccessfull. The main reason to draw polyline is “View travelled path”. Still I didn’t get any reason why the app crahes. Without polylines, I have tested upto 40km and runs successfully and marker moves smoothly. But I need to draw polyline. How to achieve it? Is there any bug in UIWebview or using old operating system.
Currently my iPhone is 8GB with 2.1 OS. I wants to finish this app in 2.1 OS. Only issue is draw polyline over google map. Later, I’ll upgrade to new 3.0OS for getting new features.
I shall be very thankful for your guidance and technical support.