Baidu Map IOS SDK-coordinate conversion method

Source: Internet
Author: User

Baidu maps Android SDK or IOS SDK or a variety of API tools products, are using Baidu's own encrypted coordinate system.

Many developers in the use of the process, location points are obtained through GPS or other means, so with the Baidu map used by the coordinate system there are differences.

When developers apply these spatial location information to map maps, they need to respond with a corrective (coordinate conversion), and the IOS SDK has already opened the response coordinate transformation method to the vast number of developers.

Developers need just a few lines of code to achieve the corresponding coordinate conversion operations.

Here's how:

<span style= "FONT-SIZE:14PX;" >cllocationcoordinate2d test = Cllocationcoordinate2dmake (39.90868, 116.3956);  Convert Google Maps, Soso maps, Aliyun maps, MAPABC maps, and AMAP map coordinates to Baidu coordinates  nsdictionary* testdic = bmkconvertbaiducoorfrom (test, Bmk_coordtype_common);  Convert GPS coordinates to baidu coordinates  testdic = Bmkconvertbaiducoorfrom (TEST,BMK_COORDTYPE_GPS);  NSLog (@ "x=%@,y=%@", [Testdic objectforkey:@ "x"],[testdic objectforkey:@ "y"]);</span>

Isn't it simple! ~

For more information, please refer to our official website: Http://developer.baidu.com/map

Baidu Map IOS SDK-coordinate conversion method

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.