[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:
committed by
Minh Nguyễn
parent
a9842dbd6b
commit
7ff036cd01
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user