Code Monkey home page Code Monkey logo

react-native-clusterer's Introduction

React Native Clusterer

The most comprehensive and yet easiest to use react native point clustering library. Uses c++ implementation of supercluster and JSI bindings for up to 10x faster initial point loading times than its JavaScript counterpart.

Installation

npm install react-native-clusterer

# iOS
cd ios && pod install

Example

Check out the example folder for a fully functional example and speed comparisons. On android make sure to update AndroidManifest.xml with com.google.android.geo.API_KEY meta data in order for Google Maps to work.

Usage

This library provides three different ways to use Supercluster based on your needs:

If you are looking for a JS drag-and-drop replacement to speed up point clustering, you should be aware of some caveats:

  • Missing Map/reduce functionality.

useClusterer

import { useClusterer } from 'react-native-clusterer';

const MAP_DIMENSIONS =  { width: MAP_WIDTH, height: MAP_HEIGHT }

//...
const [region, setRegion] = useState(initialRegion);
const [points, supercluster] = useClusterer(
  markers,
  MAP_DIMENSIONS,
  region
);

// ...
return (
  <MapView
    onRegionChangeComplete={setRegion}
    // ... other props
  >
  {points.map(point => (
         // These should be memoized components,
         // otherwise you might see flickering
          <Marker
            // ... marker props
          >
            {/*
              // ... marker children - callout, custom marker, etc.
            */}
          </Marker>
        );
  )}
    />
  </MapView>
);

useClusterer Params

data

Same as points passed to supercluster.load().

mapDimensions

Object containing width and height of the <MapView /> Component

region

Region from the <MapView /> Component: Object containing latitude, longitude, latitudeDelta and longitudeDelta values.

options

Same as options for Supercluster, not required.

useClusterer Returns

An array with two elements:

  • points - Array of points (GeoJSON Feature point or cluster). Clusters have an additional getExpansionRegion() which will return a region that can be used to expand the cluster (use isPointCluster to check if this property is defined). Same as getClusterExpansionRegion without the need for clusterId param.
  • supercluster - Supercluster instance.

Clusterer

//...
import { Clusterer } from 'react-native-clusterer';
import MapView, { Marker } from 'react-native-maps';

const MAP_DIMENSIONS =  { width: MAP_WIDTH, height: MAP_HEIGHT }

// ...
const [markers, setMarkers] = useState([]);
const [region, setRegion] = useState(initialRegion);

// ...
return (
  <MapView
    onRegionChangeComplete={setRegion}
    // ... other props
  >
    <Clusterer
      data={markers}
      region={region}
      options={DEFAULT_OPTIONS}
      mapDimensions={MAP_DIMENSIONS}
      renderItem={(item) => {
        return (
         // These should be memoized components,
         // otherwise you might see flickering
           <Marker
            // ... marker props
          >
            {/*  marker children - callout, custom marker, etc. */}
            {item.properties.cluster_id ? (
              // render cluster
            ) : (
              // render marker
            )}
          </Marker>
        );
      }}
    />
  </MapView>
);

Clusterer Props

data

Same as points passed to supercluster.load().

mapDimensions

Object containing width and height of the <MapView /> Component

region

Region from the <MapView /> Component: Object containing latitude, longitude, latitudeDelta and longitudeDelta values.

options

Same as options for Supercluster.

renderItem

Function that takes an item (GeoJSON Feature point or cluster) and returns a React component.

Supercluster

import Supercluster from 'react-native-clusterer';
//...

// Create a new instance of Supercluster
const supercluster = new Supercluster(options);

// Load points
supercluster.load(points);

// Get clusters
supercluster.getClustersFromRegion(region, mapDimensions);

Supercluster Options

Option Default Description
minZoom 0 Minimum zoom level at which clusters are generated.
maxZoom 16 Maximum zoom level at which clusters are generated.
minPoints 2 Minimum number of points to form a cluster.
radius 40 Cluster radius, in pixels.
extent 512 (Tiles) Tile extent. Radius is calculated relative to this value.
generateId false Whether to generate ids for input features in vector tiles.

Supercluster Methods

load(points)

Loads an array of GeoJSON Feature objects. Each feature's geometry must be a GeoJSON Point. Once loaded, index is immutable.

getClusters(bbox, zoom)

For the given bbox array ([westLng, southLat, eastLng, northLat]) and integer zoom, returns an array of clusters and points as GeoJSON Feature objects.

getClustersFromRegion(region, mapDimensions)

For the given region from react-native-maps <MapView /> and an object containing width and height of the component, returns an array of clusters and points as GeoJSON Feature objects.

getTile(z, x, y)

For a given zoom and x/y coordinates, returns a geojson-vt-compatible JSON tile object with cluster/point features.

getChildren(clusterId)

Returns the children of a cluster (on the next zoom level) given its id (clusterId value from feature properties).

getLeaves(clusterId, limit = 10, offset = 0)

Returns all the points of a cluster (given its clusterId), with pagination support: limit is the number of points to return, and offset is the number of points to skip (for pagination).

getClusterExpansionZoom(clusterId)

Returns the zoom on which the cluster expands into several children (useful for "click to zoom" feature) given the cluster's clusterId.

getClusterExpansionRegion(clusterId)

Returns a region containing the center of all the points in a cluster and the delta value by which it should be zoomed out to see all the points. Useful for animating a MapView after a cluster press.

destroy()

No longer needed (version 1.2.0 and up).

Since JS doesnt have destructors, we have to make sure the cluster stored in c++ memory is also deleted. This method is called automatically when using the <Clusterer /> component.

