2016-07-20 1 views
0

In meiner Anwendung verwende ich Google Maps Satellite View, aber es zeigt nicht alle Labels in meiner Stadt wie in Google Maps Application. Hier Screenshots aus meiner Anwendung und von Google Maps Anwendung:Google Maps Satellitenansicht zeigt nicht alle Labels

Meine Anwendung: My application Screenshot

Google Maps Anwendung: Google Maps Application Screenshot

Und hier ist mein Code:

protected void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.activity_location_route); 
    int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext()); 
    if (status != ConnectionResult.SUCCESS) { 
     int requestCode = 10; 
     Dialog dialog = GooglePlayServicesUtil.getErrorDialog(status, this, requestCode); 
     dialog.show(); 
    } 
    else{ 
     SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager() 
       .findFragmentById(R.id.map); 
     mapFragment.getMapAsync(this); 
    } 
} 

@Override 
public void onMapReady(GoogleMap googleMap) { 
    try { 
     mGoogleMap = googleMap; 
     mGoogleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID); 
     mGoogleMap.setMyLocationEnabled(true); 
     LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE); 
     Criteria criteria = new Criteria(); 
     String provider = locationManager.getBestProvider(criteria, true); 
     Location location = locationManager.getLastKnownLocation(provider); 
     if (location != null) { 
      onLocationChanged(location); 
     } 
     drawYourMarker(yourLocation); 
     drawPharmacyMarker(pharmacyLocation); 

     // Checks, whether start and end locations are captured 
     if (yourLocation != null && pharmacyLocation != null) { 
      String url = getDirectionsUrl(yourLocation, pharmacyLocation); 
      DownloadTask downloadTask = new DownloadTask(); 
      downloadTask.execute(url); 
     } 
    } catch (SecurityException e) { 
     e.printStackTrace(); 
    } 
} 

Ist Gibt es einen Weg, um meine Anwendung mehr Labels wie in Google Maps-Anwendung zu zeigen?

Antwort

0

Dies ist, weil Google Maps App alle verfügbaren APIs von Google verwenden. Die API, nach der Sie suchen, ist die Google Places API, um alle Labels zu erhalten.

Sie müssen es auf der Google API-Konsole aktivieren und folgen Sie dieser tutorial, um sie auf Ihrer Karte zu setzen.

Hoffe diese Hilfe.