This directive allows you to embed a map on your AngularJS application and interact bi-directionally with it via the AngularJS scope and the leaflet map library API. In its current state, it's not a full-featured library, although it's easy to use and extend, and a good starting point to learn to code a directive into the great AngularJS library.
The code of the directive and this page has been inspired by the Angular Google Maps directive developed by nlaplante & nmccready. The initial code has been (and is being) evolved and improved by these contributors.
Before using angular-leaflet-directive, you must include some javascript files to your main HTML:
Something like this:
And that's all. Now you can start embedding maps to your application adding the custom tag <leaflet>
with some attributes on your HTML code, and interacting with the scope of your controller. Let's see how it works and how you can use it in the examples page, or take a look of what can be accomplished with it on the demos below.