if (typeof data === 'string') {
data = new Resource({
url: data,
queryParameters: {
access_token: this._accessToken
}
})
}
...
if (this._accessToken)
data.appendQueryParameters({
access_token: this._accessToken
})
The Resource class in CesiumJS will handle queryParameters automatically. And the next step, you've explicitly handled it again.
I think it's probably fine for most services, but unfortunately api.mapbox.com doesn't seem to split the access_token by &. All query parameters after the first access_token are considered as the access_token.
The Resource class in CesiumJS will handle queryParameters automatically. And the next step, you've explicitly handled it again.
I think it's probably fine for most services, but unfortunately
api.mapbox.com
doesn't seem to split theaccess_token
by&
. All query parameters after the firstaccess_token
are considered as theaccess_token
.