summaryrefslogtreecommitdiff
path: root/src/mbgl/style/sources/vector_source.cpp
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-01-16 11:38:35 -0800
committerMinh Nguyễn <mxn@1ec5.org>2017-01-16 11:38:35 -0800
commit7ef2843e6a62116667be6a2c12de085951fdd5ea (patch)
tree40eca249e044e2706efd1193d617e6eb8e59d708 /src/mbgl/style/sources/vector_source.cpp
parent76301b252cbc4bc3ae1fc84322bcbcdbd26cae8a (diff)
parent13b97dd0cebffe36b187bdb74923910def6bd87b (diff)
downloadqtlocation-mapboxgl-7ef2843e6a62116667be6a2c12de085951fdd5ea.tar.gz
Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.7
Diffstat (limited to 'src/mbgl/style/sources/vector_source.cpp')
-rw-r--r--src/mbgl/style/sources/vector_source.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mbgl/style/sources/vector_source.cpp b/src/mbgl/style/sources/vector_source.cpp
index f2a6b166a9..4bcd3b8985 100644
--- a/src/mbgl/style/sources/vector_source.cpp
+++ b/src/mbgl/style/sources/vector_source.cpp
@@ -5,7 +5,17 @@ namespace mbgl {
namespace style {
VectorSource::VectorSource(std::string id, variant<std::string, Tileset> urlOrTileset)
- : Source(SourceType::Vector, std::make_unique<VectorSource::Impl>(std::move(id), *this, std::move(urlOrTileset))) {
+ : Source(SourceType::Vector, std::make_unique<VectorSource::Impl>(std::move(id), *this, std::move(urlOrTileset))),
+ impl(static_cast<Impl*>(baseImpl.get())) {
+}
+
+optional<std::string> VectorSource::getURL() const {
+ auto urlOrTileset = impl->getURLOrTileset();
+ if (urlOrTileset.is<std::string>()) {
+ return urlOrTileset.get<std::string>();
+ } else {
+ return {};
+ }
}
} // namespace style