IOS Baidu Map Small function Demo

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.