Utility Methods

isPointCluster(point)

Typescript type guard for checking if a point is a cluster.

Example
const _handlePointPress = (point: IFeature) => {
  if (isPointCluster(point)) {
    const toRegion = point.properties.getExpansionRegion();
    mapRef.current?.animateToRegion(toRegion, 500);
  }
};

<Clusterer
  // ... other props
  renderItem={(item) => {
    return <Marker item={item} onPress={handlePointPress} />;
  }}
/>;

coordsToGeoJSONFeature(coords, properties)

Converts coordinates to a GeoJSON Feature object. Accepted formats are [longitude, latitude] or {longitude, latitude} or {lng, lat}. Properties can be anything and are optional.

Troubleshooting

  • If you can't see any points on the map, make sure you provided coordinates in the correct order and format. The library expects [longitude, latitude] for each point.

TO-DOs

  • Proper input and return types for methods
  • Implement getClusters(bbox, zoom)
  • Parse and return additional Point properties added by users
  • Find a better implementation for destroy().
  • Map/reduce options

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Copyright (c) 2021 Jiri Hoffmann

Uses supercluster for point clustering. Check out mapbox/supercluster.hpp for additional licensing.

react-native-clusterer's People

Contributors

focux avatar jirihoffmann avatar jonivr avatar jpudysz avatar martimarkov avatar zachnagengast avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-clusterer's Issues

Can we have a full working example in the documentation?

This is just a suggestion. It'd be great if you provided an example with dummy data in Clusterer as well as the other methods.
Currently you've simply given a state
const [markers, setMarkers] = useState([]);

It'd be great if you could show us how this markers could look like. Could it be an array of objects, something like the below example?:
[{ _id: '637b17791efca34f05bd85ee', category: 'SPORTS', location: { coordinates: [75.420009, 12.235278], }, }, { _id: '637b17791efca34f05bd85ef', category: 'LOGS', location: { coordinates: [75.658586, 11.790694], }, }],

Apart from the example, if you could add this as comment in the documentation itself, that'd be great.

Points become little blue dots

When I zoom-in or zoom-out, some points feels like trying to become cluster, but turn on into a little blue points.
Снимок экрана 2024-03-12 в 11 32 35

When I add key (as it shown in the example -
key={item.properties?.cluster_id ?? point-${item.properties?.id}} - blue points appear, when I remove key - the issue is fix, but I guess that clusters and points re-render every map changing position.

points in useClusterer are empty

Issue

No markers were being rendered on my map. So I logged the points returned by useClusterer hook, it returned an empty array. So I tried using getRandomData from example, even that returned an empty array.

I have tried going into the library and have figured out by logging at various places that, this.cppInstance.getCluster is returning an empty array. There seems to be an issue from there or maybe I am not meeting some requirements for data.

Code

Click to expand
const {width, height} = Dimensions.get('window');
const MAP_DIM = {width, height};


const Map = () => {
  
  const [region, setRegion] = useState({
    latitude: 25.276987,
    longitude: 55.296249,
    latitudeDelta: 0.0922,
    longitudeDelta: 0.0421,
  });

  const [points,supercluster] = useClusterer(
    gen,
    MAP_DIM,
    region
  )
  ......

//MOCKDATA


export const gen = Array.from(new Array(10), (_, index) => (
  {
    type: "Feature" as "Feature",
    properties: {
      title: `${index}`,
      id: index,
    },
    geometry: {
      type: 'Point' as "Point",
      coordinates: [baseLatitude - Math.random(), baseLongitude + Math.random()]
    },
  }
));

Environment

Click to expand

Package version:

react-native:0.70
react-native-clusterer: 1.2.2,
react-native-maps: 1.3.2,

System:
OS: Windows 10 10.0.19044
CPU: (8) x64 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
Memory: 14.69 GB / 31.88 GB
Binaries:
Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: AI-212.5712.43.2112.8609683
Visual Studio: Not Found
Languages:
Java: 18.0.1.1 - C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.0 => 0.70.0
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found

Clusterer: React Native component getLeaves

I use Clusterer as React componet. When the point is clicked, if it is a cluster, I need to get all leaves.
But Clusterer is a FunctionComponent I tried to use ref, failed.
So how do I get superclusterer, and then call its method to getLeaves?

 <Clusterer
      // ref={ref => {this.clusterer = ref}}  can't use ref here
      data={ clusterCollection}
      region={region}
      options={{radius: 18,minZoom:clusterMinZoom}}
      mapDimensions={MAP_DIMENSIONS}
      renderItem={(item) => {
        return (
        <Point
            key={
            item.properties?.cluster_id ?? `point-${item.properties?.id}`
            }
            item={item}
            onPress={(item) => {
            
            }}
        />
        )
    }}
  />

Wrong typings

getClusterExpansionRegion: () => Region;

In typescript types
This is at the wrong place, currently, it's defined at the same level as properties but this is at properties child level.

"properties": Object {
    "cluster": true,
    "cluster_id": 40,
    "getClusterExpansionRegion": [Function getClusterExpansionRegion],
    "point_count": 4,
    "point_count_abbreviated": "4",
  },

Problem installing

Hey.

I am new to react native, expo, pod, etc. and I am having some issues while trying to use this library.

Without using the "pod install" I get the following error:

Error: The package 'react-native-clusterer' doesn't seem to be linked. Make sure:

  • You have run 'pod install'
  • You rebuilt the app after installing the package
  • You are not using Expo managed workflow

Now, according to the instructions I should execute the command "cd ios && pod install" but where am I supposed to get the podfile from? I tried with the one in the example but same error is thrown.

Is this library compatible with expo?

Thank you.

React Native 0.68.0 build error (REACT_NATIVE_JNI_LIB)

Thank for you this great library!
So I was trying it out on the latest React Native version 0.68.0 and I am getting the following build error :

See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
38 actionable tasks: 32 executed, 6 up-to-date

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':react-native-clusterer:configureCMakeDebug'.

C/C++: C:*****\reactnative0680\node_modules\react-native-clusterer\android\CMakeLists.txt debug|armeabi-v7a : CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
REACT_NATIVE_JNI_LIB

linked by target "rnclusterer" in directory C:/*********/reactnative0680/node_modules/react-native-clusterer/android

Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 12s

Removing REACT_NATIVE_JNI_LIB in the CMakeLists.txt solved the problem, but I am not sure if it will produce other problems.

Steps to reproduce the problem

  1. Create a new React Native project, react-native init reactnative0680 --version 0.68.0
  2. Install react-native-clusterer, npm install react-native-clusterer
  3. run react-native run-android

Thanks in advance!

Support for Expo Managed Workflow

At first glance the library looks very promising, good job!

Unfortunately, I'm not able to utilze it in my Expo project. When I reach the page that renders Clusterer, I receive the following errors:

// iOS

Error: The package 'react-native-clusterer' doesn't seem to be linked. Make sure: 

- You have run 'pod install'
- You rebuilt the app after installing the package
- You are not using Expo managed workflow
// Android

Error: The package 'react-native-clusterer' doesn't seem to be linked. Make sure: 

- You rebuilt the app after installing the package
- You are not using Expo managed workflow

Project dependencies:

"expo": "~46.0.13",
"react": "18.0.0", 
"react-native": "0.69.5",
"react-native-clusterer": "^1.2.2",
"react-native-maps": "^1.3.2"

I wonder if the problem will be resolved if I eject the Expo config, but I'm afraid I wouldn't want to do such change on the project configuration.

👋 Thanks for this!

Hey Jiri, thanks so much for this, I've checked the example and the results are promising.

I've noticed several things to get improved:

  • On an expo app the library is not working well because the native module is not getting installed, and it's impossible to run pod install (because it's managed).

This causes this error to be displayed,react-native-cryptopp is not the best message since didn't know that this error came from this library. Probably we could change it to react-native-clusterer
https://github.com/JiriHoffmann/react-native-clusterer/blob/main/src/index.js#L18

  • TypeScript definitions are not correctly set.

"types": "lib/typescript/index.d.ts", this is the package.json property but in the distributable package that file doesn't exist, it's inside src/, IMHO it should be "types": "src/index.d.ts" or move index.d.ts to the generated lib/ folder.

  • Also noticed, that cluster.getChildren doesn't work in the same way as JS does. I can put a reproduce example later.

Thanks so much, feel free to contact with me through my Discord or email for further testing/assistance or whatever you need =)

