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

Commit

Permalink
added mapbox token init to PlaceSelectionPluginActivity (#1351)
Browse files Browse the repository at this point in the history
  • Loading branch information
Langston Smith authored May 18, 2020
1 parent 1beb472 commit 6b7104f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import com.mapbox.api.geocoding.v5.models.CarmenFeature;
import com.mapbox.mapboxandroiddemo.R;
import com.mapbox.mapboxsdk.Mapbox;
import com.mapbox.mapboxsdk.camera.CameraPosition;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.plugins.places.picker.PlacePicker;
Expand All @@ -27,7 +28,14 @@ public class PlaceSelectionPluginActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// Mapbox access token is configured here. This needs to be called either in your application
// object or in the same activity which contains the mapview.
Mapbox.getInstance(this, getString(R.string.access_token));

// This contains the MapView in XML and needs to be called after the access token is configured.
setContentView(R.layout.activity_place_selection);

selectedLocationTextView = findViewById(R.id.selected_location_info_textview);
goToPickerActivity();
}
Expand Down

0 comments on commit 6b7104f

Please sign in to comment.