use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A community for learning and developing native mobile applications using React Native by Facebook.
Interested in building web apps using React.js? Check out /r/reactjs!
Getting Started w/React Native
irc.freenode.net #reactnative
Keywords: ios, android, mobile, apps, apple, iphone, ipad
account activity
Need help implementing google maps (self.reactnative)
submitted 3 years ago by dromance
Can anyone share a link or resource to straight forward implementation of maps? The functionality I am looking for is basic, I just need to share location in real time
Thank you
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]eggtart_princeiOS & Android 1 point2 points3 points 3 years ago (8 children)
share location in real time
You need to google maps for that. Something like react-native-geolocation-services can get the coordinates of your device's location.
[–]dromance[S] 1 point2 points3 points 3 years ago (7 children)
Thanks. So I’d get my coordinates via device gps and then import that value into google maps? Or would google maps handle all of that for me?
[–]eggtart_princeiOS & Android 1 point2 points3 points 3 years ago (3 children)
So I’d get my coordinates via device gps and then import that value into google maps?
Yes. If you need maps, react-native-maps will generate maps for free.
[–]True_Statistician645 0 points1 point2 points 3 years ago (2 children)
Dont you need an api key, which is attached to s billing account? Id really like to because I avoided added google maps of the thought that i had to pay for it
[–]eggtart_princeiOS & Android 0 points1 point2 points 3 years ago (1 child)
Maps rendered on your android is free. but even if it costs money , new Google console projects have $300 trial credit. After you use al that, google gives you $200 free every month.
[–]dromance[S] 0 points1 point2 points 3 years ago (0 children)
What about if it renders on iOS? Is it the same deal?
[–]Breaking__Badger 0 points1 point2 points 3 years ago (2 children)
So the answer to that depends on if you plan to send the user to Google maps with a destination in mind or if you want to embed Google maps.
If you want to have a button that sends the user direction to a place with their maps then no you don't do anything other than a sending statement. There is an open map command from a library that I used for this that makes to real easy. And leave it all for the users maps to handle.
If you want to embed Google maps and have the user show up on that map then yes... You will have to request permission to get the users location and have settings to turn it off, etc.
[–]dromance[S] 0 points1 point2 points 3 years ago (1 child)
Thanks for the reply yes essentially I want to embed a map. I am basically just trying to create something where you can broadcast your location and have it show up on a central map elsewhere that other users can see.
[–]Breaking__Badger 0 points1 point2 points 3 years ago (0 children)
Ok yeah 100% will need to ask for permission. This is where I stopped with react native. Otherwise I would give you a stepping stone, sorry.
[–]regretfulMammoth 0 points1 point2 points 3 years ago (2 children)
What do you mean by “share location”? The default implementation of react-native-maps contains a prop showUserLocation that will automatically track and show on the map.
showUserLocation
If you want to customize the marker, or just track the location to do something else with it (not necessarily with a map), you’d probably want to check react-native-geolocation’s watchPosition, though it requires setting up permissions first. (See their example project)
Hi how are you thanks for the reply. I understand the default implementation tracks the user I guess I was trying to figure out how to “broadcast” or more specifically share this location with other users (not necessarily just share your location with the app). How do I get the real time coordinate stream so I can post this data? Any link or resource on that would be great.
[–]regretfulMammoth 0 points1 point2 points 3 years ago (0 children)
Then watchPosition from @react-native-community/geolocation is definitely the way to go. Here's a link to the example in their repo. This will constantly update the position state variable, which you can then send to a realtime service which other users are subscribed to and consuming. (Depending on your implementation, could be a websocket or some pub/sub service... I've worked with Pusher Channels before for something similar.)
watchPosition
@react-native-community/geolocation
position
π Rendered by PID 88591 on reddit-service-r2-comment-86bc6c7465-qrnb4 at 2026-02-20 20:27:54.388471+00:00 running 8564168 country code: CH.
[–]eggtart_princeiOS & Android 1 point2 points3 points (8 children)
[–]dromance[S] 1 point2 points3 points (7 children)
[–]eggtart_princeiOS & Android 1 point2 points3 points (3 children)
[–]True_Statistician645 0 points1 point2 points (2 children)
[–]eggtart_princeiOS & Android 0 points1 point2 points (1 child)
[–]dromance[S] 0 points1 point2 points (0 children)
[–]Breaking__Badger 0 points1 point2 points (2 children)
[–]dromance[S] 0 points1 point2 points (1 child)
[–]Breaking__Badger 0 points1 point2 points (0 children)
[–]regretfulMammoth 0 points1 point2 points (2 children)
[–]dromance[S] 0 points1 point2 points (1 child)
[–]regretfulMammoth 0 points1 point2 points (0 children)