Android_coder
Android_coder

Reputation: 9993

My App not loading Google map

I am using this code for load google map private GoogleMap myMap;

if(myMap!=null){
            myMap.setMyLocationEnabled(true);
            myMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
            marker = myMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).title(getAddress(latitude, longitude)));
            Location = new LatLng(latitude, longitude);
            CameraPosition cameraPosition = new CameraPosition.Builder().target(Location).zoom(15) 
                    .bearing(90) // Sets the orientation of the camera to
                    .tilt(30) // Sets the tilt of the camera to 30 degrees
                    .build(); // Creates a CameraPosition from the builder
            // myMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
            myMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude, longitude), 15));
            }

but map is not loading and occurring this issue

enter image description here

Upvotes: 0

Views: 105

Answers (1)

amalBit
amalBit

Reputation: 12181

You must install the latest Google play services in your phone/tab/emulator before running the app.

For google play on emulator.

Upvotes: 1

Related Questions