Coder Social home page Coder Social logo

Comments (6)

venits avatar venits commented on May 27, 2024

Hi, please check version 1.2.8.
I added clusterTextSize prop that you can add to MapView. Now you can control your cluster text size :)

  <MapView
     clusterTextSize = {40}      
     ... >
     {this.state.markers}
  </MapView>

from react-native-map-clustering.

waghih avatar waghih commented on May 27, 2024

Hi, appreciated with the helps. But seems that your solution is not working.

from react-native-map-clustering.

venits avatar venits commented on May 27, 2024

Make sure you are using version 1.2.8.
If not use this command:
npm update react-native-map-clustering

from react-native-map-clustering.

waghih avatar waghih commented on May 27, 2024

Cool. Thank you (y). Is there any way to access supercluster method like getClusters(). I would like to get markers on current region.

from react-native-map-clustering.

venits avatar venits commented on May 27, 2024

Hmm, yes it is possible but is rather hard because you need to calculate zoom level. If you provide wrong wrong zoom level you will get empty array most of the time. You can try to play with it, here is example code:

onClusterPress = {(cor,markers)=>{
  var markers = this.map.superCluster.getClusters([bbox[0], bbox[1], bbox[2], bbox[3]], zoom);
  console.warn(JSON.stringify(markers))
}}

Bbox is array array of [East, South, West, North] coordinates.

from react-native-map-clustering.

waghih avatar waghih commented on May 27, 2024

Hmmm, i only trying to get (count) visible markers on region. Solution you provide is calling getCluster when onClusterPress. I would only wanted to trigger onChangingRegion.

from react-native-map-clustering.

Related Issues (20)

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.