本文介绍了Google Maps坐标不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过xml从mysql获取数据.一切都好.但是当我用JavaScript编写此坐标时,它向我显示了其他数字..它可以在哪里使用这些数字?

I get data from mysql by xml. Everything is ok. but when i wrote this coordinates with javascript it show me additional numbers.. where it can take this numbers?

那样:

它向我显示了这长时间..:(40.992638, 47.860474*00000007*),(40.992252, 47.860619*00000004*)

it show me this lat long.. : (40.992638, 47.860474*00000007*),(40.992252, 47.860619*00000004*)

但是我的朋友很喜欢这样:(40.992638 47.860474 ) (40.992252 47.860619)

but my lat longs like that: (40.992638 47.860474 ) (40.992252 47.860619)

什么是: **00000007 & 00000004 ?**

what is: **00000007 & 00000004 ?**

推荐答案

经度和纬度在JavaScript中表示为双精度浮点数(所有数字都是).将字符串转换为双精度浮点数时,会将其转换为最接近的值,该值不一定总是完全相同.第14位数字的差异可以忽略不计.

Latitudes and Longitudes are represented in javascript as double precision floating point numbers (all numbers are). When you convert a string to a double precision floating point number, it converts it to the closest value, which will not always be exactly the same. The difference in the 14th digit is negligible.

这篇关于Google Maps坐标不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 20:13