ahushh / react-native-simple-maps

Heat map library for React Native and Expo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Examples

jedashford opened this issue · comments

Do you have any examples on basic usage?

@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.

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.

@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

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

Is there a stable working version with RN?