android-maps-utils icon indicating copy to clipboard operation
android-maps-utils copied to clipboard

White squares - issue with latest Play Services 9.0.83

Open yuraj11 opened this issue 10 years ago • 32 comments

Hello, today has started appearing this issue (after few of zoom in/out most of group icons are replaced by white squares): gmaps_white_squares_issue

We had no problems before but latest Play services has broken something (9.0.83, updated 11. may). We have test our application with Play Services 8.7.03 and there is absolutely no problem. Our application uses Play services SDK 8.4.0.

yuraj11 avatar May 13 '16 13:05 yuraj11

Confirm, I have the same issue. There are no any issues on devices with Play Services 9.0.82 and Play Services 8.7.03. I use Play services SDK 8.4.0 and android-maps-utils 0.4.3.

evgentset avatar May 13 '16 13:05 evgentset

Confirm, we have also the same issue. Using Play services SDK 8.4.0 and android-maps-utils 0.4.3 and Play Service 9.0.83.

markers

ursimon avatar May 13 '16 14:05 ursimon

I can confirm the same erroneous behavior. Play Services SDK 8.4.0, Play Services 9.0.83, android-maps-utils 0.4.3.

Mavamaarten avatar May 13 '16 18:05 Mavamaarten

screenshot_20160513-231601

Confirm, I'm faced with a same issue. Our app uses android-maps-utils 0.4.3, Google Play Services 9.0.83, Google Play services SDK 8.4.0

madsvyat avatar May 13 '16 20:05 madsvyat

I'm seeing it too on two Nexus 5 devices:

Android 4.4.4, Google Play services 9.0.82 Android 6.0.1, Google Play services 9.0.83

A Samsung Galaxy S4 with Android 4.2.2 and Google Play services 8.7.03 is working correctly.

I've seen cases where some markers with a particular bitmap are correct, and others with the same bitmap are white squares.

I've heavily simplified the android-maps-utils library, and as an experiment I tried disabling cluster rendering and the marker cache, but the problem still happens. Strange that this bug hasn't been reported in the main gmaps-api-issues database yet. image

akirmse avatar May 14 '16 04:05 akirmse

Ok someone has opened issue on gmaps-api-issues too: https://code.google.com/p/gmaps-api-issues/issues/detail?id=9765

yuraj11 avatar May 14 '16 08:05 yuraj11

Possible workarround from the gmaps-api-issues page:

change marker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.drawableid));

to marker.setIcon(BitmapDescriptorFactory.fromBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.drawableid))); //could affect general memory consumption tho(?), I haven't tested with more than the app reported with in the issue.

Mavamaarten avatar May 16 '16 17:05 Mavamaarten

I can confirm this issue. In addition to @Mavamaarten you must not reuse marker images.

meierjan avatar May 17 '16 12:05 meierjan

@Mavamaarten in what method are you calling marker.setIcon ? somewhere in the ClusterRenderer?

bperin avatar May 17 '16 19:05 bperin

+1 - we are facing the same issue.

spotlmnop avatar May 18 '16 05:05 spotlmnop

Confirm, we have also the same issue. Play services SDK 8.3.0 Google Play services version 8.7.03 (2645110-234)

index_1

asanovcs avatar May 18 '16 10:05 asanovcs

Same problem here. Google Play services 9.0.83

13262642_1049201668467857_2078773042_o

jose-brandao avatar May 18 '16 11:05 jose-brandao

Same issue here. The fix mentioned by @Mavamaarten works for me but only partially. Single icons on cluster are displayed now correctly always but not the (standard) clustered icons (the circles with numbers). Am I missing a part to fix?

brockhaus avatar May 19 '16 12:05 brockhaus

@brockhaus it fixes the individual icons because your generating unique bitmaps for each icon, but the cluster ones are still shared, if you create custom cluster icons it might fix it

bperin avatar May 19 '16 19:05 bperin

screenshot_2016-05-20-08-16-55

Same issue in my app.

dfsilva avatar May 20 '16 11:05 dfsilva

Same issue also in my app Play services 9.0.83 SDK 8.4.0

screenshot_2016-05-20-18-13-37

omricarmi avatar May 20 '16 15:05 omricarmi

Having the same issue. Implemented a workaround (same as mentioned by @Mavamaarten) but have similar concerns about memory consumption and performance.

bdiegel avatar May 21 '16 00:05 bdiegel

Also have this issue, but only on some devices (like Xiaomi). White spaces appear instead of markers or cluster markers during zoom in/out. Don't think it's related to new Play services SDK version, because my app uses version 8.4.0 and android-maps-utils version 0.4.3.

UPD: Checked older builds of my app, which hadn't had any issues and tried older verions of android-maps-utils - the same creepy issue appears there too now even on devices, which previously were ok. I think it's caused by something else (like google play services update on devices), but not by this lib.

vbuberen avatar May 21 '16 09:05 vbuberen

Having the same issue, I made a workaround avoid the SparseArray object, used in official DefaultClusterRender.java (private SparseArray mIcons = new SparseArray();).

So I make the cluster icon every time, setting background color and text dynamically in onBeforeClusterRendered method.

Here my full working code: https://github.com/bishop87/share/blob/master/android/MyMapRender.java

Note about my code: for my scope I also introduced a boolean flag to handle a enabled/disabled cluster status, changing its color (green if disabled, orange if enabled). But you can simply remove all this stuff and obtain a original-like rendering. At the moment, the only disadvantage I noticed is on performance: without shared object SparseArray, you are going to draw all cluster icon, even if these have already been drawn. But for a limited items number (1500 items in my case), the performance gap is negligible.

Hope this help someone.

bishop87 avatar May 22 '16 06:05 bishop87

I got the same issue

vjerryv avatar May 22 '16 18:05 vjerryv