-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: scaffold event map tab * feat: add zoomable map
- Loading branch information
1 parent
f718202
commit f4670d9
Showing
8 changed files
with
78 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import AppBar from '@/elements/AppBar'; | ||
import EventMap from '@/elements/map/EventMap'; | ||
import { Surface } from 'react-native-paper'; | ||
import { useTheme } from 'react-native-paper'; | ||
import { useSafeAreaInsets } from 'react-native-safe-area-context'; | ||
|
||
export default function MapScreen() { | ||
const theme = useTheme(); | ||
const insets = useSafeAreaInsets(); | ||
|
||
return ( | ||
<Surface | ||
style={{ | ||
height: '100%', | ||
backgroundColor: theme.colors.background, | ||
paddingTop: insets.top, | ||
}} | ||
> | ||
<AppBar title='map' /> | ||
<EventMap /> | ||
</Surface> | ||
); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,29 @@ | ||
import { ReactNativeZoomableView } from '@openspacelabs/react-native-zoomable-view'; | ||
import { Image, View } from 'react-native'; | ||
|
||
function EventMap() { | ||
return ( | ||
<ReactNativeZoomableView | ||
maxZoom={2.5} | ||
minZoom={0.5} | ||
zoomStep={0.5} | ||
initialZoom={1} | ||
bindToBorders={true} | ||
style={{ | ||
width: 'fit-content', | ||
}} | ||
// Image dimensions | ||
contentWidth={1024} | ||
contentHeight={576} | ||
> | ||
<View style={{ width: '100%' }}> | ||
<Image | ||
style={{ objectFit: 'contain' }} | ||
source={require('@/assets/images/summer23-aluekartta.png')} | ||
/> | ||
</View> | ||
</ReactNativeZoomableView> | ||
); | ||
} | ||
|
||
export default EventMap; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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