Skip to content

Latest commit

 

History

History
31 lines (18 loc) · 893 Bytes

README.md

File metadata and controls

31 lines (18 loc) · 893 Bytes

Leaflet GeomanTriangle: Adds a triangle draw button

This is a Leaflet Geoman Subplugin

Demo: GeomanTriangle

Installation

Download geomanTriangle.js and include them in your project.

<script src="./dist/geomanTriangle.js"></script>

or use the script over cdn:

<script src="https://cdn.jsdelivr.net/gh/Falke-Design/GeomanTriangle/dist/geomanTriangle.js"></script>

Init GeomanTriangle

Create the L.GeomanTriangle button after Leaflet Geoman

triangle = new L.GeomanTriangle(map)

Enable draw

map.pm.enableDraw("Triangle")

setText

triangle.setText(text)

text: {tooltips: {firstVertex: 'Click to place center', finish: 'Click to finish'} cancel: 'Cancel'}