Skip to content

getClusterLeaves doesn't work on Android #1534

Answered by dantereve
Plat1 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi ! @Plat1, I was facing the same issue.

The id in your let cluster_id = e.features[0].id; is a string. You should use let cluster_id = e.features[0].properties.cluster_id instead. Now you'll get a number as required by the method .getClusterLeaves().

Here is anexemple of a cluster's Feature.

{
    "geometry": {
        "coordinates": [
            0.0589439868927,
            0.0384530463661
        ],
        "type": "Point"
    },
    "id": "83",
    "properties": {
        "cluster": true,
        "cluster_id": 83,
        "point_count": 2,
        "point_count_abbreviated": "2"
    },
    "type": "Feature"
}

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Plat1
Comment options

Answer selected by Plat1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants