diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-08-25 17:54:02 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-08-26 10:30:55 -0700 |
commit | f07f59207825206172ac8aa46a74ea797d287ce7 (patch) | |
tree | 40db24112c08adc271719291941cd7fafdf980f6 /src/mbgl/style/sources | |
parent | d2abb1b6d5cc129acaadab15152ae286b989d9ba (diff) | |
download | qtlocation-mapboxgl-f07f59207825206172ac8aa46a74ea797d287ce7.tar.gz |
[core] Simplify GeoJSONTile constructor
Diffstat (limited to 'src/mbgl/style/sources')
-rw-r--r-- | src/mbgl/style/sources/geojson_source_impl.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mbgl/style/sources/geojson_source_impl.cpp b/src/mbgl/style/sources/geojson_source_impl.cpp index 8dc0d9bb85..1e02270819 100644 --- a/src/mbgl/style/sources/geojson_source_impl.cpp +++ b/src/mbgl/style/sources/geojson_source_impl.cpp @@ -128,11 +128,17 @@ std::unique_ptr<Tile> GeoJSONSource::Impl::createTile(const OverscaledTileID& ti assert(loaded); if (geoJSONOrSupercluster.is<GeoJSONVTPointer>()) { return std::make_unique<GeoJSONTile>(tileID, base.getID(), parameters, - *geoJSONOrSupercluster.get<GeoJSONVTPointer>()); + geoJSONOrSupercluster.get<GeoJSONVTPointer>()->getTile( + tileID.canonical.z, + tileID.canonical.x, + tileID.canonical.y).features); } else { assert(geoJSONOrSupercluster.is<SuperclusterPointer>()); return std::make_unique<GeoJSONTile>(tileID, base.getID(), parameters, - *geoJSONOrSupercluster.get<SuperclusterPointer>()); + geoJSONOrSupercluster.get<SuperclusterPointer>()->getTile( + tileID.canonical.z, + tileID.canonical.x, + tileID.canonical.y)); } } |