Samples: use OkHttp engine, fix #454

This commit is contained in:
Emux
2017-12-12 10:56:29 +02:00
parent 8d639499ba
commit 9a6da018a9
27 changed files with 164 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 devemux86
* Copyright 2016-2017 devemux86
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
*
@@ -23,6 +23,8 @@ import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
import org.oscim.theme.RenderTheme;
import org.oscim.tiling.TileSource;
import org.oscim.tiling.source.OkHttpEngine;
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
public class ThemeBuilderTest extends GdxMapImpl {
@@ -53,7 +55,10 @@ public class ThemeBuilderTest extends GdxMapImpl {
@Override
public void createLayers() {
VectorTileLayer l = mMap.setBaseMap(new OSciMap4TileSource());
TileSource tileSource = OSciMap4TileSource.builder()
.httpFactory(new OkHttpEngine.OkHttpFactory())
.build();
VectorTileLayer l = mMap.setBaseMap(tileSource);
RenderTheme t = new MyTheme().build();