We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我确定我已经查看了 (标注[ ]为[x])
[ ]
[x]
我要申请 (标注[ ]为[x])
我访问 http://127.0.0.1:8000/owntracks/get_datas 得到的经纬度数据异常,导致 http://127.0.0.1:8000/owntracks/show_maps 中显示的轨迹也异常。
使用过数据库中录入的经纬度生成轨迹,发现数据正常。
排查发现owntracks/views.py文件中的get_datas(request)函数获取到的经纬度数据是经过convert_to_amap(locations)函数转换的得到,而convert_to_amap(locations)是将经纬度从GPS系统转换成高德地图系统的。
因为全球的地图系统有很多种,如GPS、高德、百度等,各有各的坐标系。同一地理位置在不同地图系统上表现的经纬度是不一样的。比如说,同一个地点在GPS系统里的经纬度和在高德或百度系统里的经纬度就是完全不同的。
所以我想直接从数据库读取数据,然后将经纬度数据存为字符串格式,添加到路径(path)里。这样返回的结果就是GPS经纬度数据,没有进行任何坐标系转换,也就不会出现轨迹异常的情况。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
我确定我已经查看了 (标注
[ ]
为[x]
)我要申请 (标注
[ ]
为[x]
)我访问 http://127.0.0.1:8000/owntracks/get_datas 得到的经纬度数据异常,导致 http://127.0.0.1:8000/owntracks/show_maps 中显示的轨迹也异常。
使用过数据库中录入的经纬度生成轨迹,发现数据正常。
排查发现owntracks/views.py文件中的get_datas(request)函数获取到的经纬度数据是经过convert_to_amap(locations)函数转换的得到,而convert_to_amap(locations)是将经纬度从GPS系统转换成高德地图系统的。
因为全球的地图系统有很多种,如GPS、高德、百度等,各有各的坐标系。同一地理位置在不同地图系统上表现的经纬度是不一样的。比如说,同一个地点在GPS系统里的经纬度和在高德或百度系统里的经纬度就是完全不同的。
所以我想直接从数据库读取数据,然后将经纬度数据存为字符串格式,添加到路径(path)里。这样返回的结果就是GPS经纬度数据,没有进行任何坐标系转换,也就不会出现轨迹异常的情况。
The text was updated successfully, but these errors were encountered: