On Thu, Jul 7, 2011 at 2:00 PM, Raghav Sood <raghavs...@gmail.com> wrote: > But the thing is location can't be null. If it was the app wouldn't have > reached here. I check for location being null in my main activity: > > if (location != null) { > > // Update my location marker > > positionOverlay.setLocation(location); > > Only the does MyPositionOverlay receive location.
As I indicated in your previous thread, if you try to use the overlay and YOU HAVE NOT RECEIVED A LOCATION YET (caps to ensure you pay attention), your location variable will be null simply because you haven't ever had any valid Location to use. So, as I wrote before, you either need to not set up the overlay until you actually have a Location, or you need to have more smarts in the overlay to deal with the null location case. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en