Open vstar1411 opened 7 months ago
for Distance calculation method (Refer calculateDistance method in src/utils/PointsOnMap.js )
var scale = Math.pow(2, (_this.maxNativeZoom - this._map.getZoom())); start_x *= scale; start_y *= scale; end_x *= scale; end_y *= scale; distance = math.sqrt((start_x - end_x) ** 2 + (end_x - end_y) ** 2) * mpp
I have changed the last line to distance = math.sqrt((start_x - end_x) ** 2 + (start_y - end_y) ** 2) * mpp
distance = math.sqrt((start_x - end_x) ** 2 + (start_y - end_y) ** 2) * mpp
Thinking there was a typo end_x instead of start_y . Please correct me if I am wrong.
@vstar1411 Yes, you are right.
for Distance calculation method (Refer calculateDistance method in src/utils/PointsOnMap.js )
I have changed the last line to
distance = math.sqrt((start_x - end_x) ** 2 + (start_y - end_y) ** 2) * mpp
Thinking there was a typo end_x instead of start_y . Please correct me if I am wrong.