Merge pull request #1002 from dbrant/maps_wmf

Use Wikimedia Maps server instead of Mapbox.
This commit is contained in:
neslihanturan 2017-12-15 14:25:18 +03:00 committed by GitHub
commit e403c159aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 6 deletions

View file

@ -0,0 +1,26 @@
{
"version": 8,
"sources": {
"wikimedia-osm": {
"type": "raster",
"tiles": [
"https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png"
],
"tileSize": 128
}
},
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "#606060"
}
},
{
"id": "osm",
"type": "raster",
"source": "wikimedia-osm"
}
]
}

View file

@ -3,7 +3,6 @@ package fr.free.nrw.commons.nearby;
import android.graphics.Color; import android.graphics.Color;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -99,11 +98,8 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
addCurrentLocationMarker(mapboxMap); addCurrentLocationMarker(mapboxMap);
}); });
if (PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean("theme",false)) {
mapView.setStyleUrl(getResources().getString(R.string.map_theme_dark)); mapView.setStyleUrl("asset://mapstyle.json");
} else {
mapView.setStyleUrl(getResources().getString(R.string.map_theme_light));
}
} }
/** /**