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

Commit

Permalink
switched fromUrl to fromUri in SimpleChinaMapViewActivity (#1243)
Browse files Browse the repository at this point in the history
  • Loading branch information
Langston Smith authored and Kevin Li committed Oct 10, 2019
1 parent 9c85a03 commit 7728bf2
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 7728bf2

Please sign in to comment.