Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

njirem/angular-openlayers-directive

This branch is 28 commits behind tombatossals/angular-openlayers-directive:master.

Folders and files

NameName
Last commit message
Last commit date
Jan 18, 2015
Jun 2, 2016
Jun 29, 2016
Jun 10, 2016
Aug 2, 2016
Jul 27, 2016
Nov 30, 2013
Sep 27, 2015
Jul 25, 2016
Sep 27, 2015
Sep 27, 2015
Jan 19, 2016
Jan 26, 2016
Sep 4, 2014
Nov 14, 2014
Sep 27, 2015
Jun 10, 2016
Jun 29, 2016

Repository files navigation

angular-openlayers-directive

Build Status semantic-release npm version

Work in progress.

AngularJS directive for the OpenLayers (version 3) Javascript Library. This software allows you to embed maps managed by openlayers on your AnguarJS or OpenLayers project. It's a good starting point to learn the Openlayers API too.

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:

Install

Build the files yourself, download from bower

$ bower install angular-openlayers-directive --save

or from npm

$ npm install angular-openlayers-directive --save

Quick start: How to use it

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:

angular.extend($scope, {
    center: {
        lat: 51.505,
        lon: -0.09,
        zoom: 8
    }
});

Finally, you must include the markup directive on your HTML page, like this:

<openlayers ol-center="center" height="480px" width="640px"></openlayers>

Contributing

Contributions are more than welcome. Please refer to the contributions guidelines for more details on code style, development life-cycle etc.

About

AngularJS directive to embed an interact with maps managed by the OpenLayers library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.1%
  • CSS 0.9%