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;
|
var layergroupId;
|
||||||
|
|
||||||
|
if (params.layergroupid) {
|
||||||
|
layergroupId = params.layergroupid
|
||||||
|
}
|
||||||
|
|
||||||
step(
|
step(
|
||||||
function createTemplate () {
|
function createTemplate () {
|
||||||
var next = this;
|
var next = this;
|
||||||
@ -512,6 +517,10 @@ TestClient.prototype.getTile = function(z, x, y, params, callback) {
|
|||||||
function createLayergroup(err, templateId) {
|
function createLayergroup(err, templateId) {
|
||||||
var next = this;
|
var next = this;
|
||||||
|
|
||||||
|
if (layergroupId) {
|
||||||
|
return next(null, layergroupId);
|
||||||
|
}
|
||||||
|
|
||||||
var data = templateId ? params.placeholders : self.mapConfig
|
var data = templateId ? params.placeholders : self.mapConfig
|
||||||
var path = templateId ?
|
var path = templateId ?
|
||||||
urlNamed + '/' + templateId + '?' + qs.stringify({api_key: self.apiKey}) :
|
urlNamed + '/' + templateId + '?' + qs.stringify({api_key: self.apiKey}) :
|
||||||
|
Loading…
Reference in New Issue
Block a user