1
googleMap.setMapType(GoogleMap.MAP_TYPE_NONE);

Here MAP_TYPE_NONE is one of the google default map type, if I can create one map layer like that, it would help me increasing the zoom levels.

Since I heard that we can increase zoom levels by creating our own custom map layer, so please help in creating custom layer with max zoom levels?

Kayathiri
  • 779
  • 1
  • 15
  • 26

1 Answers1

1

you can add whatever custom map layer you want, the most beautiful is to add a WMS service, or OSM maps.

regarding WMS, here it is my answer on another topic: https://stackoverflow.com/a/33912249/4120431

for OSM, i usually use mapquest (whose has levels over 21):

 private static TileProvider mMapQuestTileProvider = null;
 public static TileProvider getMapQuestOSMBackGroundTileProvider() {
        if (null == mMapQuestTileProvider) {
            mMapQuestTileProvider = new UrlTileProvider(256, 256) {

                @Override
                public URL getTileUrl(int x, int y, int z) {
                    try {
                        String f = "http://otile1.mqcdn.com/tiles/1.0.0/osm/%d/%d/%d.png";
                        return new URL(String.format(f, z, x, y));
                    } catch (MalformedURLException e) {
                        return null;
                    }
                }
            };

        }
        return mMapQuestTileProvider;
    }

------------
TileProvider tileProvider = getMapQuestOSMBackGroundTileProvider();
TileOverlay tileOverlay = myMap.addTileOverlay(new TileOverlayOptions()
.tileProvider(tileProvider));

Hope it helps

PS: You MUST keep google maps type to NONE in order to have levels over 21, otherwise you are limited by the lowest level available (21 in gmaps maps)

Community
  • 1
  • 1
N Dorigatti
  • 3,482
  • 2
  • 22
  • 33