adding api key to tiles base urls with querystring
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const dateWrapper = require('./date-wrapper');
|
||||
const querystring = require('querystring');
|
||||
|
||||
module.exports = class LayergroupMetadata {
|
||||
constructor (resourceLocator) {
|
||||
@@ -87,7 +88,7 @@ module.exports = class LayergroupMetadata {
|
||||
addTileJsonMetadata (layergroup, user, mapconfig, userApiKey = null) {
|
||||
const isVectorOnlyMapConfig = mapconfig.isVectorOnlyMapConfig();
|
||||
let hasMapnikLayers = false;
|
||||
const apiKey = userApiKey ? `?api_key=${userApiKey}` : '';
|
||||
const apiKey = userApiKey ? '?' + querystring.stringify({api_key: userApiKey}) : '';
|
||||
|
||||
layergroup.metadata.layers.forEach((layerMetadata, index) => {
|
||||
const layerId = mapconfig.getLayerId(index);
|
||||
|
||||
Reference in New Issue
Block a user