-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Support getLeaves
and other new clustering methods in the iOS SDK
#12442
Comments
The Android equivalent to this issue is #12441. The platform-specific SDK code doesn’t have direct access to Supercluster; changes will need to be made to
The most literal port would add three new methods to MGLShapeSource. The method signatures that mapbox/mapbox-gl-js#6829 exposes seem somewhat ill-suited for the iOS/macOS map SDK’s public API. Normally things like this are synchronous in iOS/macOS frameworks; is there an overriding reason why it would have to be asynchronous? Instead of separate methods on MGLShapeSource, would it be possible to automatically add this information to any feature querying result that happens to be a cluster? It seems like the developer would have to use feature querying before these methods anyways, because there’s no other way to obtain the cluster identifier. If we do add this information to feature querying results, one source of awkwardness is that the result type is an MGLFeature-conforming class. To avoid polluting the namespace for features obtained by other means, it might be necessary to further subclass each of the MGLFeature classes (which would be an argument in favor of eventually implementing #7454). /cc @mourner |
In GL JS, it's asynchronous because the Supercluster index lives on the worker thread, and when we query the clusters from from the thread, there's no way to communicate between threads synchronously. I'm not sure what's the current threading setup in native with regards to Supercluster/GeoJSON-VT indices.
We can't combine The |
@lilykaiser As I understand it, this requires a change on the core side. /cc @kkaefer |
The change on the core side should be in progress / done soon according to @tobrun |
We need an iOS equivalent of mapbox/mapbox-gl-js#6829 to support features created in the most recent release of supercluster.hpp including
getChildren
,getLeaves
, andgetClusterExpansionZoom
.The text was updated successfully, but these errors were encountered: