Background
I want to show the popular map of the entire world, and put markers on it.
The problem
I tried to use Google Maps for it, but it seems (here) it doesn't support zooming out enough to show the entire world.
What I've found
Looking on Wikipedia (here), the center of the earth is on 30°00′N 31°00′E , but this seems to be in Egypt, and it doesn't look like the center of the world map, even on the Wikipedia page itself:
I've also found a similar question here, so I've converted it to Android code:
MapFragment mapFragment = (MapFragment) getFragmentManager().findFragmentById(R.id.mapFragment);
mapFragment.getMapAsync(new OnMapReadyCallback() {
@Override
public void onMapReady(final GoogleMap googleMap) {
LatLngBounds allowedBounds = new LatLngBounds(
new LatLng(-85, 180), // bottom right corner
new LatLng(85, -180) // top left corner of map
);
double k = 5.0f;
double n = allowedBounds.northeast.latitude - k;
double e = allowedBounds.northeast.longitude - k;
double s = allowedBounds.southwest.latitude + k;
double w = allowedBounds.southwest.longitude + k;
LatLng neNew = new LatLng(n, e);
LatLng swNew = new LatLng(s, w);
LatLngBounds boundsNew = new LatLngBounds(swNew, neNew);
googleMap.setLatLngBoundsForCameraTarget(boundsNew);
}
});
But it does't show entire world at all:
I've also tried to play with the zoom (looking here), but it never zoomed out enough to show as much as continents:
googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(30, 31), 1));
I chose "1", because the docs say that "1" is the value for "world":
The following list shows the approximate level of detail you can
expect to see at each zoom level:
1: World
The question
How can I show the entire world on Google Maps ?
Or, is there any good alternative to just show the world map (static image is good too), and be able to put markers on it? Maybe even using a VectorDrawable?
Is there an image I can show, and somehow put markers on it?
See Question&Answers more detail:
os