[core] Removed map attribution API

Since client code can readily access the individual sources, Map doesn’t need to expose a dedicated API for iterating over them.
This commit is contained in:
Minh Nguyễn
2016-09-26 15:42:10 -07:00
committed by Minh Nguyễn
parent a9842dbd6b
commit 7ff036cd01
9 changed files with 16 additions and 33 deletions

View File

@@ -118,8 +118,12 @@ Range<uint8_t> TileSourceImpl::getZoomRange() {
return tileset.zoomRange;
}
std::string TileSourceImpl::getAttribution() const {
return loaded ? tileset.attribution : "";
optional<std::string> TileSourceImpl::getAttribution() const {
if (loaded && !tileset.attribution.empty()) {
return tileset.attribution;
} else {
return {};
}
}
} // namespace style