3

I am getting a blue screen when I load my Google Maps on Android. I don't know what I am doing wrong, this is my code for getting the locations:

MapView mapView = (MapView) findViewById(R.id.mapDire);
Route route = directions(new GeoPoint((int)(2*1E6),(int)(34*1E6)),
  new GeoPoint((int)(3*1E6),(int)(36*1E6)));
dda
  • 5,760
  • 2
  • 24
  • 34
mutiemule
  • 2,027
  • 2
  • 25
  • 33

5 Answers5

14

I think can be two things

  • Your coordinates are 0,0 and the map is opening in the ocean
  • Something wrong with your API Key

In the first case try zoom out a lot of times and try to see some continent.

In the second try to read the documentation or/and try this link

I hope this helps.

groff07
  • 2,306
  • 3
  • 29
  • 46
2

I have this problem in my application and see below code in onlocationchanged method and resolve it.

LatLng myCoordinates = new LatLng(location.getLatitude(), location.getLongitude());
         mMap.moveCamera(CameraUpdateFactory.newLatLng(myCoordinates));

    mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(), location.getLongitude()), 17.0f));

    marker.setPosition(myCoordinates);
Harshith Rai
  • 2,958
  • 7
  • 20
  • 35
nas mat
  • 21
  • 1
0

Normally blue screen means your Google API key didn't work.

GoogleMaps - Actual Map not showing

Community
  • 1
  • 1
Quinma
  • 1,386
  • 2
  • 15
  • 38
0

If your map is not showing, only grids/blank screen showing, that's because your Map API key is missing or incorrect. Sign up for Google Android Map API.

Try this the link for more info.

dda
  • 5,760
  • 2
  • 24
  • 34
Adeel Pervaiz
  • 1,316
  • 10
  • 11
0

There could 3 reasons as to why You see blue screens

  1. Your Long/Lat Points to Water region - or Ocean region, Invariably there's nothing wrong just you Long/Lat Pointing to Water which is blue in color.
  2. Your Long/Lat is wrong and nothing comes up
  3. Your API key is wrong which can be corrected on your Android manifest file directory: Android/app/src/main/AndroidManifest.xml
eclat_soft
  • 309
  • 2
  • 8