-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAddData.js
57 lines (53 loc) · 1.45 KB
/
AddData.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import React from 'react';
import {StyleSheet, View} from 'react-native';
import MapLibreGL from '@react-native-mapbox-gl/maps';
import {accessToken} from '../../config';
const styles = StyleSheet.create({
page: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
container: {
width: '100%',
height: '100%',
backgroundColor: 'white',
},
map: {
flex: 1,
},
});
const AddData = () => {
return (
<View style={styles.page}>
<View style={styles.container}>
<MapLibreGL.MapView
style={styles.map}
logoEnabled={false}
attributionEnabled={true}
attributionPosition={{bottom: 8, left: 8}}
styleURL={`https://api.jawg.io/styles/jawg-sunny.json?access-token=${accessToken}`}>
<MapLibreGL.Camera
defaultSettings={{
centerCoordinate: [2.3488, 48.8534],
zoomLevel: 10,
}}
/>
<MapLibreGL.ShapeSource
id="market-source"
url={'https://media.jawg.io/add-your-data/marketplaces.geojson'}>
<MapLibreGL.SymbolLayer
id="shop-icon"
style={{
iconImage: 'https://media.jawg.io/add-your-data/shop.png',
iconAnchor: 'bottom',
}}
/>
</MapLibreGL.ShapeSource>
</MapLibreGL.MapView>
</View>
</View>
);
};
export default AddData;