I'm displaying a map using google maps API v2 but it doesn't show any street names. It shows the satellite image but no text. What am I doing wrong here?
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gmaps);
mLocationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
map.setMyLocationEnabled(true);
map.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
map.setInfoWindowAdapter(new MyInfoWindowAdapter(this, getLayoutInflater()));
map.setOnMapLongClickListener(this);
map.setOnInfoWindowClickListener(this);
map.setOnMarkerClickListener(this);
mMyLocation = map.getMyLocation();
setMarkerOnLocation();
}
This works as designed. You are setting the map in Satellite mode and according to https://developers.google.com/maps/documentation/android/map#map_types
Satellite
Satellite photograph data. Road and feature labels are not visible.
Hybrid
Satellite photograph data with road maps added. Road and feature labels are also visible.
So you'll need to use the following if you want the labels to show:
GoogleMap map;
...
// Sets the map type to be "hybrid"
map.setMapType(GoogleMap.MAP_TYPE_HYBRID);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With