Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException when no IconDataProvider implementation specified #26

Closed
GoogleCodeExporter opened this issue Jul 14, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

Finally, got some time to try Maps Extensions for my app. Migration went 
smooth, although docs are scarce (and i can probably be considered GMaps power 
user, having thus a competitive advantage;-).

One thing that is probably worth improving is to implement some default cluster 
icons.

What i intuitively did (after updating imports) was to add this line to my code:

  googleMap.setClustering(new ClusteringSettings().addMarkersDynamically(true));

After that my app went bust:

java.lang.NullPointerException
at 
pl.mg6.android.maps.extensions.impl.BaseClusteringStrategy.getIconData(BaseClust
eringStrategy.java:68)
at 
pl.mg6.android.maps.extensions.impl.BaseClusteringStrategy.getFromCacheOrCreate(
BaseClusteringStrategy.java:59)
at 
pl.mg6.android.maps.extensions.impl.ClusterMarker.refresh(ClusterMarker.java:80)
at 
pl.mg6.android.maps.extensions.impl.ClusterRefresher.refreshAll(ClusterRefresher
.java:52)
at 
pl.mg6.android.maps.extensions.impl.GridClusteringStrategy.recalculate(GridClust
eringStrategy.java:327)
at 
pl.mg6.android.maps.extensions.impl.GridClusteringStrategy.onCameraChange(GridCl
usteringStrategy.java:92)
at 
pl.mg6.android.maps.extensions.impl.DelegatingGoogleMap$DelegatingOnCameraChange
Listener.onCameraChange(DelegatingGoogleMap.java:446)

Sure, it's trivial to grab DemoIconProvider implementation along with some 
resources from sample project, but it'd be nice to have it out of the box. 

Original issue reported on code.google.com by estee...@gmail.com on 24 Jul 2013 at 3:53

@GoogleCodeExporter
Copy link
Author

Hello Taras,

The first thing to change is probably the exception that is being thrown, which 
says almost nothing about the reason. Bad, bad.

I also think it would be beneficial to have some default implementation.

Original comment by maciek.g...@gmail.com on 24 Jul 2013 at 10:50

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Original comment by maciek.g...@gmail.com on 25 Aug 2013 at 12:20

  • Changed state: FixedNotReleased
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

Added DefaultClusterOptionsProvider which is used when no provider is set

Original comment by maciek.g...@gmail.com on 31 Aug 2013 at 4:07

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant