Skip to content
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

Examples #1

Open
jedashford opened this issue Jan 10, 2020 · 5 comments
Open

Examples #1

jedashford opened this issue Jan 10, 2020 · 5 comments

Comments

@jedashford
Copy link

Do you have any examples on basic usage?

@ahushh
Copy link
Owner

ahushh commented Jan 14, 2020

@jedashford
I've added an example of RN component https://github.com/ahushh/react-native-simple-maps/blob/master/examples/react-native.jsx

ZoomableMap, Geographies, Geography, Marker, Markers should be working components, probably ComposableMap too. The rest features of react-simple-maps will hardly work because the main thing that has been done is DOM deleted and replaced with RN elements if possible. I know I should have been deleted those broken files and junk, but I was not sure if I need them finally.
ZoomableMap works in non-zoomable mode too, just pass disabled={false} to props. At least if zoom is disabled the map looks great and all touch events are handled. But scroll and zoom were my headache.
As long as I remember there are issues with one touch event and 2 finger scroll/zoom be enabled at the same time. You can look at my attempts to fix: https://github.com/ahushh/react-native-svg-pan-zoom I tried multiple solution but none of them was good enough.

Thank you for interesting in this project and sorry that it's too messy. I'll be glad if you find my code any useful and would be appreciate if you help to develop this project. I have no enough time to make this project usable due to my primary work, but it sadly seemed to be the only public solution for displaying SVG map with topojson on React Native.

@jedashford
Copy link
Author

Awesome work, I'll give it a shot in a couple days. Our app lets people watch our TV show all over the world and we want to show users where others are watching on a simple map. This looks like it should work.

@ahushh
Copy link
Owner

ahushh commented Jan 21, 2020

@jedashford I've tested my example and found out that it didn't work with the actual versions of React Native and Expo. So I fixed it and tested on bare expo@36 project. Just update the library: npm i react-native-simple-maps@1
That's how example looks
image

@makoy21
Copy link

makoy21 commented Apr 13, 2020

I try running the sample code and use the world map json
RN-simple-map
I'm not getting the world map

@sorokin-as
Copy link

Is there a stable working version with RN?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants