# Using drawing tools of Leaflet in Perspective

**URL:** <https://forum.inductiveautomation.com/t/using-drawing-tools-of-leaflet-in-perspective/110348>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [September 3, 2025, 6:33am UTC](https://forum.inductiveautomation.com/t/using-drawing-tools-of-leaflet-in-perspective/110348 "2025-09-03T06:33:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alluring-mushroom](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@alluring-mushroom](https://forum.inductiveautomation.com/u/alluring-mushroom)\
**Post date:** [September 3, 2025, 6:33am UTC](https://forum.inductiveautomation.com/t/using-drawing-tools-of-leaflet-in-perspective/110348/1 "2025-09-03T06:33:38Z")

</div>

Hey everyone,

We would like to use [Leaflet Draw](https://leaflet.github.io/Leaflet.draw/docs/leaflet-draw-latest.html) to allow users to draw polygons for things like avoidance zones, but that doesn’t seem possible using the current module.

If its possible, I’d love to learn how, but if it isn’t, what would be the best way to enable this?

---

<div class="post-metadata">

**Author:** ![Ujwal\_Wankhede](https://avatars.discourse-cdn.com/v4/letter/u/4af34b/32.png) [@Ujwal\_Wankhede](https://forum.inductiveautomation.com/u/Ujwal_Wankhede)\
**Post date:** [September 4, 2025, 5:07am UTC](https://forum.inductiveautomation.com/t/using-drawing-tools-of-leaflet-in-perspective/110348/2 "2025-09-04T05:07:14Z")

</div>

I never used Leaflet draw app and configured API on current component,  
I believe it used to create, modify, and delete various geometric shapes directly on maps.

If you are exploring alternative then identical tool/props available in ignition is geoJSON and vector layer.

[Perspective - Adding GeoJSON Shapes](https://docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-display-palette/perspective-map/perspective-map-adding-geojson-shapes)

---

<div class="post-metadata">

**Author:** ![alluring-mushroom](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@alluring-mushroom](https://forum.inductiveautomation.com/u/alluring-mushroom)\
**Post date:** [September 4, 2025, 5:49am UTC](https://forum.inductiveautomation.com/t/using-drawing-tools-of-leaflet-in-perspective/110348/3 "2025-09-04T05:49:07Z")

</div>

Indeed, Leaflet draw adds ui elements basically. The geojson and layers are great for the actual rendering, but I was hoping to not need to re-implement the act of clicking on the map etc. It is not too much work, but thought I’d check.

After some more searching, it seems maybe creating a custom component would be the way to use this, since then I can use the libraries directly.

Have you any experience with that?

---

<div class="post-metadata">

**Author:** ![Ujwal\_Wankhede](https://avatars.discourse-cdn.com/v4/letter/u/4af34b/32.png) [@Ujwal\_Wankhede](https://forum.inductiveautomation.com/u/Ujwal_Wankhede)\
**Post date:** [September 4, 2025, 6:13am UTC](https://forum.inductiveautomation.com/t/using-drawing-tools-of-leaflet-in-perspective/110348/4 "2025-09-04T06:13:52Z")

</div>

Thanks for the info! I haven’t worked on creating custom components myself, so I don’t have experience with that yet.
