Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Switched fromUrl to fromUri in SimpleChinaMapViewActivity #1243

Merged
merged 1 commit into from
Oct 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected void onCreate(Bundle savedInstanceState) {
@Override
public void onMapReady(@NonNull MapboxMap mapboxMap) {
SimpleChinaMapViewActivity.this.mapboxMap = mapboxMap;
mapboxMap.setStyle(new Style.Builder().fromUrl(ChinaStyle.MAPBOX_STREETS_CHINESE), new Style.OnStyleLoaded() {
mapboxMap.setStyle(new Style.Builder().fromUri(ChinaStyle.MAPBOX_STREETS_CHINESE), new Style.OnStyleLoaded() {
@Override
public void onStyleLoaded(@NonNull Style style) {

Expand All @@ -66,17 +66,17 @@ public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_streets:
if (mapboxMap != null) {
mapboxMap.setStyle(new Style.Builder().fromUrl(ChinaStyle.MAPBOX_STREETS_CHINESE));
mapboxMap.setStyle(new Style.Builder().fromUri(ChinaStyle.MAPBOX_STREETS_CHINESE));
}
return true;
case R.id.menu_dark:
if (mapboxMap != null) {
mapboxMap.setStyle(new Style.Builder().fromUrl(ChinaStyle.MAPBOX_DARK_CHINESE));
mapboxMap.setStyle(new Style.Builder().fromUri(ChinaStyle.MAPBOX_DARK_CHINESE));
}
return true;
case R.id.menu_light:
if (mapboxMap != null) {
mapboxMap.setStyle(new Style.Builder().fromUrl(ChinaStyle.MAPBOX_LIGHT_CHINESE));
mapboxMap.setStyle(new Style.Builder().fromUri(ChinaStyle.MAPBOX_LIGHT_CHINESE));
}
return true;
default:
Expand Down