Skip to content

Commit

Permalink
Mapbox (Mapzen): use OkHttp engine #57
Browse files Browse the repository at this point in the history
  • Loading branch information
devemux86 committed Feb 11, 2017
1 parent 817bd13 commit 0180c40
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions vtm-android-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -20,6 +20,7 @@
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;

Expand All @@ -31,6 +32,7 @@ public void onCreate(Bundle savedInstanceState) {

UrlTileSource tileSource = MapboxTileSource.builder()
.apiKey("mapzen-xxxxxxx") // Put a proper API key
.httpFactory(new OkHttpEngine.OkHttpFactory())
//.locale("en")
.build();

Expand Down
4 changes: 3 additions & 1 deletion vtm-playground/src/org/oscim/test/MapboxTest.java
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -19,6 +19,7 @@
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;

Expand All @@ -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();

Expand Down

0 comments on commit 0180c40

Please sign in to comment.