Project

General

Profile

Feature #12491

Measure distances on the map

Added by Philippe May 4 months ago. Updated 4 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
08/07/2021
Due date:
% Done:

0%

Spent time:
Close

Description

Add a ruler tool, to measure distances.

Associated revisions

Revision 8c1071bb (diff)
Added by Philippe May 4 months ago

Map: add ruler tool to measure distances (refs #12491)
- update material icons

Revision fa00f3be (diff)
Added by Philippe May 4 months ago

Map: rulers to measure several distances (refs #12491)
- Fix missing turf dependency and bump version

Revision 84a6be42 (diff)
Added by Philippe May 4 months ago

Map: fix deactivating rulers (refs #12491)

Revision 7871873e (diff)
Added by Philippe May 4 months ago

Map: fix same origin rulers (refs #12491)

History

#1 Updated by Philippe May 4 months ago

  • Status changed from New to Resolved

I decided to code a custom tool, with bits and pieces inspired by https://github.com/korywka/mapbox-gl-controls.

After selecting the ruler tool (compass icon), the user can click on 2 points on the map to draw a line, the distance is shown on that line. Several lines can be added. They disappear when the user clicks again on the compass icon.

The user can also press the <control> key to measure several distances from the same starting point.

Also available in: Atom PDF