-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Label clustering of empty strings #4919
Comments
I did a little bit of thumbing through some code changes and this commit stood out as a candidate for investigation: 3eb09e4 |
Thanks for narrowing this down, @billwritescode. @emackey do you have any bandwidth to look at this? |
Yeah I should look at this. @billwritescode you said you did a bit of thumbing, did you actually run |
Also, a bit of a confession since I got pulled off a project recently and didn't report this yet, but label un-clustering seems completely broken for the past few releases. Check out the clustering demo in Sandcastle, you can zoom in and un-cluster the icons but you never see any un-clustered labels when clustering is enabled overall. I was planning an issue and a proposed fix and then got pulled away. |
Also, silly question but, why would a user want to see clusters of empty labels? If they zoom in on the cluster of empty labels, wouldn't it just disappear anyway? |
@emackey thanks for looking into this! Running As for the question "Why would anyone want this?", one possibility is to jerry-rig clustering of polygons using clusterable empty labels, distance display conditions on some polygons, and toggling clustering on the datasource at the appropriate moments. |
Thanks for the bisect. Part of the logic that was in the process of changing there was better calculation of glyph placement, such as not assuming Of course this could all be worked around by hard-coding a Maybe you can work around it with something invisible that does have screen space, such as transparent points: Transparent points work because although invisible, they have known screen space, a 1x1 pixel directly on the anchor position. Contrast this with a label that contains a single minus sign, the screen space of that label is a small rectangle, several pixels above the anchor position, not including the anchor position. If you get rid of the minus sign, the screen space becomes completely undefined. That's why I think points would be better for this. |
@billwritescode Any thoughts on all this? I'd like to close this issue before the Feb 1 release. |
@emackey, thanks for the high level technical description. I would think that not breaking user space is fairly important in this case, perhaps more important than the temporary ugliness of a hardcoded return value. There is a workaround until the 1.28 behavior is restored like this: http://cesiumjs.org/releases/1.29/Apps/Sandcastle/index.html?src=Hello%20World.html&label=Showcases&gist=1d4b61c2c17a82ff6a7bf4882cc1d2ca The real issue that this illustrates is that clustering for polygons is really needed. Until that is implemented, preserving the behavior of 1.28 is I would think the best approach in order to preserve user space. Of course, once clustering for polygons is implemented, that hotfix could be pulled back. |
@billwritescode I think we missed the window for the 1.30 release. Does my workaround solve this issue for you? |
Hey @emackey, thanks for looking into this. More important than hitting the 1.30 release is being sure we have a stable way of keeping this sort of behavior. Reworking the current code to use points is not that exciting, as you might imagine. But in the same vein as transparent points, I think forcing labels to be transparent is promising.
Before closing this issue, could you comment on these two question?
Thanks for all your work on this issue! |
Hey @emackey, just bumping this thread -- any comments my two questions above? |
Hi @billwritescode, I got pulled onto other projects, but this is still at the back of my mind.
But the clustering logic still has lurking bugs, for example the Clustering Sandcastle demo never shows any labels at all when clustering is enabled. The code has typos or bad logic in it that prevents it. In my mind, this is a far larger bug than what's been reported here, and I'm surprised this one is getting all the attention.
|
Hello, I recently upgraded Cesium from v1.26 (3rd Oct 2016) to the current v1.34 and have noticed a similar problem. Our clustered Site entities (a point and a label) no longer show their label. If I disable I have confirmed this in the current Cesium Sandbox by modifying the Clustering Example to create a CustomDataSource with clustering enabled and 3 entities with both a point and a label: The example will zoom to the 3 Site entities that are missing labels. Disable clustering using checkbox widget to see the labels appear. If you uncomment Also in this buggy example, if you uncomment the block at the end to modify the I would also like to add that if you also have a billboard as part of the entity, then it gets clustered as though its separate to the point. I often use billboards for icons with a point as the background circle but have to set the billboard eyeOffset to e.g. new Cartesian3(0, 0, -5) to bring it in front due to z testing. Thanks, |
Thanks for the details @bjbrewster! This issue is labeled |
@bjbrewster thanks for all the details, if you have the time, it would be great if you could use |
@pjcozzi I can do. Can I confirm the expected behavior that when you have an entity with both label and point/billboard then all the parts should disappear and not be clustered separately? It's a bit ambiguous how the clusterBillboards/Points/Labels options affect the behavior. Does setting |
@bjbrewster I didn't work on this but that sounds reasonable. @bagnell? |
There are a pair of unrelated issues being discussed on the same thread here.
|
Further discussion of bullet 2 (non-empty-string label clustering) has moved to #6087. The original issue here (empty-string label clustering) has been thoroughly explained and analyzed above, so closing this. |
Congratulations on closing the issue! I found these Cesium forum links in the comments above: https://groups.google.com/forum/#!topic/cesium-dev/9jEuuGdzmbU If this issue affects any of these threads, please post a comment like the following:
I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome. 🌍 🌎 🌏 |
Reported on the forum: https://groups.google.com/forum/#!topic/cesium-dev/9jEuuGdzmbU
In 1.29, nothing appears on the globe
The text was updated successfully, but these errors were encountered: