Reputation: 1
I am using this simple tutorial: a simple google map. I used other tutorials and I got the same result: my map is not clear as you can see in the following pic:
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
@Override
public void onMapReady(GoogleMap map) {
// Add a marker in Sydney, Australia, and move the camera.
LatLng sydney = new LatLng(-34, 151);
map.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
map.moveCamera(CameraUpdateFactory.newLatLng(sydney));
}
}
Upvotes: 0
Views: 70
Reputation: 13348
you can change map type by using following code
map.setMapType(GoogleMap.MAP_TYPE_HYBRID);
The Google Maps Android API offers four types of maps, as well as an option to have no map at all:
Normal Typical road map. Roads, some man-made features, and important natural features such as rivers are shown. Road and feature labels are also visible.
Hybrid Satellite photograph data with road maps added. Road and feature labels are also visible.
Satellite Satellite photograph data. Road and feature labels are not visible.
Terrain Topographic data. The map includes colors, contour lines and labels, and perspective shading. Some roads and labels are also visible.
More details Refer Here
Upvotes: 1