diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 267e92eb1..77b1830d3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,10 +23,10 @@ browse http://localhost:1234 The examples use a compiled version of OLCesium. If you want to use the source code directly you can define an alias. See https://en.parceljs.org/module_resolution.html#aliases -### The `check` target +### The `checks` target ```bash -npm run check +npm run checks ``` Run this before every commit. It will catch many problems quickly. diff --git a/src/olcs/FeatureConverter.ts b/src/olcs/FeatureConverter.ts index 0e8145ee4..0cd7260ae 100644 --- a/src/olcs/FeatureConverter.ts +++ b/src/olcs/FeatureConverter.ts @@ -1165,6 +1165,10 @@ export default class FeatureConverter { if (!feature) { continue; } + const skip = feature.get('olcs_skip'); + if (skip) { + continue; + } const layerStyle: StyleFunction | undefined = olLayer.getStyleFunction(); const styles = this.computePlainStyle(olLayer, feature, layerStyle, resolution); @@ -1203,6 +1207,11 @@ export default class FeatureConverter { * @api */ convert(layer: VectorLayer, view: View, feature: Feature, context: OlFeatureToCesiumContext): PrimitiveCollection { + const skip = feature.get('olcs_skip'); + if (skip) { + return null; + } + const proj = view.getProjection(); const resolution = view.getResolution(); diff --git a/src/olcs/VectorSynchronizer.ts b/src/olcs/VectorSynchronizer.ts index fceed607a..2a6310780 100644 --- a/src/olcs/VectorSynchronizer.ts +++ b/src/olcs/VectorSynchronizer.ts @@ -96,6 +96,11 @@ export default class VectorSynchronizer extends olcsAbstractSynchronizer { + const skip = feature.get('olcs_skip'); + if (skip) { + return; + } const id = getUid(feature); const context: OlFeatureToCesiumContext = counterpart.context; const bbs = context.featureToCesiumMap[id]; @@ -152,6 +161,10 @@ export default class VectorSynchronizer extends olcsAbstractSynchronizer { const feature = e.feature; console.assert(feature); + const skip = feature.get('olcs_skip'); + if (skip) { + return; + } onRemoveFeature(feature); onAddFeature(feature); }));