Look at it first.
Before downloading the code, the code can only be run under the real machine test, and the simulator will error. Because the demo is expensive, so ... The comments in the code are very full, because I am a novice, write good not to laugh.
Code Download: Demo
Function Description:
1. Location recording function.
2. The location is sent to the service side.
3. Track playback.
4. Search for people who are in use nearby.
Button Description:
1. Start button:
Turn on the timer, get the current position every two seconds, and log to the local database, sending data to the server every 30 seconds at the same time as the route is logged.
2. Upload button:
Records data that could not be uploaded due to network reasons in the route.
The Local database table sets the field uploads and does not upload the data to mark.
3. Query button:
Click the button pop-up Time selection box, select the start time, end time, determine the route from the local database for that period of time, and draw the route on the map.
4. Nearby Buttons:
Click the nearby button and the client sends the request to the server side. A vehicle that submits data from a server-side database for nearly 30 seconds and is in a latitude/longitude range (see below for the implementation method) returns to the client, the client calls the distance calculation method continues to filter and marks on the map
Start by importing the framework:
Mainly used for databases, network requests, Baidu map.
The main classes:
Code:
The code comments are very full. Welcome to the discussion.
In this is to say about the point of access to the three-point angle algorithm, to reduce the amount of data. The algorithm is already written in the code. But there is no practical use.
Speed determines the point density and so on.
Welcome message discussion.
The rookie.
IOS Baidu Map Small function Demo