Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2014-10-17 15:58:05 +02:00
commit 00448a1935
2 changed files with 15 additions and 15 deletions

View file

@ -58,8 +58,8 @@ public class GLActivity extends Activity {
private BinaryMapDataProvider _binaryMapDataProvider;
private BinaryMapPrimitivesProvider _binaryMapPrimitivesProvider;
private BinaryMapStaticSymbolsProvider _binaryMapStaticSymbolsProvider;
private BinaryMapRasterBitmapTileProvider _binaryMapRasterBitmapTileProvider;
private OnlineRasterMapTileProvider _onlineMapRasterBitmapTileProvider;
private BinaryMapRasterLayerProvider _binaryMapRasterLayerProvider;
private OnlineRasterMapLayerProvider _onlineMapRasterLayerProvider;
private IMapRenderer _mapRenderer;
private GpuWorkerThreadPrologue _gpuWorkerThreadPrologue;
private GpuWorkerThreadEpilogue _gpuWorkerThreadEpilogue;
@ -205,10 +205,10 @@ public class GLActivity extends Activity {
_binaryMapStaticSymbolsProvider = new BinaryMapStaticSymbolsProvider(
_binaryMapPrimitivesProvider,
_rasterTileSize);
_binaryMapRasterBitmapTileProvider = new BinaryMapRasterBitmapTileProvider_Software(
_binaryMapRasterLayerProvider = new BinaryMapRasterLayerProvider_Software(
_binaryMapPrimitivesProvider);
_onlineMapRasterBitmapTileProvider = OnlineTileSources.getBuiltIn().createProviderFor("Mapnik (OsmAnd)");
_onlineMapRasterLayerProvider = OnlineTileSources.getBuiltIn().createProviderFor("Mapnik (OsmAnd)");
Log.i(TAG, "Going to create renderer");
_mapRenderer = OsmAndCore.createMapRenderer(MapRendererClass.AtlasMapRenderer_OpenGLES2);
@ -225,11 +225,11 @@ public class GLActivity extends Activity {
_mapRenderer.addSymbolProvider(_binaryMapStaticSymbolsProvider);
updateView();
/*
IMapRasterBitmapTileProvider mapnik = OnlineTileSources.getBuiltIn().createProviderFor("Mapnik (OsmAnd)");
IMapRasterLayerProvider mapnik = OnlineTileSources.getBuiltIn().createProviderFor("Mapnik (OsmAnd)");
if (mapnik == null)
Log.e(TAG, "Failed to create mapnik");
*/
_mapRenderer.setRasterLayerProvider(RasterMapLayerId.BaseLayer, _binaryMapRasterBitmapTileProvider);
_mapRenderer.setRasterLayerProvider(RasterMapLayerId.BaseLayer, _binaryMapRasterLayerProvider);
_glSurfaceView = (GLSurfaceView) findViewById(R.id.glSurfaceView);
//TODO:_glSurfaceView.setPreserveEGLContextOnPause(true);
@ -309,9 +309,9 @@ public class GLActivity extends Activity {
_binaryMapStaticSymbolsProvider = null;
}
if (_binaryMapRasterBitmapTileProvider != null) {
_binaryMapRasterBitmapTileProvider.delete();
_binaryMapRasterBitmapTileProvider = null;
if (_binaryMapRasterLayerProvider != null) {
_binaryMapRasterLayerProvider.delete();
_binaryMapRasterLayerProvider = null;
}
if (_mapRenderer != null) {

View file

@ -14,7 +14,7 @@ import net.osmand.core.android.CoreResourcesFromAndroidAssetsCustom;
import net.osmand.core.jni.AtlasMapRendererConfiguration;
import net.osmand.core.jni.BinaryMapDataProvider;
import net.osmand.core.jni.BinaryMapPrimitivesProvider;
import net.osmand.core.jni.BinaryMapRasterBitmapTileProvider_Software;
import net.osmand.core.jni.BinaryMapRasterLayerProvider_Software;
import net.osmand.core.jni.BinaryMapStaticSymbolsProvider;
import net.osmand.core.jni.IMapRenderer;
import net.osmand.core.jni.Logger;
@ -23,7 +23,7 @@ import net.osmand.core.jni.MapRendererClass;
import net.osmand.core.jni.MapRendererSetupOptions;
import net.osmand.core.jni.MapStylesCollection;
import net.osmand.core.jni.ObfsCollection;
import net.osmand.core.jni.OnlineRasterMapTileProvider;
import net.osmand.core.jni.OnlineRasterMapLayerProvider;
import net.osmand.core.jni.OnlineTileSources;
import net.osmand.core.jni.OsmAndCore;
import net.osmand.core.jni.Primitiviser;
@ -162,16 +162,16 @@ public class NativeQtLibrary {
BinaryMapPrimitivesProvider binaryMapPrimitivesProvider = notGc(new BinaryMapPrimitivesProvider(
notGc(new BinaryMapDataProvider(obfsCollection)),
notGc(new Primitiviser(presentation)), rasterTileSize));
BinaryMapRasterBitmapTileProvider_Software binaryMapRasterBitmapTileProvider = notGc(new BinaryMapRasterBitmapTileProvider_Software(
BinaryMapRasterLayerProvider_Software binaryMapRasterLayerProvider = notGc(new BinaryMapRasterLayerProvider_Software(
binaryMapPrimitivesProvider));
mapRenderer.setRasterLayerProvider(RasterMapLayerId.BaseLayer, binaryMapRasterBitmapTileProvider);
mapRenderer.setRasterLayerProvider(RasterMapLayerId.BaseLayer, binaryMapRasterLayerProvider);
// BinaryMapStaticSymbolsProvider binaryMapStaticSymbolsProvider = notGc(new BinaryMapStaticSymbolsProvider(
// binaryMapPrimitivesProvider, rasterTileSize));
// mapRenderer.addSymbolProvider(binaryMapStaticSymbolsProvider);
} else {
OnlineRasterMapTileProvider onlineMapRasterBitmapTileProvider = notGc(OnlineTileSources.getBuiltIn()
OnlineRasterMapLayerProvider onlineMapRasterLayerProvider = notGc(OnlineTileSources.getBuiltIn()
.createProviderFor("Mapnik (OsmAnd)"));
mapRenderer.setRasterLayerProvider(RasterMapLayerId.BaseLayer, onlineMapRasterBitmapTileProvider);
mapRenderer.setRasterLayerProvider(RasterMapLayerId.BaseLayer, onlineMapRasterLayerProvider);
}
}