I used the recomendation provided by @Moh,it is working fine. Thank you.
Also wrote the code for Mars map, for android. Using this example
https://github.com/googlemaps/android-samples/blob/master/ApiDemos/java/app/src/main/java/com/example/mapdemo/TileOverlayDemoActivity.java
Here the method for mars
@Override
public void onMapReady(GoogleMap map) {
map.setMapType(GoogleMap.MAP_TYPE_NONE);
TileProvider tileProvider = new UrlTileProvider(256, 256) {
@Override
public synchronized URL getTileUrl(int x, int y, int zoom) {
// The mars tile coordinate system .
System.out.println(" marte 101");
double bound = Math.pow(2, zoom);
String quads = "t";
System.out.println(" marte 102");
for (int z = 0; z < zoom; z++) {
bound = bound / 2;
if (y < bound) {
if (x < bound) {
quads=quads+"q";
} else {
quads=quads+"r";
x -= bound;
}
} else {
if (x < bound) {
quads=quads+"t";
y -= bound;
} else {
quads=quads+"s";
x -= bound;
y -= bound;
}
}
}
System.out.println(" marte 103");
String s = "http://mw1.google.com/mw-planetary/mars/elevation/"+quads+".jpg";
System.out.println(" marte 104:"+s);
URL url = null;
try {
url = new URL(s);
} catch (MalformedURLException e) {
throw new AssertionError(e);
}
return url;
}
};
System.out.println(" marte 2");
mMoonTiles = map.addTileOverlay(new TileOverlayOptions().tileProvider(tileProvider));
System.out.println(" marte 3");
mTransparencyBar.setOnSeekBarChangeListener(this);
System.out.println(" marte 4.1");
}
I obtained the original method, (in javascript) from this https://github.com/beekay-/gmaps-samples-v3/blob/master/planetary-maptypes/planetary-maptypes.html
I used elevation. But there is also the mars map with option visible or infrared.
Hope it helps for someone looking for a Mars map in Java Android.