0

I need to show world map on my application. I tried to use MapView and set liteMode= true and zoomLevel=1 but its not working as i need. Also groundOverlay not supported in liteMode and i need to show multiple groundOverlay on WorldMap. can anyone know about it?

Please refere below link i need to show full world map like this.

https://upload.wikimedia.org/wikipedia/commons/b/b0/World_location_map_%28equirectangular_180%29.svg

Below code i done :

    <com.google.android.gms.maps.MapView
                        android:id="@id/mapView"
                        android:layout_width="match_parent"
                        android:layout_height="@dimen/dp_180"
                        map:liteMode="true"
                        map:cameraZoom="1"
                        map:mapType="normal"
                        />

In my Java Class

 @Override
public void onMapReady(GoogleMap googleMap) {
    if (googleMap != null) {
        this.googleMap = googleMap;
        this.googleMap.getUiSettings().setCompassEnabled(false);
        this.googleMap.getUiSettings().setAllGesturesEnabled(false);
        this.googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
        this.googleMap.setMapStyle(MapStyleOptions.loadRawResourceStyle(getContext(), R.raw.style_json));

        this.googleMap.getUiSettings().setMapToolbarEnabled(false);
        this.googleMap.getUiSettings().setCompassEnabled(false);
        this.googleMap.getUiSettings().setScrollGesturesEnabled(false);
}

In this is added zoomLevel=1 but in google map its not showing world map as like above image link i shared.

khushbu
  • 382
  • 1
  • 3
  • 15

2 Answers2

0
CameraPosition cameraPosition = new CameraPosition.Builder().
                    target(YourLocationPoint).
                    tilt(60).
                    zoom(15).
                    bearing(0).
                    build();

myMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));

You can use tilt and bearing for achieving same Doc

Ganesh Pokale
  • 1,538
  • 1
  • 14
  • 28
  • I need to show world map and need to add multiple markers on it not for particular one marker. Please refer attached link.I need to show map like this – khushbu May 10 '19 at 10:10
0

Set style for Google map , in onMapReady of your activity.

googleMap.setMapStyle(MapStyleOptions.loadRawResourceStyle(getActivity(), R.raw.customized_map_style));

you need to download the style. please go through below link https://developers.google.com/maps/documentation/android-sdk/styling

update the styles as you wish.

Sajith
  • 713
  • 6
  • 21