-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(map): Add location follow mode & zoom to location on first load
On initial load, if there is no GPS location, the map will move to the last known location that the user was at
- Loading branch information
1 parent
4aaf9b8
commit 8f7aeaf
Showing
6 changed files
with
194 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// @flow | ||
import * as React from "react"; | ||
import { StyleSheet, View } from "react-native"; | ||
import type { Style } from "../../types"; | ||
|
||
type CircleProps = { | ||
radius?: number, | ||
children: React.Node, | ||
style?: Style<typeof View> | ||
}; | ||
|
||
const Circle = ({ radius = 25, style, children }: CircleProps) => ( | ||
<View | ||
style={[ | ||
styles.circle, | ||
{ | ||
width: radius * 2, | ||
height: radius * 2, | ||
borderRadius: radius * 2 | ||
}, | ||
style | ||
]} | ||
> | ||
{children} | ||
</View> | ||
); | ||
|
||
export default Circle; | ||
|
||
const styles = StyleSheet.create({ | ||
circle: { | ||
width: 50, | ||
height: 50, | ||
backgroundColor: "white", | ||
borderRadius: 50, | ||
borderColor: "#EAEAEA", | ||
borderWidth: 1, | ||
justifyContent: "center", | ||
alignItems: "center", | ||
shadowColor: "black", | ||
shadowRadius: 5, | ||
shadowOpacity: 0.5, | ||
shadowOffset: { width: 0, height: 2 }, | ||
elevation: 3 | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters