Skip to content

international dateline crash #6

@DanGDroid

Description

@DanGDroid

crash report.
RN 0.51,
react-native-maps ^0.18.3,
react-native-maps-super-cluster ^1.3.1,

description:
when user swipes the map over the international dateline app crashes.

i'v opened the same issue in mapbox supercluster - but it might be as your use of the lib because it crashes in your demo app as well.

see in git : https://github.com/mapbox/supercluster/issues/73#issuecomment-364886434

the crash log is of:
02-13 10:16:04.853 2656 3420 E ReactNativeJS: undefined is not an object (evaluating 'tree.range')
in getCluster method in index.js of supercluster:

        if (bbox[0] > bbox[2]) {
            var easternHem = this.getClusters([bbox[0], bbox[1], 180, bbox[3]], zoom);
            var westernHem = this.getClusters([-180, bbox[1], bbox[2], bbox[3]], zoom);
            return easternHem.concat(westernHem);
        }

        var tree = this.trees[this._limitZoom(zoom)];
        var ids = tree.range(lngX(bbox[0]), latY(bbox[3]), lngX(bbox[2]), latY(bbox[1]));
        var clusters = [];
        for (var i = 0; i < ids.length; i++) {
            var c = tree.points[ids[i]];
            clusters.push(c.numPoints ? getClusterJSON(c) : this.points[c.id]);
        }
        return clusters;
    },

thanx for the good work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions