Skip to content

Commit

Permalink
add access_token param
Browse files Browse the repository at this point in the history
  • Loading branch information
Molly Lloyd committed May 23, 2017
1 parent ef0eb1f commit c13c3e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ui/control/attribution_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
Expand Down Expand Up @@ -68,8 +69,9 @@ class AttributionControl {
_updateEditLink() {
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) ? `?owner=${this.styleOwner}&id=${this.styleId}&access_token=${config.ACCESS_TOKEN}` : '';
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())}`;
}
Expand Down

0 comments on commit c13c3e9

Please sign in to comment.