Mapbox (Mapzen): use OkHttp engine #57

This commit is contained in:
Emux 2017-02-11 22:16:07 +02:00
parent 817bd13d7b
commit 0180c40855
3 changed files with 7 additions and 2 deletions

View File

@ -3,6 +3,7 @@ apply plugin: 'com.android.application'
dependencies {
compile project(':vtm-android')
compile project(':vtm-extras')
compile project(':vtm-http')
compile project(':vtm-jeo')
compile project(':vtm-jts')
compile project(':vtm-themes')

View File

@ -1,5 +1,5 @@
/*
* Copyright 2016 devemux86
* Copyright 2016-2017 devemux86
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
@ -20,6 +20,7 @@ import org.oscim.layers.tile.buildings.BuildingLayer;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
import org.oscim.theme.VtmThemes;
import org.oscim.tiling.source.OkHttpEngine;
import org.oscim.tiling.source.UrlTileSource;
import org.oscim.tiling.source.mvt.MapboxTileSource;
@ -31,6 +32,7 @@ public class MapboxMapActivity extends MapActivity {
UrlTileSource tileSource = MapboxTileSource.builder()
.apiKey("mapzen-xxxxxxx") // Put a proper API key
.httpFactory(new OkHttpEngine.OkHttpFactory())
//.locale("en")
.build();

View File

@ -1,5 +1,5 @@
/*
* Copyright 2016 devemux86
* Copyright 2016-2017 devemux86
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
@ -19,6 +19,7 @@ import org.oscim.layers.tile.buildings.BuildingLayer;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
import org.oscim.theme.VtmThemes;
import org.oscim.tiling.source.OkHttpEngine;
import org.oscim.tiling.source.UrlTileSource;
import org.oscim.tiling.source.mvt.MapboxTileSource;
@ -28,6 +29,7 @@ public class MapboxTest extends GdxMapApp {
public void createLayers() {
UrlTileSource tileSource = MapboxTileSource.builder()
.apiKey("mapzen-xxxxxxx") // Put a proper API key
.httpFactory(new OkHttpEngine.OkHttpFactory())
//.locale("en")
.build();