Skip to content

Commit f31e2a0

Browse files
committed
v1.7.0
2 parents 0c8a038 + 3d056ae commit f31e2a0

File tree

6 files changed

+22
-14
lines changed

6 files changed

+22
-14
lines changed

dist/angular-openlayers-directive.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,14 +1688,16 @@ angular.module('openlayers-directive').factory('olHelpers', ["$q", "$log", "$htt
16881688
});
16891689
break;
16901690
case 'XYZ':
1691-
if (!source.url) {
1692-
$log.error('[AngularJS - Openlayers] - XYZ Layer needs valid url and params properties');
1691+
if (!source.url && !source.tileUrlFunction) {
1692+
$log.error('[AngularJS - Openlayers] - XYZ Layer needs valid url or tileUrlFunction properties');
16931693
}
16941694
oSource = new ol.source.XYZ({
16951695
url: source.url,
16961696
attributions: createAttribution(source),
16971697
minZoom: source.minZoom,
1698-
maxZoom: source.maxZoom
1698+
maxZoom: source.maxZoom,
1699+
projection: source.projection,
1700+
tileUrlFunction: source.tileUrlFunction
16991701
});
17001702
break;
17011703
}

dist/angular-openlayers-directive.min.js

Lines changed: 3 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: 3 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: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,14 +1688,16 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
16881688
});
16891689
break;
16901690
case 'XYZ':
1691-
if (!source.url) {
1692-
$log.error('[AngularJS - Openlayers] - XYZ Layer needs valid url and params properties');
1691+
if (!source.url && !source.tileUrlFunction) {
1692+
$log.error('[AngularJS - Openlayers] - XYZ Layer needs valid url or tileUrlFunction properties');
16931693
}
16941694
oSource = new ol.source.XYZ({
16951695
url: source.url,
16961696
attributions: createAttribution(source),
16971697
minZoom: source.minZoom,
1698-
maxZoom: source.maxZoom
1698+
maxZoom: source.maxZoom,
1699+
projection: source.projection,
1700+
tileUrlFunction: source.tileUrlFunction
16991701
});
17001702
break;
17011703
}

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.6.0"
64+
"version": "1.7.0"
6565
}

src/services/olHelpers.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,14 +514,16 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
514514
});
515515
break;
516516
case 'XYZ':
517-
if (!source.url) {
518-
$log.error('[AngularJS - Openlayers] - XYZ Layer needs valid url and params properties');
517+
if (!source.url && !source.tileUrlFunction) {
518+
$log.error('[AngularJS - Openlayers] - XYZ Layer needs valid url or tileUrlFunction properties');
519519
}
520520
oSource = new ol.source.XYZ({
521521
url: source.url,
522522
attributions: createAttribution(source),
523523
minZoom: source.minZoom,
524-
maxZoom: source.maxZoom
524+
maxZoom: source.maxZoom,
525+
projection: source.projection,
526+
tileUrlFunction: source.tileUrlFunction
525527
});
526528
break;
527529
}

0 commit comments

Comments
 (0)