AnsweredAssumed Answered

Two Layers top of each other, one is not shown - Android

Question asked by mirliva1976 on Jan 23, 2018

Hello,

 

I want to display 2 maps on top of each other like in example  Local MBTiles | ArcGIS for Developers  . The example runs perfect, however when I try to change the example with my custom .mbtiles file, there is the problem: Although I have added two layers on top of each other only ArcGISTiledMapServiceLayer is shown, my mbtiles is NOT shown.

 

This is the first Layer:

tileLayer = new ArcGISTiledMapServiceLayer(
        "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
// Add tiled layer to MapView
mMapView.addLayer(tileLayer);


And this is the 2nd Layer: (.mbtiles)

MBTilesLayer mbLayer = new MBTilesLayer(Environment.getExternalStorageDirectory().getPath() + "/GIS/test5.mbtiles");   
mbLayer.setOpacity(0.5f);
mMapView.addLayer(mbLayer);

File place is Ok, tested
Opacity changed, tested

As you know since tileLayer is online layer of Esri it covers and shows all world (I dont know details but it may
have zoom levels from 0 - to 20+ or whtever). My small a few hundred MB size .mbtiles map is also from
zoom level from 0 to 20 BUT it is partial - that means it covers only a small island for example.

When I run, only online world map (1st layer) is shown and my 2nd layer (small island) is not shown.

Any idea for the solution will be appreciated.

Thanks

Outcomes