Missing map!

by MartinM » Wed, 21 Apr 2010 18:39:57 GMT

Sponsored Links
 I have a basic working GoogleMap app, which I've copied and made some
changes to. However, hardly any map is drawn, and I can't see why.
Otherwise the app works OK - if I Geo Fix the map moves (I lose the
map I have and just get white with grid, plus a green dot as expected)

Piccy at:    http://www.it-helps.co.uk/nomap.jpg 

I'm sure it's an obvious error, hopefully easy for you guys to spot ;)


Missing map!

by Mark Murphy » Wed, 21 Apr 2010 18:53:48 GMT


That looks like an Internet connectivity issue. I run into that with the
Google Maps application if I try getting maps over EDGE instead of 3G or
WiFi. The fact that you are getting some tiles, just not all, means it
should not be a programming problem (unless you have some infinite loop
somewhere that is tying up the CPU).

Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

_Beginning Android 2_ from Apress Now Available!


Sponsored Links

Missing map!

by MartinM » Wed, 21 Apr 2010 19:31:31 GMT

 Thanks Mark - a sensible observation, but the original app works fine
still !

I've also had a script running on a remote server for a few hours that
is still OK, plus the internet connection is a very good one.

Maybe there is a problem somewhere on the net which will be OK later.


Missing map!

by MartinM » Wed, 21 Apr 2010 22:11:23 GMT

 OK, may be unrelated, but am also having problems with
geoCoder.getFromLocationName which thows 'Unable to parse response
from server'. Seems to be a common problem, but no solution found!
Could the cause of this be the cause of my map problems ?
I do get

04-21 14:00:21.287: ERROR/ActivityThread(5222): Failed to find
provider info for com.google.settings

which I'm not sure is relevant or not.

 protected GeoPoint GetPointFromAddress(String strAddress)
      Geocoder geoCoder = new Geocoder(this, Locale.getDefault());
      try {
        List<Address> addresses = geoCoder.getFromLocationName(
                        strAddress, 5);
        if (addresses.size() > 0) {
            GeoPoint gp = new GeoPoint(
                    (int) (addresses.get(0).getLatitude() * 1E6),
                    (int) (addresses.get(0).getLongitude() * 1E6));
            return gp;
      } catch (IOException e) {
      return null;

> >

Missing map!

by MartinM » Wed, 21 Apr 2010 23:01:33 GMT

 Hmmm it appears my old apps don't work today. Initial map is OK, but
any movement results in white space, so no updates.

How can the initial map be OK if the google server isn't accessible?
Does it get cached somewhere (I have restarted the emulator and

> > >

Missing map!

by Mark Murphy » Wed, 21 Apr 2010 23:06:49 GMT


Google Maps is a proprietary component, so we do not know much of the
details of how it works.

Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android Training in US: 14-18 June 2010:  http://bignerdranch.com 


Missing map!

by MartinM » Fri, 23 Apr 2010 18:40:18 GMT

 All working fine today. Must've been a Google problem. Phew :)


Other Threads

1. Live Wallpaper canvas gradient banding

Hey guys

First time i'm posting. I was hoping that one of you might have had some
experience with this.

I am painting to the canvas on every Runnable.run call with a changing
colour and i'm hoping to put a gradient over the top but the gradient i'm
creating is banding horribly. After Googling around for a day I came up with
2 solutions:
set the dither to true
set the canvas bitmap to ARGB_8888

i've tried doing the first one (set dither to true) on the getWallpaper()
and the Paint object but it's not helped (I can't see any dithering at all)
so I've tried changing the canvas bitmap but i'm not sure how to actually
display it

// _canvasBmp = Bitmap.createBitmap(metrics.widthPixels,
metrics.heightPixels, Bitmap.Config.ARGB_8888);

_shadowPaint.setShader(new RadialGradient(metrics.widthPixels / 2,
metrics.heightPixels / 2, metrics.heightPixels / 2, 0x00000000, 0x33000000,
_shadowPaint.setDither(true); // this hasn't seemed to have done anything

// my main rendering method is this (based on the Google live wallpaper
void drawFrame()
final SurfaceHolder holder = getSurfaceHolder();

Canvas c = null;
c = holder.lockCanvas();

// this was my attempt to update the bitmap to one that was ARGB_8888 but it
didn't render at all
 if (c != null)
// draw something
 getWallpaper().setDither(true); // yet another attempt to get some kind of
dithering going to no avail
if (c != null)

 if (_isVisible)
_handler.postDelayed(_drawClock, 1000 / 25);

private void drawShading(Canvas c)
c.drawRect(_screenBounds, _shadowPaint);

Thanks in advance for your time



2. identifier num range


R.drawable.<drawablename> returns a unique identifier (int) for each
drawable file.

What are the num range of these auto-generated identifiers?

Ps. I want to give my own identifiers to my bitmaps generated on the
fly. I don't want they overlap existing auto-generated identifiers of
other files. That's why i will choose identifier nums out of the auto-
generatable range and i need the min and max possible values of this



3. CustomView in a ScrollView

4. Making flash as torch

5. Send SMS message in a background?

6. one view calls other view`s ondraw.

7. Notification bar always shown on ViewSonic g tablet