-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GeoJson clustering #7208
base: main
Are you sure you want to change the base?
Add GeoJson clustering #7208
Conversation
…geojson-clustering
…geojson-clustering
@@ -602,6 +604,33 @@ function GeoJsonMixin<T extends AbstractConstructor<BaseType>>(Base: T) { | |||
}); | |||
} else { | |||
const dataSource = await this.loadGeoJsonDataSource(geoJsonWgs84); | |||
|
|||
if (this.clustering.enabled) { | |||
const pinBackgroundColor = this.clustering.pinBackgroundColor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know anything about runInAction(...)
, but a lot of the surrounding code uses that for accessing things in this
. Does this code not need that for some reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @pjonsson,
runInAction
, like action
, is required when you modify an observable
.
This code acts before the modification and the modification is already in a runInAction
(at line 635).
So, this code not need runInAction
.
What this PR does
This PR adds the trait
ClusteringTraits
toGeoJsonTraits
. In this way, it becomes possible to enable the clustering of entities made available by Cesium. Clusterized entities are represented as billboards generated by thefromText
function ofPinBuilder
and report the number of grouped entities. As a result, clustering only works by using Cesium as a viewer, but there are no drawbacks to switching from Cesium to Leaflet at runtime.Test me
Add a GeoJson or WFS layer of points to the catalog and use new parameters
In example:
Checklist
doc/
.