search

Home  >  Q&A  >  body text

javascript - Converting GPS coordinates to Baidu map coordinates is Nan?

I used H5 to obtain the current coordinates, and then called the API of Baidu Maps. I found that there was an error in the display on the mobile phone, about 1000 meters. I checked the information and said that this is normal. I must convert the GPS coordinates into For the coordinates of Baidu Map, I looked at the API and found that there are ready-made methods, but the Nan that was printed out in the end, I still don’t know what happened, so I went directly to the picture.

ringa_leeringa_lee2745 days ago675

reply all(1)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-05-18 11:03:57

    The value of the returned function is not a point, but a data. Take it again: data.points[0]

    reply
    0
  • Cancelreply