Update MapVectorLayer.java

This commit is contained in:
vshcherb 2015-02-10 17:53:23 +01:00
parent 198a29a7f8
commit 05b640b0f5

View file

@ -106,9 +106,10 @@ public class MapVectorLayer extends BaseMapLayer {
cachedUnderlay = st.MAP_UNDERLAY.get();
ITileSource tileSource = st.getTileSourceByName(cachedUnderlay, false);
if (tileSource != null) {
TileSourceProxyProvider prov = new TileSourceProxyProvider(view.getApplication(), tileSource);
mapRenderer.setMapLayerProvider(-1, prov.instantiateProxy(true));
prov.swigReleaseOwnership();
// TileSourceProxyProvider prov = new TileSourceProxyProvider(view.getApplication(), tileSource);
// mapRenderer.setMapLayerProvider(-1, prov.instantiateProxy(true));
// prov.swigReleaseOwnership();
mapView.setMapLayerProvider(-1, net.osmand.core.jni.OnlineTileSources.getBuiltIn().createProviderFor("Mapnik (OsmAnd)"));
} else {
mapRenderer.resetMapLayerProvider(-1);
}
@ -123,9 +124,10 @@ public class MapVectorLayer extends BaseMapLayer {
cachedOverlay = st.MAP_OVERLAY.get();
ITileSource tileSource = st.getTileSourceByName(cachedOverlay, false);
if (tileSource != null) {
TileSourceProxyProvider prov = new TileSourceProxyProvider(view.getApplication(), tileSource);
mapRenderer.setMapLayerProvider(1, prov.instantiateProxy(true));
prov.swigReleaseOwnership();
//TileSourceProxyProvider prov = new TileSourceProxyProvider(view.getApplication(), tileSource);
//mapRenderer.setMapLayerProvider(1, prov.instantiateProxy(true));
//prov.swigReleaseOwnership();
mapView.setMapLayerProvider(1, net.osmand.core.jni.OnlineTileSources.getBuiltIn().createProviderFor("Mapnik (OsmAnd)"));
} else {
mapRenderer.resetMapLayerProvider(1);
}