Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
0517356
GL PROJ
Commits
be3cc4fc
Commit
be3cc4fc
authored
Jun 24, 2021
by
Thomas
Browse files
no message
parent
d0132de5
Changes
2
Hide whitespace changes
Inline
Side-by-side
TraCloSo/assets/dataAdidas.json
0 → 100644
View file @
be3cc4fc
[{
"coordinates"
:
{
"latitude"
:
35.000074
,
"longitude"
:
104.999927
},
"title"
:
"China: 101"
},
{
"coordinates"
:
{
"latitude"
:
13.2904027
,
"longitude"
:
108.4265113
},
"title"
:
"Vietnam: 73"
},
{
"coordinates"
:
{
"latitude"
:
-2.4833826
,
"longitude"
:
117.8902853
},
"title"
:
"Indonesia: 46"
},
{
"coordinates"
:
{
"latitude"
:
39.7837304
,
"longitude"
:
-100.4458825
},
"title"
:
"United States of America: 31"
},
{
"coordinates"
:
{
"latitude"
:
22.3511148
,
"longitude"
:
78.6677428
},
"title"
:
"India: 30"
},
{
"coordinates"
:
{
"latitude"
:
-10.3333333
,
"longitude"
:
-53.2
},
"title"
:
"Brazil: 28"
},
{
"coordinates"
:
{
"latitude"
:
13.5066394
,
"longitude"
:
104.869423
},
"title"
:
"Cambodia: 22"
},
{
"coordinates"
:
{
"latitude"
:
30.3308401
,
"longitude"
:
71.247499
},
"title"
:
"Pakistan: 14"
},
{
"coordinates"
:
{
"latitude"
:
38.9597594
,
"longitude"
:
34.9249653
},
"title"
:
"Turkey: 13"
},
{
"coordinates"
:
{
"latitude"
:
12.7503486
,
"longitude"
:
122.7312101
},
"title"
:
"Philippines: 12"
},
{
"coordinates"
:
{
"latitude"
:
36.5748441
,
"longitude"
:
139.2394179
},
"title"
:
"Japan: 12"
},
{
"coordinates"
:
{
"latitude"
:
14.8971921
,
"longitude"
:
100.83273
},
"title"
:
"Thailand: 12"
},
{
"coordinates"
:
{
"latitude"
:
51.0834196
,
"longitude"
:
10.4234469
},
"title"
:
"Germany: 11"
},
{
"coordinates"
:
{
"latitude"
:
23.9739374
,
"longitude"
:
120.9820179
},
"title"
:
"Taiwan: 11"
},
{
"coordinates"
:
{
"latitude"
:
54.7023545
,
"longitude"
:
-3.2765753
},
"title"
:
"United Kingdom: 10"
},
{
"coordinates"
:
{
"latitude"
:
13.8000382
,
"longitude"
:
-88.9140683
},
"title"
:
"El Salvador: 10"
},
{
"coordinates"
:
{
"latitude"
:
42.6384261
,
"longitude"
:
12.674297
},
"title"
:
"Italy: 8"
},
{
"coordinates"
:
{
"latitude"
:
-34.9964963
,
"longitude"
:
-64.9672817
},
"title"
:
"Argentina: 7"
},
{
"coordinates"
:
{
"latitude"
:
17.1750495
,
"longitude"
:
95.9999652
},
"title"
:
"Myanmar: 6"
},
{
"coordinates"
:
{
"latitude"
:
39.3260685
,
"longitude"
:
-4.8379791
},
"title"
:
"Spain: 6"
},
{
"coordinates"
:
{
"latitude"
:
15.2572432
,
"longitude"
:
-86.0755145
},
"title"
:
"Honduras: 5"
},
{
"coordinates"
:
{
"latitude"
:
61.0666922
,
"longitude"
:
-107.991707
},
"title"
:
"Canada: 5"
},
{
"coordinates"
:
{
"latitude"
:
-28.8166236
,
"longitude"
:
24.991639
},
"title"
:
"South Africa: 4"
},
{
"coordinates"
:
{
"latitude"
:
45.8133113
,
"longitude"
:
14.4808369
},
"title"
:
"Slovenia: 3"
},
{
"coordinates"
:
{
"latitude"
:
49.4871968
,
"longitude"
:
31.2718321
},
"title"
:
"Ukraine: 3"
},
{
"coordinates"
:
{
"latitude"
:
40.0332629
,
"longitude"
:
-7.8896263
},
"title"
:
"Portugal: 3"
},
{
"coordinates"
:
{
"latitude"
:
31.1667049
,
"longitude"
:
36.941628
},
"title"
:
"Jordan: 3"
},
{
"coordinates"
:
{
"latitude"
:
50.6402809
,
"longitude"
:
4.6667145
},
"title"
:
"Belgium: 2"
},
{
"coordinates"
:
{
"latitude"
:
22.5000485
,
"longitude"
:
-100.0000375
},
"title"
:
"Mexico: 2"
},
{
"coordinates"
:
{
"latitude"
:
49.8167003
,
"longitude"
:
15.4749544
},
"title"
:
"Czech Republic: 2"
},
{
"coordinates"
:
{
"latitude"
:
45.9852129
,
"longitude"
:
24.6859225
},
"title"
:
"Romania: 2"
},
{
"coordinates"
:
{
"latitude"
:
33.8439408
,
"longitude"
:
9.400138
},
"title"
:
"Tunisia: 2"
},
{
"coordinates"
:
{
"latitude"
:
24.4768783
,
"longitude"
:
90.2932426
},
"title"
:
"Bangladesh: 2"
},
{
"coordinates"
:
{
"latitude"
:
-20.2759451
,
"longitude"
:
57.5703566
},
"title"
:
"Mauritius: 2"
},
{
"coordinates"
:
{
"latitude"
:
47.1817585
,
"longitude"
:
19.5060937
},
"title"
:
"Hungary: 2"
},
{
"coordinates"
:
{
"latitude"
:
36.638392
,
"longitude"
:
127.6961188
},
"title"
:
"Korea, Republic of (South Korea): 2"
},
{
"coordinates"
:
{
"latitude"
:
31.5313113
,
"longitude"
:
34.8667654
},
"title"
:
"Israel: 1"
},
{
"coordinates"
:
{
"latitude"
:
64.6863136
,
"longitude"
:
97.7453061
},
"title"
:
"Russia: 1"
},
{
"coordinates"
:
{
"latitude"
:
12.6090157
,
"longitude"
:
-85.2936911
},
"title"
:
"Nicaragua: 1"
},
{
"coordinates"
:
{
"latitude"
:
-18.9249604
,
"longitude"
:
46.4416422
},
"title"
:
"Madagascar: 1"
},
{
"coordinates"
:
{
"latitude"
:
38.9953683
,
"longitude"
:
21.9877132
},
"title"
:
"Greece: 1"
},
{
"coordinates"
:
{
"latitude"
:
52.215933
,
"longitude"
:
19.134422
},
"title"
:
"Poland: 1"
},
{
"coordinates"
:
{
"latitude"
:
10.2735633
,
"longitude"
:
-84.0739102
},
"title"
:
"Costa Rica: 1"
},
{
"coordinates"
:
{
"latitude"
:
-31.7613365
,
"longitude"
:
-71.3187697
},
"title"
:
"Chile: 1"
},
{
"coordinates"
:
{
"latitude"
:
47.2
,
"longitude"
:
13.2
},
"title"
:
"Austria: 1"
},
{
"coordinates"
:
{
"latitude"
:
55.3500003
,
"longitude"
:
23.7499997
},
"title"
:
"Lithuania: 1"
},
{
"coordinates"
:
{
"latitude"
:
2.8894434
,
"longitude"
:
-73.783892
},
"title"
:
"Colombia: 1"
},
{
"coordinates"
:
{
"latitude"
:
32.3293809
,
"longitude"
:
-83.1137366
},
"title"
:
"Georgia: 1"
},
{
"coordinates"
:
{
"latitude"
:
-29.6039267
,
"longitude"
:
28.3350193
},
"title"
:
"Lesotho: 1"
}]
\ No newline at end of file
TraCloSo/scr/Brand.js
View file @
be3cc4fc
...
...
@@ -12,7 +12,7 @@ import firebase from 'firebase/app';
export
default
function
BrandScreen
({
navigation
,
route
})
{
const
{
BrandName
,
Score
,
Logo
,
Summary
,
Updated
}
=
route
.
params
const
{
BrandName
,
Score
,
Logo
,
Summary
,
Updated
,
Markers
}
=
route
.
params
const
[
favorite
,
setFavorite
]
=
React
.
useState
(
false
);
const
onShare
=
async
()
=>
{
...
...
@@ -78,7 +78,7 @@ export default function BrandScreen({ navigation, route }) {
Logo
:
Logo
,
Score
:
Score
,
Summary
:
Summary
,
Updated
:
Updated
Updated
:
Updated
,
}
AsyncStorage
.
setItem
(
...
...
@@ -103,7 +103,17 @@ export default function BrandScreen({ navigation, route }) {
})
})
const
markers
=
require
(
'
../assets/dataHM.json
'
)
if
(
BrandName
==
"
Adidas
"
)
{
var
getMarker
=
require
(
'
../assets/dataAdidas.json
'
)
}
else
if
(
BrandName
==
"
H&M
"
)
{
var
getMarker
=
require
(
'
../assets/dataHM.json
'
)
}
else
if
(
BrandName
==
"
Nike
"
)
{
var
getMarker
=
require
(
'
../assets/dataAdidas.json
'
)
}
else
if
(
BrandName
==
"
C&A
"
)
{
var
getMarker
=
require
(
'
../assets/dataHM.json
'
)
}
const
markers
=
getMarker
return
(
<
SafeAreaView
style
=
{
style
.
Container
}
>
...
...
@@ -154,7 +164,7 @@ export default function BrandScreen({ navigation, route }) {
More
info
about
how
the
score
is
calculated
?
Take
a
look
at
our
information
page
<
/Text
>
{
/*facilities*/
}
<
Text
style
=
{[
style
.
header
,
{
paddingTop
:
15
}]}
>
Facilities
<
/Text
>
<
Text
>
Click
at
one
of
the
markers
to
see
how
much
factories
{
BrandName
}
has
in
that
country
<
/Text
>
<
Text
>
Click
on
one
of
the
markers
to
see
how
much
factories
{
BrandName
}
has
in
that
country
<
/Text
>
<
View
style
=
{
style
.
mapview
}
>
<
MapView
style
=
{
style
.
Map
}
initialRegion
=
{{
...
...
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