1 #pragma once 2 3 #include <string> 4 #include <mbgl/style/types.hpp> 5 6 namespace mbgl { 7 8 class Tileset; 9 10 namespace util { 11 namespace mapbox { 12 13 bool isMapboxURL(const std::string& url); 14 15 std::string normalizeSourceURL(const std::string& baseURL, const std::string& url, const std::string& accessToken); 16 std::string normalizeStyleURL(const std::string& baseURL, const std::string& url, const std::string& accessToken); 17 std::string normalizeSpriteURL(const std::string& baseURL, const std::string& url, const std::string& accessToken); 18 std::string normalizeGlyphsURL(const std::string& baseURL, const std::string& url, const std::string& accessToken); 19 std::string normalizeTileURL(const std::string& baseURL, const std::string& url, const std::string& accessToken); 20 21 // Return a "mapbox://tiles/..." URL (suitable for normalizeTileURL) for the given Mapbox tile URL. 22 std::string canonicalizeTileURL(const std::string& url, style::SourceType, uint16_t tileSize); 23 24 // Replace URL templates with "mapbox://tiles/..." URLs (suitable for normalizeTileURL). 25 void canonicalizeTileset(Tileset&, const std::string& url, style::SourceType, uint16_t tileSize); 26 27 extern const uint64_t DEFAULT_OFFLINE_TILE_COUNT_LIMIT; 28 29 } // namespace mapbox 30 } // namespace util 31 } // namespace mbgl 32