Skip to content

Falke-Design/GeomanTriangle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'}

About

Leaflet Geoman Subplugin - GeomanTriangle: Add a triangle to draw

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published