Ignore tile URL sharding

The source returns sharded tile URLs, but sharding doesn’t buy us anything on native platforms, so always grab the first.

ref mapbox/mapbox-gl-native#2007
This commit is contained in:
Minh Nguyễn
2015-08-06 10:37:46 -07:00
parent b8a82d5755
commit bea457697a

View File

@@ -98,7 +98,7 @@ void SourceInfo::parseTileJSONProperties(const rapidjson::Value& value) {
}
std::string SourceInfo::tileURL(const TileID& id, float pixelRatio) const {
std::string result = tiles.at((id.x + id.y) % tiles.size());
std::string result = tiles.at(0);
result = util::mapbox::normalizeTileURL(result, url, type);
result = util::replaceTokens(result, [&](const std::string &token) -> std::string {
if (token == "z") return util::toString(std::min(id.z, static_cast<int8_t>(max_zoom)));