Android: Google map does not update when zoomed

I use the Google Map API V2 in my application development. There is no problem displaying the map provided it is initialized with default enlargement. But when I try to enlarge the map, it does not update as I want. When I zoom in, it’s just an empty map and it’s not loading anything. I was waiting for download, but no answer.
Thank.

Java

// Google Map Initialization

        try { 
            if (googleMap == null) {
            googleMap = ((SupportMapFragment) getSupportFragmentManager().
                    findFragmentById(R.id.map)).getMap();
            }
            googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
            googleMap.setMyLocationEnabled(true);

        } catch (Exception e) {
            e.printStackTrace();
        }

        // Google Map Initialization ends


        // Google Map Manipulation


        MapTypeChange.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View arg0) {
                // TODO Auto-generated method stub
                if(googleMap.getMapType() == GoogleMap.MAP_TYPE_TERRAIN) {
                    googleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
                    MapTypeChange.setText("Terrain");
                }
                else {
                    googleMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);
                    MapTypeChange.setText("Satellite");
                }
            }
        });


        googleMap.addMarker(new MarkerOptions()
        .position(new LatLng(10, 10))
        .title("Gaurav"))
        .showInfoWindow();

        googleMap.addMarker(new MarkerOptions()
        .position(new LatLng(50, 50))
        .title("Rohit")).showInfoWindow();

        Polyline line = googleMap.addPolyline(new PolylineOptions()
         .add(new LatLng(10, 10), new LatLng(50, 50))
         .width(5)
         .color(Color.RED)
         .geodesic(true));

        // Google Map Manipulation Ends

XML

<fragment
            android:id="@+id/map"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            class="com.google.android.gms.maps.SupportMapFragment" >
        </fragment>

Manifest permissions

<uses-permission android:name="com.beproject.ourway.permission.MAPS_RECEIVE" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
+4
source share
1 answer

, , . , / API API Google. , , .

Google, , .

+4

All Articles