Skip to content

Commit

Permalink
v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
www committed Nov 13, 2015
2 parents e082fd4 + 9ef34c4 commit 5e49b70
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 5 deletions.
20 changes: 20 additions & 0 deletions dist/angular-openlayers-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,14 @@ angular.module('openlayers-directive').directive('olLayer', ["$log", "$q", "olMa
}
}

if (properties.minResolution) {
olLayer.setMinResolution(properties.minResolution);
}

if (properties.maxResolution) {
olLayer.setMaxResolution(properties.maxResolution);
}

} else {
var isNewLayer = (function(olLayer) {
// this function can be used to verify whether a new layer instance has
Expand Down Expand Up @@ -504,6 +512,18 @@ angular.module('openlayers-directive').directive('olLayer', ["$log", "$q", "olMa
olLayer.setStyle(style);
}
}

//set min resolution
if (isDefined(properties.minResolution) &&
!equals(properties.minResolution, oldProperties.minResolution) || isNewLayer(olLayer)) {
olLayer.setMinResolution(properties.minResolution);
}

//set max resolution
if (isDefined(properties.maxResolution) &&
!equals(properties.maxResolution, oldProperties.maxResolution) || isNewLayer(olLayer)) {
olLayer.setMaxResolution(properties.maxResolution);
}
}
}, true);
});
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.

20 changes: 20 additions & 0 deletions dist/angular-openlayers-directive.pre.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,14 @@ angular.module('openlayers-directive').directive('olLayer', function($log, $q, o
}
}

if (properties.minResolution) {
olLayer.setMinResolution(properties.minResolution);
}

if (properties.maxResolution) {
olLayer.setMaxResolution(properties.maxResolution);
}

} else {
var isNewLayer = (function(olLayer) {
// this function can be used to verify whether a new layer instance has
Expand Down Expand Up @@ -504,6 +512,18 @@ angular.module('openlayers-directive').directive('olLayer', function($log, $q, o
olLayer.setStyle(style);
}
}

//set min resolution
if (isDefined(properties.minResolution) &&
!equals(properties.minResolution, oldProperties.minResolution) || isNewLayer(olLayer)) {
olLayer.setMinResolution(properties.minResolution);
}

//set max resolution
if (isDefined(properties.maxResolution) &&
!equals(properties.maxResolution, oldProperties.maxResolution) || isNewLayer(olLayer)) {
olLayer.setMaxResolution(properties.maxResolution);
}
}
}, true);
});
Expand Down
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.2.3"
"version": "1.3.0"
}
20 changes: 20 additions & 0 deletions src/directives/layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ angular.module('openlayers-directive').directive('olLayer', function($log, $q, o
}
}

if (properties.minResolution) {
olLayer.setMinResolution(properties.minResolution);
}

if (properties.maxResolution) {
olLayer.setMaxResolution(properties.maxResolution);
}

} else {
var isNewLayer = (function(olLayer) {
// this function can be used to verify whether a new layer instance has
Expand Down Expand Up @@ -195,6 +203,18 @@ angular.module('openlayers-directive').directive('olLayer', function($log, $q, o
olLayer.setStyle(style);
}
}

//set min resolution
if (isDefined(properties.minResolution) &&
!equals(properties.minResolution, oldProperties.minResolution) || isNewLayer(olLayer)) {
olLayer.setMinResolution(properties.minResolution);
}

//set max resolution
if (isDefined(properties.maxResolution) &&
!equals(properties.maxResolution, oldProperties.maxResolution) || isNewLayer(olLayer)) {
olLayer.setMaxResolution(properties.maxResolution);
}
}
}, true);
});
Expand Down

0 comments on commit 5e49b70

Please sign in to comment.