Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Oct 15, 2018
1 parent 27c9d9b commit fc0d84c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/mapbox.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ export class Mapbox extends MapboxCommon implements MapboxApi {
return new Promise((resolve, reject) => {
try {
let theMap: MGLMapView = nativeMap || _mapbox.mapView;
const loc = theMap.userLocation;
const loc: MGLUserLocation = theMap.userLocation;
if (loc === null) {
reject("Location not available");
} else {
Expand All @@ -428,7 +428,7 @@ export class Mapbox extends MapboxCommon implements MapboxApi {
lat: loc.coordinate.latitude,
lng: loc.coordinate.longitude
},
speed: loc.location.speed
speed: loc.location ? loc.location.speed : 0
});
}
} catch (ex) {
Expand Down
1 change: 0 additions & 1 deletion src/platforms/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<!-- you can remove these if you don't want to show the user's location on a Mapbox map -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

Expand Down

0 comments on commit fc0d84c

Please sign in to comment.