Open johnkellas opened 7 years ago
yes. Umm. this is to do with eumm... cluster analysis. christopher will do further analysis to the clustering sutff in cesium to determine how to take thedata and ceat a "datasource". etc
How badly are the labels overlapping? Detecting colliding labels and adjusting them in code will be non-trivial so I'd advocate moving the cities a little bit or giving each city a manual label offset as part of the data input which we can definitely pull off in the short term.
Given the varying scale I guess the quick fixes I suggested wouldn't work after all. Would it be enough to make sure that the labels are properly transparent so they aren't occluding each other? Looking at the source I can't work out why this isn't already the case.
I've assigned this to myself - I'm going to try to work out if I can get the labels displaying through each other which is (as far as I can see) the best we can get in the timescale
Daniel, its already implemented, with pixelk offset collision https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Clustering.html&label=Showcases
the issue is how to create a "data source", which is likely a behaviour of an "entitycollectiion"
Nifty, OK, I'll leave it for now then and check if anything else is more urgent
are you going to study that>
e.g what we could do is set up an ftp server, where the node server reads the file system and implements whatever content is there.... KML loading is a thing.
what is the time frame you are working on>
If you want me to look into it I can do that. I think I'll make a separate issue to look at how data is loaded, though, if we're going to make such large changes.
I have to clock off some time between 5 and 7pm tonight and I should have a couple of hours tomorrow morning, too.
So hooray. Clustering turns on Boohoo, only the "point" part of the Entity shows after "un"clustering
Im going to try adding the point and label entities to different dataSource objects
I tried manually setting the "show" property of the text label, and it crashed Cesium :)
Currently running for me and seems to display a number for the amount of labels that are not shown. Interesting.
OK. so created two datasources, and turned on clustering Only for the Label dataSource
Ok, so change clustering behaviour to:
Oh nuts, sorry I didn't see this earlier, you can turn on clustering separately for points and labels, let me find the docs
According to the docs below it should be something along the lines of
dataSource.clustering.clusterPoints = false;
https://cesiumjs.org/Cesium/Build/Documentation/DataSource.html#clustering https://cesiumjs.org/Cesium/Build/Documentation/EntityCluster.html#clusterPoints
yueah. I literally just read that same thing and came here to document it. Thanks
also its a bug in the unclustering code upstream. The clustering stuff is pretty edge case for them. They have been building it since 2013, and they have a roadmap to create generic force based and other strategies for "de-cluttering"
yes, that solves our use case
Labels not overlapping