Table of Contents
Convert the longitude and latitude of Baidu Map to the corresponding longitude and latitude of Tencent Map/Google, and the longitude and latitude of google
Home Backend Development PHP Tutorial Convert the longitude and latitude of Baidu map to the corresponding longitude and latitude of Tencent Map/Google, longitude and latitude google_PHP tutorial

Convert the longitude and latitude of Baidu map to the corresponding longitude and latitude of Tencent Map/Google, longitude and latitude google_PHP tutorial

Jul 13, 2016 am 09:44 AM
map Latitude and longitude

Convert the longitude and latitude of Baidu Map to the corresponding longitude and latitude of Tencent Map/Google, and the longitude and latitude of google

Purpose: Convert the longitude and latitude of Baidu Map to the corresponding longitude and latitude of Tencent Map/Google.

Method 1: Use code to convert

Existing problems: The error is large after conversion and it is basically unusable

public static void Convert_BD09_To_GCJ02(double lat, double lng) {
      double x_pi = Math. PI * 3000.0 / 180.0;
      double x = lng - 0.0065, y = lat - 0.006;
      double z = Math. sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi);
      double theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);
      lng = z * Math. cos(theta );
      lat = z * Math. sin(theta );
      
      System. out.println(lng);
      System. out.println(lat);
}
Copy after login

Method 2:

This website provides conversion services, the coordinates are relatively accurate and available, and the background calls are not carefully studied

http://www.minigps.net/convert.html

Method 3:

Use Tencent Maps, see 1.html
for details

The address of the old version of Tencent Map: http://api.map.soso.com/doc_v2/example.html?sample-convertor-library#12map

Latest address: http://lbs.qq.com/javascript_v2/doc/convertor.html

Directly called address , points=latitude and longitude, just pass it into Baidu:

http://apic.map.qq.com/translate/?type=3&points=114.041993,22.667204&output=jsonp&pf=jsapi&cb=qq.maps.__svcbi1x9al56.cbi1x9al9l0

Coordinate query address:

http://api.map.baidu.com/lbsapi/getpoint/
http://lbs.qq.com/javascript_v2/case-run.html#sample-geocoding-reverse

Summary:

Since Tencent’s longitude and latitude are in the same coordinate system as Google’s longitude and latitude, Baidu’s longitude and latitude is its own system. The algorithm codes currently searched on the Internet are not very accurate, so it is recommended to use the API provided by the map developer for conversion.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1049116.htmlTechArticleConvert the longitude and latitude of Baidu map to the corresponding longitude and latitude of Tencent Map/Google, the longitude and latitude of google. Purpose: Convert the longitude and latitude of Baidu map to Longitude and latitude corresponding to Tencent Map/Google. Method...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to make Google Maps the default map in iPhone How to make Google Maps the default map in iPhone Apr 17, 2024 pm 07:34 PM

The default map on the iPhone is Maps, Apple's proprietary geolocation provider. Although the map is getting better, it doesn't work well outside the United States. It has nothing to offer compared to Google Maps. In this article, we discuss the feasible steps to use Google Maps to become the default map on your iPhone. How to Make Google Maps the Default Map in iPhone Setting Google Maps as the default map app on your phone is easier than you think. Follow the steps below – Prerequisite steps – You must have Gmail installed on your phone. Step 1 – Open the AppStore. Step 2 – Search for “Gmail”. Step 3 – Click next to Gmail app

How to use map and location functions in uniapp How to use map and location functions in uniapp Oct 16, 2023 am 08:01 AM

How to use map and positioning functions in uniapp 1. Background introduction With the popularity of mobile applications and the rapid development of positioning technology, map and positioning functions have become an indispensable part of modern mobile applications. uniapp is a cross-platform application development framework developed based on Vue.js, which can facilitate developers to share code on multiple platforms. This article will introduce how to use maps and positioning functions in uniapp and provide specific code examples. 2. Use the uniapp-amap component to implement the map function

How to add store address to Xiaohongshu map? How to fill in the store address setting? How to add store address to Xiaohongshu map? How to fill in the store address setting? Mar 29, 2024 am 09:41 AM

