yuvaraj119 / android-maps-extensions

android-maps-extensions
0 stars 0 forks source link

IndexOutOfBoundsException om markers remove #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1.3.1 version + Google Play Services r9

1) Add markers by map.addMarker(markerOptions);
2) Remove all markers by marker.remove();
3) After this zoom-in or zoom-out to call onCameraChange event

1.2 - ok

Stacktrace:

08-01 04:36:46.536: ERROR/AndroidRuntime(25742): FATAL EXCEPTION: main
        java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
        at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
        at java.util.ArrayList.get(ArrayList.java:308)
        at pl.mg6.android.maps.extensions.impl.GridClusteringStrategy.recalculate(GridClusteringStrategy.java:268)
        at pl.mg6.android.maps.extensions.impl.GridClusteringStrategy.onCameraChange(GridClusteringStrategy.java:92)
        at pl.mg6.android.maps.extensions.impl.DelegatingGoogleMap$DelegatingOnCameraChangeListener.onCameraChange(DelegatingGoogleMap.java:442)
        at com.google.android.gms.maps.GoogleMap$2.onCameraChange(Unknown Source)
        at com.google.android.gms.internal.cn$a.onTransact(Unknown Source)
        at android.os.Binder.transact(Binder.java:347)
        at bgs.a(SourceFile:93)
        at maps.ah.s.a(Unknown Source)
        at maps.ah.t.run(Unknown Source)
        at android.os.Handler.handleCallback(Handler.java:730)
        at android.os.Handler.dispatchMessage(Handler.java:92)
        at android.os.Looper.loop(Looper.java:137)
        at android.app.ActivityThread.main(ActivityThread.java:5103)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:525)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
        at dalvik.system.NativeStart.main(Native Method)

Original issue reported on code.google.com by S.A.Pars...@gmail.com on 1 Aug 2013 at 12:49

GoogleCodeExporter commented 9 years ago
Hello,

Thank you for the input.

This has already been fixed and you can see the discussion in comments of Issue 
18.

1.4 is not yet released as a zip, but the fix can be found on the master branch.

Original comment by maciek.g...@gmail.com on 1 Aug 2013 at 8:10