Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022_223_Digi Bus
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gunasekara M.A.L.M
2022_223_Digi Bus
Commits
7163a3de
Commit
7163a3de
authored
Oct 07, 2022
by
Gunasekara M.A.L.M
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create map.js
parent
af287a8c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
digibus/src/screen/map_screen/mapscreen.js
digibus/src/screen/map_screen/mapscreen.js
+58
-0
No files found.
digibus/src/screen/map_screen/mapscreen.js
0 → 100644
View file @
7163a3de
import
React
,
{
PropTypes
,
Component
,
useState
,
useEffect
,
useCallback
}
from
'
react
'
;
import
{
View
,
StyleSheet
,
Text
,
Image
}
from
'
react-native
'
;
import
{
widthPercentageToDP
as
wp
,
heightPercentageToDP
as
hp
}
from
'
react-native-responsive-screen
'
;
import
MapView
,
{
PROVIDER_GOOGLE
,
Marker
}
from
'
react-native-maps
'
;
import
pin
from
'
../../assert/images/bun_on.png
'
;
const
MapScreen
=
()
=>
{
return
(
<
View
style
=
{
style
.
main
}
>
<
View
style
=
{
style
.
holder
}
>
<
MapView
provider
=
{
PROVIDER_GOOGLE
}
style
=
{
style
.
mpView
}
region
=
{{
latitude
:
6.9040
,
longitude
:
79.9550
,
latitudeDelta
:
0.010
,
longitudeDelta
:
0.0050
,
}}
>
<
Marker
coordinate
=
{{
latitude
:
6.9040
,
longitude
:
79.9550
}}
title
=
"
this is a marker
"
description
=
"
this is a marker example
"
>
<
Image
source
=
{
require
(
'
../../assert/images/bus.png
'
)}
style
=
{{
width
:
46
,
height
:
48
}}
resizeMode
=
"
contain
"
/>
<
/Marker
>
<
/MapView
>
<
/View
>
<
/View
>
)
}
const
style
=
StyleSheet
.
create
({
main
:
{
flex
:
1
,
backgroundColor
:
'
#fff
'
},
holder
:
{
height
:
hp
(
'
100%
'
),
width
:
wp
(
'
100%
'
),
alignItems
:
'
center
'
,
},
mpView
:
{
height
:
hp
(
'
90%
'
),
width
:
wp
(
'
96%
'
),
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
,
marginTop
:
20
,
borderRadius
:
wp
(
'
5%
'
),
}
});
export
default
MapScreen
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment