[core][android][darwin] Fix GeoJSONOptions handling
- share the `GeoJSONOptions` instances using `Immutable<GeoJSONOptions>` - avoid extra copying - fix wrapping of the `GeoJSONOptions` instances in supercluster map/reduce lambdas. Previously, local variables were wrapped by reference.
This commit is contained in:
@@ -852,10 +852,8 @@ TEST(Source, RenderTileSetSourceUpdate) {
|
||||
TEST(Source, GeoJSONSourceTilesAfterDataReset) {
|
||||
SourceTest test;
|
||||
GeoJSONSource source("source");
|
||||
auto geoJSONData = GeoJSONData::create(
|
||||
mapbox::geojson::parse(
|
||||
R"({"geometry": {"type": "Point", "coordinates": [1.1, 1.1]}, "type": "Feature", "properties": {}})"),
|
||||
{});
|
||||
auto geoJSONData = GeoJSONData::create(mapbox::geojson::parse(
|
||||
R"({"geometry": {"type": "Point", "coordinates": [1.1, 1.1]}, "type": "Feature", "properties": {}})"));
|
||||
source.setGeoJSONData(geoJSONData);
|
||||
RenderGeoJSONSource renderSource{staticImmutableCast<GeoJSONSource::Impl>(source.baseImpl)};
|
||||
|
||||
@@ -879,4 +877,4 @@ TEST(Source, GeoJSONSourceTilesAfterDataReset) {
|
||||
static_cast<RenderSource&>(renderSource)
|
||||
.update(source.baseImpl, layers, true, true, test.tileParameters(MapMode::Static));
|
||||
EXPECT_TRUE(renderSource.isLoaded()); // Tiles are reset in static mode.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user