GeoJSON。 JS / NodeJS,浮点数。线的中点不正确(Axy Bxy)

时间:2020-02-24 12:27:41

标签: javascript floating-point coordinates latitude-longitude geo

GEO JSON

A点: {124.8046875,-22.79643932091949}
B点: {143.26171875,-23.563987128451217}

需要找到这条线的中点:

MidPoint X:(124.8046875 + 143.26171875)/ 2 = 134.033203125
中间点Y:(-22.79643932091949 + -23.563987128451217)/ 2 = -23.180213224685353

在地图上选择此MidPoint并查看结果。
问题:如果您在地图上使用Max ZoomIN-中点不在线上

为什么?有什么办法解决这个问题?

Screenshot

0 个答案:

没有答案