Skip to content

Commit

Permalink
Fix merged feature tile contributions.
Browse files Browse the repository at this point in the history
  • Loading branch information
josephbirkner committed Aug 29, 2024
1 parent f7381a8 commit 95a28ec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions erdblick_app/app/visualization.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,11 @@ export class TileVisualization {
}
});
}

this.primitiveCollection = visualization.primitiveCollection();
for (const [mapLayerStyleRuleId, mergedPointVisualizations] of Object.entries(visualization.mergedPointFeatures())) {
this.pointMergeService.insert(mergedPointVisualizations as MergedPointVisualization[], this.tile.tileId, mapLayerStyleRuleId);
}
visualization.delete();
return true;
});
Expand Down Expand Up @@ -265,6 +269,11 @@ export class TileVisualization {
return;
}

// Remove point-merge contributions that were made by this map-layer+style visualization combo.
this.pointMergeService.remove(
this.tile.tileId,
`${this.tile.mapName}:${this.tile.layerName}:${this.style.name()}`);

if (this.primitiveCollection) {
viewer.scene.primitives.remove(this.primitiveCollection);
if (!this.primitiveCollection.isDestroyed())
Expand Down
3 changes: 2 additions & 1 deletion libs/core/src/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,8 @@ EMSCRIPTEN_BINDINGS(erdblick)
////////// FeatureLayerStyle
em::register_vector<FeatureStyleOption>("FeatureStyleOptions");
em::class_<FeatureLayerStyle>("FeatureLayerStyle").constructor<SharedUint8Array&>()
.function("options", &FeatureLayerStyle::options, em::allow_raw_pointers());
.function("options", &FeatureLayerStyle::options, em::allow_raw_pointers())
.function("name", &FeatureLayerStyle::name);

em::enum_<mapget::TileSourceDataLayer::SourceDataAddressFormat>("SourceDataAddressFormat")
.value("UNKNOWN", mapget::TileSourceDataLayer::SourceDataAddressFormat::Unknown)
Expand Down

0 comments on commit 95a28ec

Please sign in to comment.