Skip to content

Commit 60b31a1

Browse files
committed
v1.4.1
2 parents 00743ec + a782cba commit 60b31a1

File tree

7 files changed

+22
-13
lines changed

7 files changed

+22
-13
lines changed

dist/angular-openlayers-directive.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2054,8 +2054,11 @@ angular.module('openlayers-directive').factory('olHelpers', ["$q", "$log", "$htt
20542054

20552055
insertLayer: function(layers, index, layer) {
20562056
if (layers.getLength() < index) {
2057+
// fill up with "null layers" till we get to the desired index
20572058
while (layers.getLength() < index) {
2058-
layers.push(null);
2059+
var nullLayer = new ol.layer.Image();
2060+
nullLayer.index = layers.getLength(); // add index which will be equal to the length in this case
2061+
layers.push(nullLayer);
20592062
}
20602063
layer.index = index;
20612064
layers.push(layer);

dist/angular-openlayers-directive.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-openlayers-directive.min.no-header.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-openlayers-directive.pre.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2054,8 +2054,11 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
20542054

20552055
insertLayer: function(layers, index, layer) {
20562056
if (layers.getLength() < index) {
2057+
// fill up with "null layers" till we get to the desired index
20572058
while (layers.getLength() < index) {
2058-
layers.push(null);
2059+
var nullLayer = new ol.layer.Image();
2060+
nullLayer.index = layers.getLength(); // add index which will be equal to the length in this case
2061+
layers.push(nullLayer);
20592062
}
20602063
layer.index = index;
20612064
layers.push(layer);

doc/03-defaults-attribute.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
This sub-directive needs the **openlayers** main directive, so it is normaly used as an attribute of the *openlayers* tag, like this:
55

66
```
7-
<openlayers defaults="defaults"></openlayers>
7+
<openlayers ol-defaults="defaults"></openlayers>
88
```
99

1010
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.
@@ -20,8 +20,8 @@ angular.extend($scope, {
2020
layer: {
2121
url: "http://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png"
2222
},
23-
map: {
24-
scrollWheelZoom: false
23+
interactions: {
24+
mouseWheelZoom: false
2525
},
2626
controls: {
2727
zoom: {
@@ -34,7 +34,7 @@ angular.extend($scope, {
3434

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

40-
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).
40+
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).

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@
6161
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
6262
},
6363
"main": "dist/angular-openlayers-directive",
64-
"version": "1.4.0"
64+
"version": "1.4.1"
6565
}

src/services/olHelpers.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,8 +902,11 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
902902

903903
insertLayer: function(layers, index, layer) {
904904
if (layers.getLength() < index) {
905+
// fill up with "null layers" till we get to the desired index
905906
while (layers.getLength() < index) {
906-
layers.push(null);
907+
var nullLayer = new ol.layer.Image();
908+
nullLayer.index = layers.getLength(); // add index which will be equal to the length in this case
909+
layers.push(nullLayer);
907910
}
908911
layer.index = index;
909912
layers.push(layer);

0 commit comments

Comments
 (0)