Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
#1940 -Adding menu item controls for compass on / off. Removing locat…
Browse files Browse the repository at this point in the history
…ion_marker assets from App as they're now only in the SDK.
  • Loading branch information
bleege committed Aug 5, 2015
1 parent 6e04804 commit c84a6fb
Show file tree
Hide file tree
Showing 14 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ public boolean onOptionsItemSelected(MenuItem item) {
case R.id.action_markers:
// Toggle markers
toggleMarkers(!mIsMarkersOn);
return true;

case R.id.action_compass:
// Toggle compass
mapView.setCompassEnabled(!mapView.isCompassEnabled());
return true;

default:
return super.onOptionsItemSelected(item);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@
android:icon="@drawable/ic_action_location_searching"
android:title="@string/action_gps"
app:showAsAction="ifRoom" />
<item android:id="@+id/action_compass"
android:icon="@drawable/ic_explore_white_24dp"
android:title="@string/action_compass"
app:showAsAction="ifRoom"/>
</menu>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<string name="app_name">Mapbox GL</string>

<string name="action_gps">Toggle GPS location</string>
<string name="action_compass">Toggle Compass</string>

<string name="action_debug">Toggle debug mode</string>

Expand Down

0 comments on commit c84a6fb

Please sign in to comment.