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).
*
@@ -32,6 +32,7 @@ import org.oscim.theme.styles.LineStyle;
import org.oscim.theme.styles.LineStyle.LineBuilder;
import org.oscim.theme.styles.RenderStyle;
import org.oscim.tiling.TileSource;
import org.oscim.tiling.source.OkHttpEngine;
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -71,7 +72,9 @@ public class RuleVisitorTest extends GdxMapImpl {
public void createLayers() {
MapRenderer.setBackgroundColor(0xf0f0f0);
TileSource ts = new OSciMap4TileSource();
TileSource ts = OSciMap4TileSource.builder()
.httpFactory(new OkHttpEngine.OkHttpFactory())
.build();
VectorTileLayer l = mMap.setBaseMap(ts);
mMap.setTheme(VtmThemes.DEFAULT);