diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-09-28 15:06:41 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-09-28 15:06:41 +0200 |
commit | a84cf6242442626d9205231f6855a4c2a981293f (patch) | |
tree | 9f4777ab22cef5eb5db72fafa5f43fe4f425493e /src/mbgl/util/mapbox.hpp | |
parent | 81fde4261f2430a428f7dea98cdc524e4a3e31f5 (diff) | |
download | qtlocation-mapboxgl-a84cf6242442626d9205231f6855a4c2a981293f.tar.gz |
[core] include api.mapbox.com in canonicalization
and move the canonicalization to mapbox.cpp since it's not specific to the SQLiteCache
Diffstat (limited to 'src/mbgl/util/mapbox.hpp')
-rw-r--r-- | src/mbgl/util/mapbox.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mbgl/util/mapbox.hpp b/src/mbgl/util/mapbox.hpp index 9c24dda0e6..57f87e7959 100644 --- a/src/mbgl/util/mapbox.hpp +++ b/src/mbgl/util/mapbox.hpp @@ -14,6 +14,12 @@ std::string normalizeSpriteURL(const std::string& url, const std::string& access std::string normalizeGlyphsURL(const std::string& url, const std::string& accessToken); std::string normalizeTileURL(const std::string& url, const std::string& sourceURL, SourceType sourceType); +// Canonicalizes Mapbox URLs by removing [a-d] subdomain prefixes, access tokens, and protocol. +// Note that this is close, but not exactly the reverse operation as above, as this retains certain +// information, such as the API version. It is used to cache resources retrieved from the URL, that +// sometimes have multiple valid URLs. +std::string canonicalURL(const std::string &url); + } } } |