angular-openlayers-directive - An AngularJS directive to easily interact with Openlayers maps
Work in progress.
Let's start with some basic examples. Look at the source code of the example to see all the code you need to embed a similar interactive map on our page.
You can take a look at the current documentation go get a more detailed explanation of how it works and what you can accomplish with this directive:
Build the files yourself, download from bower
$ bower install angular-openlayers-directive --save
or from npm
$ npm install angular-openlayers-directive --save
First of all, load AngularJS and Openlayers(V3) in your HTML.
After that, you must include the openlayers-directive dependency on your angular module:
var app = angular.module("demoapp", ["openlayers-directive"]);
The default behaviour will show an OpenstreetMap layer and the zoom and attributions controls, but you can customize those default vaules to fit your needs. Furthermore, you can set a bi-directional update of values between the map and the variables of your controler. This way you can interact easily with the map. Example:
Finally, you must include the markup directive on your HTML page, like this:
Contributions are more than welcome. Please refer to the contributions guidelines for more details on code style, development life-cycle etc.