Skip to content

Commit

Permalink
v1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
www committed Jan 11, 2016
2 parents 0c8a038 + 3d056ae commit f31e2a0
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 14 deletions.
8 changes: 5 additions & 3 deletions dist/angular-openlayers-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -1688,14 +1688,16 @@ angular.module('openlayers-directive').factory('olHelpers', ["$q", "$log", "$htt
});
break;
case 'XYZ':
if (!source.url) {
$log.error('[AngularJS - Openlayers] - XYZ Layer needs valid url and params properties');
if (!source.url && !source.tileUrlFunction) {
$log.error('[AngularJS - Openlayers] - XYZ Layer needs valid url or tileUrlFunction properties');
}
oSource = new ol.source.XYZ({
url: source.url,
attributions: createAttribution(source),
minZoom: source.minZoom,
maxZoom: source.maxZoom
maxZoom: source.maxZoom,
projection: source.projection,
tileUrlFunction: source.tileUrlFunction
});
break;
}
Expand Down
5 changes: 3 additions & 2 deletions dist/angular-openlayers-directive.min.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions dist/angular-openlayers-directive.pre.js
Original file line number Diff line number Diff line change
Expand Up @@ -1688,14 +1688,16 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
});
break;
case 'XYZ':
if (!source.url) {
$log.error('[AngularJS - Openlayers] - XYZ Layer needs valid url and params properties');
if (!source.url && !source.tileUrlFunction) {
$log.error('[AngularJS - Openlayers] - XYZ Layer needs valid url or tileUrlFunction properties');
}
oSource = new ol.source.XYZ({
url: source.url,
attributions: createAttribution(source),
minZoom: source.minZoom,
maxZoom: source.maxZoom
maxZoom: source.maxZoom,
projection: source.projection,
tileUrlFunction: source.tileUrlFunction
});
break;
}
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.6.0"
"version": "1.7.0"
}
8 changes: 5 additions & 3 deletions src/services/olHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,14 +514,16 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
});
break;
case 'XYZ':
if (!source.url) {
$log.error('[AngularJS - Openlayers] - XYZ Layer needs valid url and params properties');
if (!source.url && !source.tileUrlFunction) {
$log.error('[AngularJS - Openlayers] - XYZ Layer needs valid url or tileUrlFunction properties');
}
oSource = new ol.source.XYZ({
url: source.url,
attributions: createAttribution(source),
minZoom: source.minZoom,
maxZoom: source.maxZoom
maxZoom: source.maxZoom,
projection: source.projection,
tileUrlFunction: source.tileUrlFunction
});
break;
}
Expand Down

0 comments on commit f31e2a0

Please sign in to comment.