Reply
Regular Contributor
cpick
Posts: 71
Registered: 08-26-2009

Re: Google Maps

We also are getting the MyLocationOverlay to cause a FC

11-12 08:55:56.449 W/dalvikvm( 4020): threadid=3: thread exiting with uncaught exception (group=0x4000ff28)
11-12 08:55:56.449 E/AndroidRuntime( 4020): Uncaught handler: thread main exiting due to uncaught exception
11-12 08:55:56.479 E/AndroidRuntime( 4020): java.lang.ClassCastException: android.graphics.drawable.BitmapDrawable
11-12 08:55:56.479 E/AndroidRuntime( 4020): at com.google.android.maps.MyLocationOverlay.getLocationDot(MyLocationOverlay.java:180)
11-12 08:55:56.479 E/AndroidRuntime( 4020): at com.google.android.maps.MyLocationOverlay.drawMyLocation(MyLocationOverlay.java:561)
11-12 08:55:56.479 E/AndroidRuntime( 4020): at com.froogloid.android.gspot.savemaplocation$MyLocationOverlay1.drawMyLocation(savemaplocation.java:473)
11-12 08:55:56.479 E/AndroidRuntime( 4020): at com.google.android.maps.MyLocationOverlay.draw(MyLocationOverlay.java:511)
11-12 08:55:56.479 E/AndroidRuntime( 4020): at com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:45)

11-12 08:55:56.479 E/AndroidRuntime( 4020): at com.google.android.maps.MapView.onDraw(MapView.java:471)

 

I also reported this to Cyanogen, as they had the issue : http://code.google.com/p/cyanogenmod/issues/detail?id=344#makechanges

 

Not sure what they did to fix  it, but they did fix it.. 

Please use plain text.
Motorola
karang
Posts: 232
Registered: 07-25-2008

Re: Google Maps

Hi Guys,

 

My Apologies - Seems like I was not paying full attention while reading this issue - I just presumed it was Overlays and tested with normal Overlay - The issue is with "MyLocationOverlay". I too get the Force Close now. We are investigating this internally but my guess is that this may invovle verifying with Google about the Maps libraries we are using - We shall keep you'll informed. Thanks for reporting this issue.

 

Thanks,

Karan

Please use plain text.
Visitor
JCarpenter
Posts: 4
Registered: 11-03-2009

Re: Google Maps

Any update on this issue? 

 

This is a frustrating issue because it effects so many applications. I suspect that you have included the wrong Google API library in your build and it seems like this should be a simple fix. I tested it on the 1.1.3.1 release and it remains broken. Possibly related to this is the Google Logo on the bottom right of MapView displays is missing. The box displays a red background most likely a missing resource.  

 

 

The two workarounds that I have now are:

 

1. Stop supporting cliq/dex until they upgrade to 1.6 by setting  <uses-sdk android:minSdkVersion="4" /> in your manifest. 

 

 2. Extend the MyLocationOverlay class and draw method and manually position the icon. 

 

- Another user has provided a Fixed class that you can implement 

 

 

You are free to use and adapt the source code as you see fit:

http://www.spectrekking.com/download/FixedMyLocationOverlay.java

 

And the accompanying drawable:

http://www.spectrekking.com/download/mylocation.png

 

 

 

 You can see how neither one are great solutions. Let me know if we can help push this issue forward at all. 

 

Thanks. 

 

 

John Carpenter, CTO Mob4Hire and General Android Nerd
Please use plain text.
Regular Contributor
cpick
Posts: 71
Registered: 08-26-2009

Re: Google Maps

Inside your MyLocationOverlay

You can put a try catch around the super() call.

 

That will prevent the dot from crashing the app. You can then use the location passed into MyLocationOverlay to manually draw the dot. If you need sample code let me know.. But should be pretty easy..  

Please use plain text.