Do not create layergroup if it is already provided
This commit is contained in:
parent
aa6d01f151
commit
04da57fe0c
@ -471,6 +471,11 @@ TestClient.prototype.getTile = function(z, x, y, params, callback) {
|
||||
}
|
||||
|
||||
var layergroupId;
|
||||
|
||||
if (params.layergroupid) {
|
||||
layergroupId = params.layergroupid
|
||||
}
|
||||
|
||||
step(
|
||||
function createTemplate () {
|
||||
var next = this;
|
||||
@ -512,6 +517,10 @@ TestClient.prototype.getTile = function(z, x, y, params, callback) {
|
||||
function createLayergroup(err, templateId) {
|
||||
var next = this;
|
||||
|
||||
if (layergroupId) {
|
||||
return next(null, layergroupId);
|
||||
}
|
||||
|
||||
var data = templateId ? params.placeholders : self.mapConfig
|
||||
var path = templateId ?
|
||||
urlNamed + '/' + templateId + '?' + qs.stringify({api_key: self.apiKey}) :
|
||||
|
Loading…
Reference in New Issue
Block a user