summaryrefslogtreecommitdiff
path: root/src/map/map.cpp
diff options
context:
space:
mode:
authorMike Morris <michael.patrick.morris@gmail.com>2014-08-25 16:13:24 -0400
committerMike Morris <michael.patrick.morris@gmail.com>2014-08-25 16:13:24 -0400
commit7ae3b8e8ee5f59481fb8373df1d17d25cccce2f0 (patch)
tree4fd36aa34fc9f5f3096cb60a6eb4c083fced9d43 /src/map/map.cpp
parent3466f364121b3a0a157ce62c417c94802484351a (diff)
parent3d9a2932584b1230c8be47e6935f794cede8fe85 (diff)
downloadqtlocation-mapboxgl-7ae3b8e8ee5f59481fb8373df1d17d25cccce2f0.tar.gz
Merge branch 'master' into libuv010
Diffstat (limited to 'src/map/map.cpp')
-rw-r--r--src/map/map.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/map.cpp b/src/map/map.cpp
index 8caea4c797..8590b464bb 100644
--- a/src/map/map.cpp
+++ b/src/map/map.cpp
@@ -11,6 +11,7 @@
#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>
@@ -211,7 +212,7 @@ void Map::setStyleJSON(std::string newStyleJSON, const std::string &base) {
sprite.reset();
style->loadJSON((const uint8_t *)styleJSON.c_str());
fileSource->setBase(base);
- glyphStore->setURL(style->glyph_url);
+ glyphStore->setURL(util::mapbox::normalizeGlyphsURL(style->glyph_url, getAccessToken()));
update();
}
@@ -469,7 +470,8 @@ void Map::updateSources() {
for (const std::shared_ptr<StyleSource> &style_source : activeSources) {
if (style_source->enabled) {
if (!style_source->source) {
- style_source->source = std::make_shared<Source>(style_source->info, getAccessToken());
+ style_source->source = std::make_shared<Source>(style_source->info);
+ style_source->source->load(*this);
}
} else {
style_source->source.reset();