Tiny Leaflet Directive Released

Martin Tesar

Last week, we’ve released first CleverAnalytics open-source project called Tiny Leaflet Directive. It is a tiny JavaScript library that allows you to embed LeafletJS map in AngularJS applications. These two frameworks are core of our frontend stack and Tiny Leaflet Directive connects them loosely together.

When we started building our product a year ago, we used great Angular Leaflet Directive by David Rubert for the same task. It helps anyone with the knowledge of Angular and with very little knowledge of LeafletJS to do complex map visualizations. It supports multiple map layers, event handling and much more. This has become to be a major bottleneck for us. It registers too many watchers to ease common map tasks (add/remove layers, listen for events…). When we had to display a lot of data, the $digest cycle became flooded by map events. Now we know better and the key is simplicity.