Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Do not use cluster source, but the underlying feature source #496

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/olcs/featureconverter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ goog.require('ol.geom.Geometry');
goog.require('ol.source.ImageVector');
goog.require('ol.style.Icon');
goog.require('ol.source.Vector');
goog.require('ol.source.Cluster');

goog.require('goog.asserts');
goog.require('ol');
Expand Down Expand Up @@ -993,6 +994,9 @@ olcs.FeatureConverter.prototype.olVectorLayerToCesium = function(olLayer, olView
return new olcs.core.VectorLayerCounterpart(proj, this.scene);
}
}
if (source instanceof ol.source.Cluster) {
source = source.getSource();
}

goog.asserts.assertInstanceof(source, ol.source.Vector);
const features = source.getFeatures();
Expand Down
4 changes: 4 additions & 0 deletions src/olcs/vectorsynchronizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ goog.provide('olcs.VectorSynchronizer');
goog.require('ol.source.Vector');
goog.require('ol.layer.Layer');
goog.require('ol.source.ImageVector');
goog.require('ol.source.Cluster');
goog.require('ol.layer.Image');

goog.require('goog.asserts');
Expand Down Expand Up @@ -98,6 +99,9 @@ olcs.VectorSynchronizer.prototype.createSingleLayerCounterparts = function(olLay
if (source instanceof ol.source.ImageVector) {
source = source.getSource();
}
if (source instanceof ol.source.Cluster) {
source = source.getSource();
}

goog.asserts.assertInstanceof(source, ol.source.Vector);
goog.asserts.assert(this.view);
Expand Down