Consideration: Expand beyond clustering?

It may be valuable to expand beyond clustering but offloading most geo distance math to a C++ job dedicated to it, could improve main thread performance significantly on react-native applications

Crash right after installing the package

i installed the package normally, and i got this error when trying to run the project
image

is there any steps we need to do other than npm install?
is there any requirement for this package to work?

App crash on android with JSC/Hermes

Hello, I had to switch back to JSC for some INTL support. And I have few observations:

Observations

  • On IOS everything works fine (whether I'm using JSC or Hermes) ✅
  • On Android :
    • JSC EXPO SDK44 development build: ❌ CRASH (When there are enough points to trigger a cluster point generation)
    • HERMES EXPO SDK44 development build : ✅ WORKS
    • HERMES EXPO SDK 44 Release Build: ❌ CRASH (When there are enough points to trigger a cluster point generation)
  • If you have no point within the viewport or only one, this seems to work. The issue seems to be related to cluster point generation.
  • If you have only one point passed to load this seems to work. (Same as above)
  • Works well with Hermes (from Expo SDK44), without a crash. But I need JSC because otherwise, I get ReferenceError: Property 'Intl' doesn't exist, js engine: hermes which is unrelated to this library

Stack

  • Expo Managed SDK44 - with expo-dev-client (allows native code to be compiled)
  • Tested on both JSC and Hermes engine.

Reproduction code

export const getRandomNum = (min: number, max: number) => {
  return Math.floor(Math.random() * (max - min + 1)) + min;
};

export const getRandomData = (size: number) => {
  return Array.from({ length: size }, () => {
    return {
      type: "Feature" as "Feature",
      geometry: {
        type: "Point" as "Point",
        coordinates: [getRandomNum(-180, 180), getRandomNum(-90, 90)],
      },
      properties: {
        id: `${size / getRandomNum(1, size)}-${getRandomNum(0, size * 10)}`,
      },
    };
  });
};

const supercluster = new Supercluster().load(getRandomData(5000));

supercluster
  .getClustersFromRegion(
    {
      latitude: 41.154317673727974,
      latitudeDelta: 39.8596615550487,
      longitude: 2.2766626447408163,
      longitudeDelta: 26.96939298747114,
    },
    {
      height: 838.4761904761905,
      width: 411.42857142857144,
    },
  )
  .forEach((el) => console.log(el));

supercluster.destroy();

Crash log (very opaque)

JSC Android Development build

Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 5393 (mqt_js), pid 5159 (.stride.staging)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

Build fingerprint: 'OnePlus/OnePlus6/OnePlus6:10/QKQ1.190716.003/2010042216:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2022-04-27 11:21:05+0200
pid: 5159, tid: 5393, name: mqt_js  >>> com.power.stride.staging <<<
uid: 10730
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
    x0  0000000000000000  x1  0000000000001511  x2  0000000000000006  x3  00000078c015c9f0
    x4  fefeff001c249b0a  x5  fefeff001c249b0a  x6  fefeff001c249b0a  x7  7f7f7f7f7f7fff7f
    x8  00000000000000f0  x9  b8fd5e16df62eb5d  x10 0000000000000001  x11 0000000000000000
    x12 fffffff0fffffbdf  x13 0000000000000000  x14 ffffffffffffffff  x15 0000010000000000
    x16 00000079f983e8c0  x17 00000079f981a900  x18 0000000000000000  x19 0000000000001427
    x20 0000000000001511  x21 00000000ffffffff  x22 00000079052934b4  x23 00000078c0163020
    x24 0000000000000000  x25 00000078f720ee80  x26 00000078c015f340  x27 0000000000000000
    x28 00000078c0163020  x29 00000078c015ca90
    sp  00000078c015c9d0  lr  00000079f97cc0c4  pc  00000079f97cc0f0

backtrace:
      #00 pc 00000000000830f0  /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: a6a4a6a4e20240bbe3173fe560b161af)
      #01 pc 00000000000b8124  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/libc++_shared.so (BuildId: 6de1c39a010a6596b5bb6546e6fe55445b037c1b)
      #02 pc 00000000000b43d4  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/libc++_shared.so (__gxx_personality_v0+364) (BuildId: 6de1c39a010a6596b5bb6546e6fe55445b037c1b)
      #03 pc 0000000000042720  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/libjscexecutor.so (BuildId: 3a70d4935e6f0a0692efcc61697f564cc1f3a2da)
      #04 pc 0000000000042a44  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/libjscexecutor.so (_Unwind_RaiseException+252) (BuildId: 3a70d4935e6f0a0692efcc61697f564cc1f3a2da)
      #05 pc 00000000000b7a78  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/libfbjni.so (__cxa_throw+112) (BuildId: 8edc347b17ae03442aeaf32376fe2c404c260276)
      #06 pc 0000000000068b94  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/libc++_shared.so (std::__ndk1::locale::use_facet(std::__ndk1::locale::id&) const+212) (BuildId: 6de1c39a010a6596b5bb6546e6fe55445b037c1b)
      #07 pc 0000000000079d7c  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #08 pc 00000000000743e8  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char>>::operator<<(unsigned int)+120) (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #09 pc 000000000006c994  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (mapbox::supercluster::Cluster::getProperties() const+792) (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #10 pc 0000000000081f44  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (mapbox::supercluster::Cluster::toGeoJSON() const+220) (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #11 pc 0000000000081aec  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (mapbox::supercluster::Supercluster::clusterToGeoJSON(mapbox::supercluster::Cluster const&) const+120) (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #12 pc 000000000008194c  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (_ZZN6mapbox12supercluster12Supercluster11getClustersEPdhENKUlRKT_E_clIjEEDaS5_+200) (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #13 pc 0000000000081688  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (_ZNK6kdbush6KDBushIN6mapbox12supercluster7ClusterEjE5rangeIZNS2_12Supercluster11getClustersEPdhEUlRKT_E_EEvddddSA_jjh+348) (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #14 pc 00000000000817e8  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (_ZNK6kdbush6KDBushIN6mapbox12supercluster7ClusterEjE5rangeIZNS2_12Supercluster11getClustersEPdhEUlRKT_E_EEvddddSA_jjh+700) (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #15 pc 0000000000081854  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (_ZNK6kdbush6KDBushIN6mapbox12supercluster7ClusterEjE5rangeIZNS2_12Supercluster11getClustersEPdhEUlRKT_E_EEvddddSA_jjh+808) (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #16 pc 00000000000817e8  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (_ZNK6kdbush6KDBushIN6mapbox12supercluster7ClusterEjE5rangeIZNS2_12Supercluster11getClustersEPdhEUlRKT_E_EEvddddSA_jjh+700) (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #17 pc 00000000000817e8  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (_ZNK6kdbush6KDBushIN6mapbox12supercluster7ClusterEjE5rangeIZNS2_12Supercluster11getClustersEPdhEUlRKT_E_EEvddddSA_jjh+700) (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #18 pc 000000000007bda0  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (_ZNK6kdbush6KDBushIN6mapbox12supercluster7ClusterEjE5rangeIZNS2_12Supercluster11getClustersEPdhEUlRKT_E_EEvddddSA_+156) (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #19 pc 0000000000041790  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (mapbox::supercluster::Supercluster::getClusters(double*, unsigned char)+1252) (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #20 pc 000000000004112c  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (clusterer::getClusters(facebook::jsi::Runtime&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, double*, int)+80) (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #21 pc 0000000000095ae0  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #22 pc 000000000009573c  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #23 pc 0000000000095620  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #24 pc 0000000000095554  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #25 pc 0000000000093600  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/librnclusterer.so (BuildId: 0d94dd0dbfd869a85ff41c503e0bb3ce1309addc)
      #26 pc 000000000002f284  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/libjscexecutor.so (BuildId: 3a70d4935e6f0a0692efcc61697f564cc1f3a2da)
      #27 pc 000000000013d378  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/libjsc.so
      #28 pc 0000000000361624  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/libjsc.so
      #29 pc 000000000034c92c  /data/app/com.power.stride.staging-5RJ5SCsv9ivKlfYe6dHZIQ==/lib/arm64/libjsc.so

Hermes Android Release build

Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 2570 (mqt_js), pid 2492 (.stride.staging)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

Build fingerprint: 'OnePlus/OnePlus6/OnePlus6:10/QKQ1.190716.003/2010042216:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2022-04-27 15:42:54+0200
pid: 2492, tid: 2570, name: mqt_js  >>> com.power.stride.staging <<<
uid: 10731
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
    x0  0000000000000000  x1  0000000000000a0a  x2  0000000000000006  x3  00000078f97834f0
    x4  fefefeff757c9b0a  x5  fefefeff757c9b0a  x6  fefefeff757c9b0a  x7  7f7f7f7f7f7fff7f
    x8  00000000000000f0  x9  b8fd5e16df62eb5d  x10 0000000000000001  x11 0000000000000000
    x12 fffffff0fffffbdf  x13 0000000000000000  x14 ffffffffffffffff  x15 0000000000800000
    x16 00000079f983e8c0  x17 00000079f981a900  x18 00000078f902c000  x19 00000000000009bc
    x20 0000000000000a0a  x21 00000000ffffffff  x22 0000007908524e64  x23 00000078f9788020
    x24 0000000000000000  x25 00000078f9788020  x26 000000790853cbe8  x27 000000790853ce10
    x28 000000790853cd68  x29 00000078f9783590
    sp  00000078f97834d0  lr  00000079f97cc0c4  pc  00000079f97cc0f0
backtrace:

      #00 pc 00000000000830f0  /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: a6a4a6a4e20240bbe3173fe560b161af)
      #01 pc 00000000000b8124  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libc++_shared.so (BuildId: 6de1c39a010a6596b5bb6546e6fe55445b037c1b)
      #02 pc 00000000000b43d4  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libc++_shared.so (__gxx_personality_v0+364) (BuildId: 6de1c39a010a6596b5bb6546e6fe55445b037c1b)
      #03 pc 00000000000b5f40  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libreactnativejni.so (BuildId: 879f1a041363d354f938513fc3587fe15467bcf6)
      #04 pc 00000000000b6264  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libreactnativejni.so (_Unwind_RaiseException+252) (BuildId: 879f1a041363d354f938513fc3587fe15467bcf6)
      #05 pc 00000000000b7a78  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libfbjni.so (__cxa_throw+112) (BuildId: 8edc347b17ae03442aeaf32376fe2c404c260276)
      #06 pc 0000000000068b94  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libc++_shared.so (std::__ndk1::locale::use_facet(std::__ndk1::locale::id&) const+212) (BuildId: 6de1c39a010a6596b5bb6546e6fe55445b037c1b)
      #07 pc 000000000001cd70  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/librnclusterer.so (std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char>>::operator<<(unsigned int)+128) (BuildId: 1eac6c3c1351b3ff45c553848373edd98b4fccb5)
      #08 pc 000000000001bc90  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/librnclusterer.so (mapbox::supercluster::Cluster::getProperties() const+604) (BuildId: 1eac6c3c1351b3ff45c553848373edd98b4fccb5)
      #09 pc 00000000000208b8  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/librnclusterer.so (mapbox::supercluster::Cluster::toGeoJSON() const+164) (BuildId: 1eac6c3c1351b3ff45c553848373edd98b4fccb5)
      #10 pc 0000000000020438  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/librnclusterer.so (_ZZN6mapbox12supercluster12Supercluster11getClustersEPdhENKUlRKT_E_clIjEEDaS5_+120) (BuildId: 1eac6c3c1351b3ff45c553848373edd98b4fccb5)
      #11 pc 000000000002036c  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/librnclusterer.so (_ZNK6kdbush6KDBushIN6mapbox12supercluster7ClusterEjE5rangeIZNS2_12Supercluster11getClustersEPdhEUlRKT_E_EEvddddSA_jjh+376) (BuildId: 1eac6c3c1351b3ff45c553848373edd98b4fccb5)
      #12 pc 0000000000012d18  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/librnclusterer.so (mapbox::supercluster::Supercluster::getClusters(double*, unsigned char)+944) (BuildId: 1eac6c3c1351b3ff45c553848373edd98b4fccb5)
      #13 pc 000000000001272c  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/librnclusterer.so (clusterer::getClusters(facebook::jsi::Runtime&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, double*, int)+76) (BuildId: 1eac6c3c1351b3ff45c553848373edd98b4fccb5)
      #14 pc 0000000000024b40  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/librnclusterer.so (BuildId: 1eac6c3c1351b3ff45c553848373edd98b4fccb5)
      #15 pc 000000000001cf94  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes-executor-common-release.so (std::__ndk1::__function::__func<facebook::jsi::DecoratedHostFunction, std::__ndk1::allocator<facebook::jsi::DecoratedHostFunction>, facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*&&, unsigned long&&)+68) (BuildId: 026909e850659d5366579b58d763920c3d11d93a)
      #16 pc 00000000000377dc  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (std::__ndk1::function<facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const+56) (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #17 pc 00000000000371ac  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (facebook::hermes::HermesRuntimeImpl::HFContext::func(void*, hermes::vm::Runtime*, hermes::vm::NativeArgs)+248) (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #18 pc 000000000004180c  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #19 pc 00000000000541d0  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #20 pc 0000000000055b5c  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #21 pc 000000000005533c  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #22 pc 0000000000041a68  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #23 pc 000000000004138c  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #24 pc 00000000000541ec  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #25 pc 0000000000055b5c  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #26 pc 000000000005533c  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #27 pc 0000000000041a68  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #28 pc 0000000000040698  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #29 pc 00000000000cb778  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #30 pc 000000000004180c  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #31 pc 00000000000541d0  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #32 pc 0000000000055b5c  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #33 pc 000000000005533c  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #34 pc 0000000000041a68  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #35 pc 000000000004138c  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #36 pc 0000000000030b04  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes.so (facebook::hermes::HermesRuntimeImpl::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)+292) (BuildId: 55f79e163ab95fbb3da9b8db0d7929b488aa23e7)
      #37 pc 0000000000026830  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes-executor-release.so (_ZNK8facebook3jsi8Function4callIJRKNSt6__ndk112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_NS0_5ValueEEEESC_RNS0_7RuntimeEDpOT_+240) (BuildId: 9cca3cffdd7bbe9e5e818141782ae8c47e56a5b3)
      #38 pc 000000000002668c  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes-executor-release.so (BuildId: 9cca3cffdd7bbe9e5e818141782ae8c47e56a5b3)
      #39 pc 0000000000020a70  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes-executor-release.so (_ZNSt6__ndk128__invoke_void_return_wrapperIvE6__callIJRPFvRKNS_8functionIFvvEEENS3_IFNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEvEEEES7_SF_EEEvDpOT_+116) (BuildId: 9cca3cffdd7bbe9e5e818141782ae8c47e56a5b3)
      #40 pc 0000000000023594  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libhermes-executor-release.so (facebook::react::JSIExecutor::callFunction(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, folly::dynamic const&)+1156) (BuildId: 9cca3cffdd7bbe9e5e818141782ae8c47e56a5b3)
      #41 pc 00000000000a980c  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libreactnativejni.so (BuildId: 879f1a041363d354f938513fc3587fe15467bcf6)
      #42 pc 00000000000aae04  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libreactnativejni.so (BuildId: 879f1a041363d354f938513fc3587fe15467bcf6)
      #43 pc 00000000000711b0  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libreactnativejni.so (BuildId: 879f1a041363d354f938513fc3587fe15467bcf6)
      #44 pc 0000000000060260  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail13MethodWrapperIMNS_5react15JNativeRunnableEFvvEXadL_ZNS4_3runEvEES4_vJEE8dispatchENS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassIS4_NS3_8RunnableEE8JavaPartESB_vE11_javaobjectEEE+32) (BuildId: 879f1a041363d354f938513fc3587fe15467bcf6)
      #45 pc 00000000000601dc  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/lib/arm64/libreactnativejni.so (_ZN8facebook3jni6detail15FunctionWrapperIPFvNS0_9alias_refIPNS1_8JTypeForINS0_11HybridClassINS_5react15JNativeRunnableENS6_8RunnableEE8JavaPartES8_vE11_javaobjectEEEEXadL_ZNS1_13MethodWrapperIMS7_FvvEXadL_ZNS7_3runEvEES7_vJEE8dispatchESE_EESD_vJEE4callEP7_JNIEnvP8_jobject+52) (BuildId: 879f1a041363d354f938513fc3587fe15467bcf6)
      #46 pc 000000000009a2ac  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/oat/arm64/base.odex (art_jni_trampoline+124)
      #47 pc 000000000074867c  /system/framework/arm64/boot-framework.oat (android.os.Handler.dispatchMessage+76) (BuildId: 9e983fe0d980bce67d1c758de6b10e5c3ce9258e)
      #48 pc 0000000000137334  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #49 pc 0000000000145fec  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #50 pc 00000000002e3948  /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #51 pc 00000000002deba8  /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+892) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #52 pc 00000000005a1d8c  /apex/com.android.runtime/lib64/libart.so (MterpInvokeSuper+1564) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #53 pc 0000000000131894  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_super+20) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #54 pc 0000000000c417f8  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/oat/arm64/base.vdex (com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage)
      #55 pc 00000000002b4c5c  /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.4579747295037710581+240) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #56 pc 0000000000592688  /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #57 pc 0000000000140468  /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #58 pc 000000000074bc90  /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+1440) (BuildId: 9e983fe0d980bce67d1c758de6b10e5c3ce9258e)
      #59 pc 00000000001375b8  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #60 pc 000000000014600c  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+276) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #61 pc 00000000002e3948  /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #62 pc 00000000002deba8  /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+892) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #63 pc 00000000005a3bf4  /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+372) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #64 pc 0000000000131994  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #65 pc 0000000000c41986  /data/app/com.power.stride.staging-VYnWnnF3ciP_lzic-guePQ==/oat/arm64/base.vdex (com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run+74)
      #66 pc 00000000002b4c5c  /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.4579747295037710581+240) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #67 pc 0000000000592688  /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #68 pc 0000000000140468  /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #69 pc 00000000001a52a8  /system/framework/arm64/boot.oat (java.lang.Thread.run+72) (BuildId: c2b2e36303342792b860860f4db629e63688a391)
      #70 pc 0000000000137334  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #71 pc 0000000000145fec  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #72 pc 00000000004b103c  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #73 pc 00000000004b2150  /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+416) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #74 pc 00000000004f2b18  /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*)+1176) (BuildId: a7b90c4876fad384278d03bbb11492c6)
      #75 pc 00000000000e6890  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: a6a4a6a4e20240bbe3173fe560b161af)
      #76 pc 0000000000084b6c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: a6a4a6a4e20240bbe3173fe560b161af)

Disable clustering.

Hi, first of all, thank you for this project it works great! Just want to ask if there is an option to disable clustering?
For example at some zoom level when the user zooms very close I would like to display all markers no matter how many there are.

I'm trying to play around with maxZoom and minZoom options, but can quite there.

[IOS] The marker and the cluster do not appear

Issue

The bug is that the marker does not appear when I zoom on the map but It only appears when the view is very zoomed out.

I changed the options and particularly the radius, tested with Google Maps, downgraded the react-native-maps lib version to that of the example, downgraded the react-native-clusterer package version to 1.2.1, but the bug still exists.

I test on a real mobile :

RPReplay_Final1666112191.MP4

Code

Click To Expand
import React, { useState } from 'react';
import { Dimensions } from 'react-native';
import { Clusterer } from 'react-native-clusterer';
import MapView, { Marker } from 'react-native-maps';

const MAP_WIDTH = Dimensions.get('window').width;
const MAP_HEIGHT = Dimensions.get('window').height;
const MAP_DIMENSIONS = { width: MAP_WIDTH, height: MAP_HEIGHT };

const initialRegion = {
  latitude: 48.86266341967402,
  latitudeDelta: 0.28612106852801844,
  longitude: 2.339449357241392,
  longitudeDelta: 0.25176655501127243,
};

const MARKERS = [
  {
    id: '01',
    type: 'Feature',
    geometry: {
      type: 'Point',
      coordinates: [48.85207806320952, 2.2872968444366686],
    },
    properties: {
      id: 'name-01',
      name: 'Paris 01',
    },
  },
  {
    id: '02',
    type: 'Feature',
    geometry: {
      type: 'Point',
      coordinates: [48.82270138544876, 2.354931422861827],
    },
    properties: {
      id: 'name-02',
      name: 'Paris 02',
    },
  },
  {
    id: '03',
    type: 'Feature',
    geometry: {
      type: 'Point',
      coordinates: [48.87624440405881, 2.353214809196214],
    },
    properties: {
      id: 'name-03',
      name: 'Paris 03',
    },
  },
];

const Map = () => {
  const [region, setRegion] = useState(initialRegion);

  return (
    <MapView style={MAP_DIMENSIONS} onRegionChangeComplete={setRegion}>
      <Clusterer
        data={MARKERS}
        region={region}
        mapDimensions={MAP_DIMENSIONS}
        options={{ radius: 18 }}
        renderItem={item => {
          return (
            <Marker
              key={item.id}
              coordinate={{
                latitude: item.geometry.coordinates[0],
                longitude: item.geometry.coordinates[1],
              }}
            />
          );
        }}
      />
    </MapView>
  );
};

export default Map;

Environement

Click To Expand

Package version :

  • react-native 0.68.2
  • react-native-maps 1.3.1
  • react-native-clusterer 1.2.2

react-native info output:

System:
    OS: macOS 12.6
    CPU: (4) x64 Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
    Memory: 28.88 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.11.0 - /usr/local/bin/node
    Yarn: 1.22.19 - ~/NightCrawl/Mobile/node_modules/.bin/yarn
    npm: 8.19.2 - /usr/local/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8512546
    Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild
  Languages:
    Java: javac 19 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.68.2 => 0.68.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Version 1.3.0 break apps that are using react native < 0.71

The most recent release 1.3.0 should have been a major version—according to SemVer—because it drops support for all RN versions but >= 0.71.

If anyone is experiencing a build issue, make sure to pin react native clusterer version on your package.json to 1.2.0, not ^1.2.0.

[iOS] Not working with React Native 0.70

Hello!

Upgrading to react native 0.70 I have this error during build time:

No member named 'throwJSError' in namespace 'facebook::jsi::detail'

Looking at other repositories it seems like it's related to a old version of react native

Typescript mismatch version

Looks like there is mismatch in version.

As if d.ts corresponds to one version of the library and the actual code is a different version

Below code and image of it:

 [Error: TransformError node_modules/react-native-clusterer/src/index.ts: /Users/vladbataev/WebstormProjects/zing-app/node_modules/react-native-clusterer/src/index.ts: Exporting local "supercluster", which is not declared.
 
export default Supercluster;
 export { Clusterer, supercluster, useClusterer };

mismatch image

Cluster can not explose markers when markers are too near each other

I also get an error when I press the Cluster.

RPReplay_Final1700322898.mov

The example geojson;
[ { "type": "Feature", "properties": { "id": 3560, "lat_y": 38.257204, "long_x": -121.3739 }, "geometry": { "type": "Point", "coordinates": [ -121.3739, 38.257204 ] } }, { "type": "Feature", "properties": { "id": 1949, "lat_y": 38.257204, "long_x": -121.373203 }, "geometry": { "type": "Point", "coordinates": [ -121.373203, 38.257204 ] } }, ]

radius of Clusterer is 18

"react-native": "0.72.4",
"react-native-clusterer": "^1.3.0",
"react-native-maps": "^1.8.0",

Can you please help? @JiriHoffmann

Disable Clusterer animation

Is there any way to disable clusterer animation? I want clusters to only appear instead of sliding animation.

Flickering when zooming

Registrazione.schermo.2024-05-03.alle.15.22.55.mov

I noticed that the markers used for the cluster glitch when zooming in or out. I believe this is due to a change in the cluster id, which therefore forces a re render, also because I cannot therefore take advantage of the benefits of react.memo. Why this strange behavior of the cluster id? and how to avoid the problem?

PointFeature properties inaccurate type

I don't know if it is possible to solve this but I think it could be helpful if it was. Perhaps I am missing something and there is a better solution.

In the readme it states: "Currently supported Point properties are null, boolean, number, string. The rest will be discarded when the supercluster is created. If you need to store other properties you can always turn them into a JSON."

This makes sense but it would be useful if there was some way of reflecting this in the types to avoid errors where properties other than these types were passed to the class Supercluster.

Currently, the follow code could lead to problems if the an attempt was made to access PointFeature["properties"]["price"]["weekday"] since the type would suggest this property existed when, in fact, this will have been stripped out.

type InternalPointType = {
    name: string,
    price: {
        weekday: number;
        weekend: number;
    }
}
const superClusterIndex = new Supercluster<InternalPointType >();

In my own code I have used the following type "PickByType" (credits: https://stackoverflow.com/a/69756175) to create a new version of the original type which reflects the runtime object more accurately.

type PickByType<T, Value> = {
    [P in keyof T as T[P] extends Value | undefined ? P : never]: T[P];
};

type ClusteredInternalPointType = PickByType<
    InternalPointType,
    null | boolean | number | string
>
const superClusterIndex = new Supercluster<ClusteredInternalPointType >();

I wonder if a similar technique could be used internally to modify the type passed to Supercluster. I don't think I have a deep enough understanding of this project at the moment to create a pull request but I think this could be helpful if someone else thought this would be useful to implement.

Not working on android with RN 0.71

node_modules/react-native/android folder is empty and thus the following in build.gradle fails:

`
dependencies {
//noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-native:+'
def rnMatcher = reactNativeVersion < 69
? "//.aar"
: "/react-native//
${buildType()}.aar"

def rnAAR = fileTree(reactNativePath).matching({ it.include rnMatcher }).singleFile
extractJNI(files(rnAAR))
}`

Since there will be no .aar files.

Static clusters with useClusterer hook

Below is how I'm using the useClusterer hook
const [points, supercluster] = useClusterer(mapPoints, MAP_DIMENSIONS, region, { minPoints: 5, extent: 1000 });
mapPoint is a state. I expect the clusterer to reload the cluster points when mapPoint changes but that doesn't happen.

[Android] Build failed: `Required by: project :app > project :react-native-clusterer`

I try to run on Android, following error message is displayed

BUILD FAILED in 45s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDevDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:mergeDevDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:devDebugRuntimeClasspath'.
   > Could not find any matches for com.facebook.react:react-android:+ as no versions of com.facebook.react:react-android are available.
     Searched in the following locations:
       - file:/Users/xxx/xxx/node_modules/react-native/android/com/facebook/react/react-android/maven-metadata.xml
     Required by:
         project :app > project :react-native-clusterer

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 45s

looks like failed to resolve the dependency
But, I checked your examle and it looks to me like no fix to build.gradle is needed.


react-native-clusterer: 1.3.0
react-native: 0.69.6

Linker error with iOS

I got this error with versions 1.3.0 and 1.2.0 when running the application
Screenshot 2023-11-03 at 21 15 43

react-native: 0.72.4
react: 18.2.0

xcode version 15.0.1

Can you help with this please? @JiriHoffmann

Cannot build on Android with Expo 46

Hello,

Just migrated from expo 45 to 46, which results in react-native update too

[RUN_GRADLEW] FAILURE: Build failed with an exception.
[RUN_GRADLEW] * Where:
[RUN_GRADLEW] Build file '/private/var/folders/rn/m4j774cj3kl9q8mftngq47g40000gn/T/eas-build-local-nodejs/74ada343-85fe-4672-a6e3-ba6f4f112653/build/node_modules/react-native-clusterer/android/build.gradle' line: 115
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] A problem occurred evaluating project ':react-native-clusterer'.
[RUN_GRADLEW] > Expected directory '/private/var/folders/rn/m4j774cj3kl9q8mftngq47g40000gn/T/eas-build-local-nodejs/74ada343-85fe-4672-a6e3-ba6f4f112653/build/node_modules/react-native/android' to contain exactly one file, however, it contains more than one file.
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] > Run with --stacktrace option to get the stack trace.
[RUN_GRADLEW] > Run with --info or --debug option to get more log output.
[RUN_GRADLEW] > Run with --scan to get full insights.
[RUN_GRADLEW] * Get more help at https://help.gradle.org
[RUN_GRADLEW] BUILD FAILED in 18s

now my build fails

Is there anything I can do for help @JiriHoffmann

MaxZoom not working as expected

First off, excellent library @JiriHoffmann !
However I have found that that the maxZoom option does not work the same as the regular supercluster library. This could be my use of the extent tile size prop which I could be entering incorrectly. I've tried 256, 512 and 1024. This is both iOS + Android.

minZoom: 1,
maxZoom: 18,
extent: 1024,
radius: 120

This configuration will show all markers without clustering but once zoom level 21 is reached not 18.

Extents of 256 and 512 always seem to show the clusters no matter the entered maxZoom

Expected
Once the zoom level surpasses the number all markers should be shown within the viewport without clustering

Android build failing

Not able to compile the code after including the cluster code

Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

  • What went wrong:

A problem occurred configuring project ':react-native-clusterer'.

com.android.builder.errors.EvalIssueException: NDK at C:\Users\dell\AppData\Local\Android\Sdk\ndk\21.4.7075529 did not have a source.properties file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.