Skip to content

Commit

Permalink
feat(olHelpers.js): Support for Multiple Tile Server in XYZ Tile Layer (
Browse files Browse the repository at this point in the history
#392)

This is the code enhancement for Issue #391.
  • Loading branch information
sathishatnet authored and juristr committed Mar 6, 2018
1 parent 1ac69e2 commit 047ef8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/services/olHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,11 +632,12 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $
});
break;
case 'XYZ':
if (!source.url && !source.tileUrlFunction) {
$log.error('[AngularJS - Openlayers] - XYZ Layer needs valid url or tileUrlFunction properties');
if (!source.url && !source.urls && !source.tileUrlFunction) {
$log.error('[AngularJS - Openlayers] - XYZ Layer needs valid url(s) or tileUrlFunction properties');
}
oSource = new ol.source.XYZ({
url: source.url,
urls: source.urls,
attributions: createAttribution(source),
minZoom: source.minZoom,
maxZoom: source.maxZoom,
Expand Down

0 comments on commit 047ef8c

Please sign in to comment.