bpillon / google_maps_cluster_manager

Simple Flutter clustering library for Google Maps
https://pub.dev/packages/google_maps_cluster_manager
MIT License
124 stars 111 forks source link

Geohash | Value Not In Range #21

Closed gmaxferr closed 3 years ago

gmaxferr commented 3 years ago

Hi,

I'm getting this crash that stops showing clusters:

I/flutter ( 6428): Error FROM OUT_SIDE FRAMEWORK I/flutter ( 6428): -------------------------------- I/flutter ( 6428): Error : RangeError: Value not in range: 14 I/flutter ( 6428): StackTrace : #0 _StringBase.substring (dart:core-patch/string_patch.dart:393:7) I/flutter ( 6428): #1 ClusterManager._computeClusters (package:google_maps_cluster_manager/src/cluster_manager.dart:142:48) I/flutter ( 6428): #2 ClusterManager.getMarkers (package:google_maps_cluster_manager/src/cluster_manager.dart:102:15) I/flutter ( 6428): I/flutter ( 6428): #3 ClusterManager._updateClusters (package:google_maps_cluster_manager/src/cluster_manager.dart:58:41) I/flutter ( 6428): #4 ClusterManager.updateMap (package:google_maps_cluster_manager/src/cluster_manager.dart:54:5)
I/flutter ( 6428): #5 ClusterManager.setItems (package:google_maps_cluster_manager/src/cluster_manager.dart:69:5)

Is there a way to either make it so if a certain level of geohash is surpassed and starts crashing, use the latest available level? Or increasing a percision of a LatLng so that the generated geoHash would be more precise (not sure if possible) ?

vmadupu9 commented 3 years ago

I am facing the same issue RangeError: Value not in range: 14

bpillon commented 3 years ago

Hello @gmaxferr & @vmadupu9 . I fixed this in the new version 0.2.1 and now you can use up to 20 levels.