Re: mbTiles (Raster Satellite tile ) not load in Android

36 views
Skip to first unread message
Message has been deleted

Naser Bagheri

unread,
Nov 8, 2017, 4:54:47 AM11/8/17
to cartodb


On Wednesday, November 8, 2017 at 1:20:01 PM UTC+3:30, Naser Bagheri wrote:
 code :

@Override
protected void onCreate(Bundle savedInstanceState) {
// MapBaseActivity creates and configures mapView
super.onCreate(savedInstanceState);

contentView.addBaseLayer(BaseMapsView.DEFAULT_STYLE);
MBTilesTileDataSource mbTileDataSource = createTileDataSourceRaster();

// Add our new layer
RasterTileLayer layer = new RasterTileLayer(mbTileDataSource);
contentView.mapView.getLayers().insert(0, layer);
// Zoom to the correct location
MapPos tehran = contentView.projection.fromWgs84(new MapPos(54.4807, 31.8962));
contentView.mapView.setFocusPos(rome, 0);
contentView.mapView.setZoom(2, 0);
}


protected MBTilesTileDataSource createTileDataSourceRaster() {
String mbTileFile = "iran.mbtiles"; //create with maptiler
try {
String localDir = getExternalFilesDir(null).toString();
String path = localDir + "/" + mbTileFile;
Log.i(MapApplication.LOG_TAG,"copy ok " + path);
MBTilesTileDataSource RasterTileDataSource = new MBTilesTileDataSource(0, 11, path);
return RasterTileDataSource;

} catch (IOException e) {
Log.e(MapApplication.LOG_TAG, e.getLocalizedMessage());
}

return null;
}





Error:
11-08 04:48:47.206 4026-4060/com.carto.advancedmap D/carto-mobile-sdk: ConfigChooser.chooseConfig: Selected display configuration: 0
11-08 04:48:47.224 4026-4060/com.carto.advancedmap I/carto-mobile-sdk: BaseMapView::onSurfaceCreated()
11-08 04:48:47.259 4026-4060/com.carto.advancedmap D/carto-mobile-sdk: TileRenderer: Surface created
11-08 04:48:47.260 4026-4060/com.carto.advancedmap D/carto-mobile-sdk: TileRenderer: Surface created
11-08 04:48:47.261 4026-4060/com.carto.advancedmap I/carto-mobile-sdk: BaseMapView::onSurfaceChanged(): width: 1024, height: 512

--------- beginning of crash
11-08 04:48:47.265 4026-4057/com.carto.advancedmap A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 4057 (rto.advancedmap)
11-08 04:48:47.278 4026-4042/com.carto.advancedmap E/Surface: getSlotFromBufferLocked: unknown buffer: 0xf3e14300




version :cartodb-mobile-sdk-4.1.0 
Android 6 and 7  
D/carto-mobile-sdk: ConfigChooser.chooseConfig: Model: LG-H990, board: msm8996

Naser Bagheri

unread,
Mar 17, 2018, 9:37:16 AM3/17/18
to cartodb




Can you help me!!!!!
Reply all
Reply to author
Forward
0 new messages