Skip to content

Commit

Permalink
v1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
www committed Nov 20, 2015
2 parents 00743ec + a782cba commit 60b31a1
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 13 deletions.
5 changes: 4 additions & 1 deletion dist/angular-openlayers-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -2054,8 +2054,11 @@ angular.module('openlayers-directive').factory('olHelpers', ["$q", "$log", "$htt

insertLayer: function(layers, index, layer) {
if (layers.getLength() < index) {
// fill up with "null layers" till we get to the desired index
while (layers.getLength() < index) {
layers.push(null);
var nullLayer = new ol.layer.Image();
nullLayer.index = layers.getLength(); // add index which will be equal to the length in this case
layers.push(nullLayer);
}
layer.index = index;
layers.push(layer);
Expand Down
4 changes: 2 additions & 2 deletions dist/angular-openlayers-directive.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/angular-openlayers-directive.min.no-header.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/angular-openlayers-directive.pre.js
Original file line number Diff line number Diff line change
Expand Up @@ -2054,8 +2054,11 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $

insertLayer: function(layers, index, layer) {
if (layers.getLength() < index) {
// fill up with "null layers" till we get to the desired index
while (layers.getLength() < index) {
layers.push(null);
var nullLayer = new ol.layer.Image();
nullLayer.index = layers.getLength(); // add index which will be equal to the length in this case
layers.push(nullLayer);
}
layer.index = index;
layers.push(layer);
Expand Down
10 changes: 5 additions & 5 deletions doc/03-defaults-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This sub-directive needs the **openlayers** main directive, so it is normaly used as an attribute of the *openlayers* tag, like this:

```
<openlayers defaults="defaults"></openlayers>
<openlayers ol-defaults="defaults"></openlayers>
```

It will define the default parameters from which we want to initialize our map. It's not used as a bi-directional attribute, so it will only apply the initial map parameters and nothing more. Let's see its possibilities.
Expand All @@ -20,8 +20,8 @@ angular.extend($scope, {
layer: {
url: "http://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png"
},
map: {
scrollWheelZoom: false
interactions: {
mouseWheelZoom: false
},
controls: {
zoom: {
Expand All @@ -34,7 +34,7 @@ angular.extend($scope, {

And after that, in our HTML code we will define our openlayers directive like this:
```
<openlayers defaults="defaults"></openlayers>
<openlayers ol-defaults="defaults"></openlayers>
```

And that's all. A full example of using this attribute can be found [here](http://tombatossals.github.io/angular-openlayers-directive/examples/custom-parameters-example.html).
And that's all. A full example of using this attribute can be found [here](http://tombatossals.github.io/angular-openlayers-directive/examples/030-custom-parameters-example.html).
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"main": "dist/angular-openlayers-directive",
"version": "1.4.0"
"version": "1.4.1"
}
5 changes: 4 additions & 1 deletion src/services/olHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -902,8 +902,11 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $

insertLayer: function(layers, index, layer) {
if (layers.getLength() < index) {
// fill up with "null layers" till we get to the desired index
while (layers.getLength() < index) {
layers.push(null);
var nullLayer = new ol.layer.Image();
nullLayer.index = layers.getLength(); // add index which will be equal to the length in this case
layers.push(nullLayer);
}
layer.index = index;
layers.push(layer);
Expand Down

0 comments on commit 60b31a1

Please sign in to comment.