-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
34 lines (33 loc) · 1.08 KB
/
index.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
import React from 'react'
import MapboxGL from '@mapbox/react-native-mapbox-gl'
import circle from '@turf/circle'
var center = [-73.99155, 40.73581];
var radius = 0.0006;
var options = {steps: 360, units: 'degrees', properties: {foo: 'bar'}};
var _circle = circle(center, radius, options);
export default class extends React.Component {
render(){
return (
<MapboxGL.MapView
zoomLevel={16}
// onPress={this.onPress}
centerCoordinate={[-73.99155, 40.73581]}
style={{flex:1}}
>
<MapboxGL.ShapeSource
id="clusteredPoints"
shape={{
"type": "FeatureCollection",
"features": [
_circle
]
}}
>
<MapboxGL.FillLayer
id='clusteredPoints'
style={{fillOpacity:0.5}} />
</MapboxGL.ShapeSource>
</MapboxGL.MapView>
)
}
}