Move setAccessToken to CachingHTTPFileSource

This commit is contained in:
John Firebaugh
2014-12-04 17:03:23 -08:00
parent 0a942b6f14
commit ff640132de
9 changed files with 42 additions and 44 deletions

View File

@@ -12,7 +12,6 @@
#include <mbgl/util/constants.hpp>
#include <mbgl/util/uv_detail.hpp>
#include <mbgl/util/std.hpp>
#include <mbgl/util/mapbox.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/text/glyph_store.hpp>
#include <mbgl/geometry/glyph_atlas.hpp>
@@ -313,7 +312,7 @@ void Map::setStyleJSON(std::string newStyleJSON, const std::string &base) {
}
style->loadJSON((const uint8_t *)styleJSON.c_str());
fileSource.setBase(base);
glyphStore->setURL(util::mapbox::normalizeGlyphsURL(style->glyph_url, getAccessToken()));
glyphStore->setURL(style->glyph_url);
update();
}
@@ -321,15 +320,6 @@ std::string Map::getStyleJSON() const {
return styleJSON;
}
void Map::setAccessToken(std::string accessToken_) {
// TODO: Make threadsafe.
accessToken.swap(accessToken_);
}
std::string Map::getAccessToken() const {
return accessToken;
}
util::ptr<Sprite> Map::getSprite() {
const float pixelRatio = state.getPixelRatio();
const std::string &sprite_url = style->getSpriteURL();