react-baidu-maps icon indicating copy to clipboard operation
react-baidu-maps copied to clipboard

The map coordinates displayed were incorrect

Open mc-ramesh0506 opened this issue 1 year ago • 6 comments

Hi, I randomly checked more than 10 counters and found that the map coordinates displayed were incorrect. However, when I opened the Baidu map website and entered the same address, the coordinates displayed on the map were correct. for example: the “西宁王府井” counter, input the address as "城中区西大街40号 ",The screenshot 1 below shows the map coordinates displayed on the website you provided, Screenshot 2 shows the correct coordinates displayed by Baidu Maps at the same address. I don't know what the problem is. Please kindly help check the reason, download (1) download

Thanks.

mc-ramesh0506 avatar Jul 31 '23 06:07 mc-ramesh0506

Which API do you use in your own site for searching POI? BTW, it seems that screenshot 1 is from Baidu, and screenshot 2 is from your site.

terence55 avatar Aug 02 '23 04:08 terence55

We have Latitute and Langitute data, those data is passer to marker.

image

mc-ramesh0506 avatar Aug 02 '23 12:08 mc-ramesh0506

Same Latitute and Langitute data will show correct location on baidu map as well as in google map.

mc-ramesh0506 avatar Aug 02 '23 12:08 mc-ramesh0506

Same Latitute and Langitute data will show correct location on baidu map as well as in google map. Does "baidu map" here mean directly using the Baidu Map JS SDK? Actually the coordinate systems of Baidu Map and Google Map are different, so the same coordinate may not be used in both without any transformation. Do you make any transformation when using it?

And I selected some coordinates by using Baidu's coordinate picker, and it can be shown in the correct location by using this React SDK. http://api.map.baidu.com/lbsapi/getpoint/index.html

terence55 avatar Aug 03 '23 07:08 terence55

Consider the below address, latitude and logitued details.

Address: "城中区西大街40号", lat: "36.621056", lng: "101.776672",

If we tried to mark the location using marker it will show wrong locaton. Where are is we try same in https://map.baidu.com/ it will show the correct one.

Please help me to resolve the issue

mc-ramesh0506 avatar Aug 09 '23 10:08 mc-ramesh0506

The coordinate you provided does not match the address. When you try to search for POIs using keywords instead of exact coordinates, you can definitely see matching locations, it doesn't mean anything. You can use the site http://api.map.baidu.com/lbsapi/getpoint/index.html to get the correct coordinates, or convert your coordinates to Baidu coordinates according to this document https://lbsyun.baidu.com/index.php?title=jspopularGL/guide/coorinfo. If you want to transform, you first need to know which coordinate system your coordinates are based on.

image image

terence55 avatar Aug 10 '23 06:08 terence55