From ad82f4f5db01d768c459670280245a98fb2fec90 Mon Sep 17 00:00:00 2001 From: Molly Lloyd Date: Tue, 23 May 2017 09:46:21 +0200 Subject: [PATCH] add access_token param --- src/ui/control/attribution_control.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/control/attribution_control.js b/src/ui/control/attribution_control.js index 2ea5693685b..ff6295ebc1d 100644 --- a/src/ui/control/attribution_control.js +++ b/src/ui/control/attribution_control.js @@ -2,6 +2,7 @@ const DOM = require('../../util/dom'); const util = require('../../util/util'); +const config = require('../../util/config'); /** * An `AttributionControl` control presents the map's [attribution information](https://www.mapbox.com/help/attribution/). @@ -69,7 +70,7 @@ class AttributionControl { if (!this._editLink) this._editLink = this._container.querySelector('.mapbox-improve-map'); if (this._editLink) { const center = this._map.getCenter(); - const styleParams = (this.styleOwner && this.styleId) ? `?owner=${this.styleOwner}&id=${this.styleId}` : ''; + const styleParams = (this.styleOwner && this.styleId) ? config.ACCESS_TOKEN ? `?owner=${this.styleOwner}&id=${this.styleId}&access_token=${config.ACCESS_TOKEN}` : `?owner=${this.styleOwner}&id=${this.styleId}` : ''; this._editLink.href = `https://www.mapbox.com/feedback/${styleParams}#/${ Math.round(center.lng * 1000) / 1000}/${Math.round(center.lat * 1000) / 1000}/${Math.round(this._map.getZoom())}`; }