Skip to content

Done some upgrades, and published the app on Expo #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 40 additions & 28 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,74 @@
; We fork some components by platform
.*/*[.]android.js

; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/
; Ignore templates for 'react-native init'
<PROJECT_ROOT>/node_modules/react-native/local-cli/templates/.*

; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*
; Ignore RN jest
<PROJECT_ROOT>/node_modules/react-native/jest/.*

; Ignore duplicate module providers
; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root
.*/Libraries/react-native/React.js
.*/Libraries/react-native/ReactNative.js
; Ignore RNTester
<PROJECT_ROOT>/node_modules/react-native/RNTester/.*

; Additional create-react-native-app ignores
; Ignore the website subdir
<PROJECT_ROOT>/node_modules/react-native/website/.*

; Ignore duplicate module providers
.*/node_modules/fbemitter/lib/*
; Ignore the Dangerfile
<PROJECT_ROOT>/node_modules/react-native/danger/dangerfile.js

; Ignore Fbemitter
<PROJECT_ROOT>/node_modules/fbemitter/.*

; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/node_modules/react-native/\.buckd/

; Ignore misbehaving dev-dependencies
.*/node_modules/xdl/build/*
.*/node_modules/reqwest/tests/*
; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*

; Ignore missing expo-sdk dependencies (temporarily)
; https://github.com/exponent/exponent-sdk/issues/36
.*/node_modules/expo/src/*
; Ignore polyfills
<PROJECT_ROOT>/node_modules/react-native/Libraries/polyfills/.*

; Ignore react-native-fbads dependency of the expo sdk
.*/node_modules/react-native-fbads/*
; Ignore various node_modules
<PROJECT_ROOT>/node_modules/react-native-gesture-handler/.*
<PROJECT_ROOT>/node_modules/expo/.*
<PROJECT_ROOT>/node_modules/react-navigation/.*
<PROJECT_ROOT>/node_modules/xdl/.*
<PROJECT_ROOT>/node_modules/reqwest/.*
<PROJECT_ROOT>/node_modules/metro-bundler/.*

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow
flow/
node_modules/react-native/flow/
node_modules/expo/flow/

[options]
module.system=haste

emoji=true

experimental.strict_type_args=true
module.system=haste

module.file_ext=.js
module.file_ext=.jsx
module.file_ext=.json
module.file_ext=.ios.js

munge_underscores=true

module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

unsafe.enable_getters_and_setters=true

[version]
^0.40.0
^0.56.0
22 changes: 20 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
node_modules/
# See https://help.github.com/ignore-files/ for more about ignoring files.

# expo
.expo/
npm-debug.*

.idea/

generator-template-ballester.js

# dependencies
/node_modules

# misc
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
45 changes: 2 additions & 43 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,3 @@
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import App from './app/index';

import Map from './scenes/Map'

import Points from './assets/Points.json';

export default class App extends React.Component {
render() {
return (
<View
style={{
flex: 1
}}
>
<View
style={{
height: 80,
backgroundColor: "blue",
}}
>
<Text
style={{
alignSelf: 'center',
textAlign: "center",
height: 50,
marginTop: 35,
color: "white"
}}
>
Simple example for React Native Example and Clusters
</Text>
</View>
<Map
{
...{
mapPoints: Points
}
}
/>
</View>
);
}
}
export default App;
9 changes: 9 additions & 0 deletions App.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';
import App from './App';

import renderer from 'react-test-renderer';

it('renders without crashing', () => {
const rendered = renderer.create(<App />).toJSON();
expect(rendered).toBeTruthy();
});
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# React Native Cluster Map

You know the struggle?
Simple Expo app to showcase markers clustering in React Native Maps using [supercluster](https://github.com/mapbox/supercluster) js library from [MapBox](https://www.mapbox.com/).

It's a simple example of clusters for React Native.
All your points must respect the GeoJSON requirements.

It use supercluster from MapBox! That's all... :)

All of your points must respect the geojson requirements.
Open te demo App in Expo https://exp.host/@mgscreativa/reactnativemapsclusterexample

![gif for cluster](https://github.com/warka0/react-native-cluster-example/blob/master/cluster.gif)
22 changes: 21 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
{
"expo": {
"sdkVersion": "16.0.0"
"name": "React Native Maps Cluster Example",
"description": "App to showcase markers clustering in React Native Maps using supercluster library. Git repo here https://github.com/davidroman0O/react-native-cluster-example",
"slug": "reactnativemapsclusterexample",
"privacy": "public",
"sdkVersion": "23.0.0",
"orientation": "portrait",
"icon": "./app/assets/app-icons/ios-app-icon.png",
"splash": {
"image": "./app/assets/splash/splash-screen.png",
"resizeMode": "cover",
"backgroundColor": "#f1471d"
},
"ios": {
"bundleIdentifier": "com.mgscreativa.reactnativemapsclusterexample",
"icon": "./app/assets/app-icons/ios-app-icon.png"
},
"android": {
"package": "com.mgscreativa.reactnativemapsclusterexample",
"icon": "./app/assets/app-icons/android-app-icon.png",
"permissions": ["ACCESS_COARSE_LOCATION", "ACCESS_FINE_LOCATION"]
}
}
}
Loading