As Xiaohongshu becomes more and more popular among young people, more and more people choose to open stores on Xiaohongshu. Many novice sellers encounter difficulties when setting up their store address and do not know how to add the store address to the map. 1. How to add the store address to the map in Xiaohongshu? 1. First, make sure your store has a registered account on Xiaohongshu and has successfully opened a store. 2. Log in to your Xiaohongshu account, enter the store backend, and find the "Store Settings" option. 3. On the store settings page, find the "Store Address" column and click "Add Address". 4. In the address adding page that pops up, fill in the detailed address information of the store, including province, city, district, county, street, house number, etc. 5. After filling in, click the "Confirm Add" button. Xiaohongshu will provide you with the address

How to create a map heat map using Highcharts How to create a map heat map using Highcharts Dec 17, 2023 pm 04:06 PM

How to use Highcharts to create a map heat map requires specific code examples. A heat map is a visual data display method that can represent the data distribution in each area through different color shades. In the field of data visualization, Highcharts is a very popular JavaScript library that provides rich chart types and interactive functions. This article will introduce how to use Highcharts to create a map heat map and provide specific code examples. First, we need to prepare some data

How to use at-a-glance directions on Google Maps How to use at-a-glance directions on Google Maps Jun 13, 2024 pm 09:40 PM

A year after its launch, Google Maps has launched a new feature. Once you set a route to your destination on the map, it summarizes your travel route. Once your journey begins, you can "Browse" route guidance from your phone's lock screen. You can use Google Maps to see your estimated arrival time and route. Throughout your trip, you can view navigation information on your lock screen, and by unlocking your phone, you can view navigation information without accessing Google Maps. By unlocking your phone, you can view navigation information without accessing Google Maps. By unlocking your phone, you can view navigation information without accessing Google Maps. By unlocking your phone, you can view navigation information without accessing Google Maps. By unlocking your phone, you can view navigation information without accessing Google Maps. By unlocking your phone, you can view navigation information without accessing Google Maps.

Master the art of using Apple Maps Guides on iPhone and iPad Master the art of using Apple Maps Guides on iPhone and iPad Aug 30, 2023 am 09:25 AM

In an ever-evolving technological world, the ability to navigate digital maps has become an essential skill. This article provides a comprehensive guide on how to use Apple Maps Guides on iPhone and iPad, a feature that revolutionizes the way users explore their surroundings and plan their journeys. Apple Maps is a built-in application on all Apple devices, and it is constantly updated and improved to provide a seamless navigation experience. One of its most notable features is the Guide feature, which provides a curated list of interesting places to visit in various cities around the world. This feature is not only beneficial for travelers, but also a boon for locals looking to discover new attractions in their city. How to use Apple Maps on iOS guide First, visit the Apple Maps

Cloud-based and car-based MapNeXt is all done! Construction of next-generation online high-precision maps Cloud-based and car-based MapNeXt is all done! Construction of next-generation online high-precision maps Jan 31, 2024 pm 06:06 PM

Written above & the author’s personal understanding In collaborative, connected and automated mobility (CCAM), the stronger the ability of intelligent driving vehicles to perceive, model and analyze the surrounding environment, the more aware and able they are to understand and make decisions , as well as perform complex driving scenarios safely and efficiently. High-precision (HD) maps represent road environments with centimeter-level accuracy and lane-level semantic information, making them a core component of intelligent mobility systems and a key enabler of CCAM technology. These maps provide automated vehicles with a powerful advantage in understanding their surroundings. HD maps are also considered hidden or virtual sensors because they bring together knowledge from physical sensors (maps), namely lidar, cameras, GPS and IMU, to build a model of the road environment. HD map

How to create an interactive map using HTML, CSS and jQuery How to create an interactive map using HTML, CSS and jQuery Oct 25, 2023 am 09:40 AM

How to Create an Interactive Map Using HTML, CSS, and jQuery Maps are a common visualization tool that help users understand and navigate geographic locations and related information more easily. By using HTML, CSS and jQuery, we can create an interactive map and add some fun and useful features. This article will guide you on how to use these techniques to create your own interactive map. Create the HTML structure First, we need to create the HTML structure to hold the map. The following is a basic

See all articles