I’m building a React-Native social media app with a feature that allows you to find other users who are nearby. I know React Native has location services capabilities, but I’m not sure how I would implement this type of background location tracking. Anyone know?
I hope you have built something like this by now, but still, I will try to help you out here.
Get user's current location and store it in ES/MongoDB. You will do this for all other users as well. So, now you have a data source containing all users' current locations.
Now do a query to ES/MongoDB to get users with their current locations in X miles radius of your current user's location.
Voila you have this feature ready.
PS: To get user's current location you can use the react-native-location package.
You can solve the problem through the library officially supported by React-native.
react-native-background-geolocation
Links you can refer to for troubleshooting
Related
I'm building a React app and I would like to use Maps. Google Maps and other Maps APIs have a charge and this project will be free for the community (just like an NGO) so no budget at all.
In this app there is a page to create an Event, so you can type many things and where the Event will happen, and that is where I would like to use Maps, to search and show the location.
I thought that if is there any possibility to use a search box connected to an API just to get the Longitude and Latitude based on the search would be great, but I have no idea how to make it and I was expecting that you could help me find a way. (the thing is: get the information for free)
Just as I create this event, I would like to show this information on the Event page, so where the event will happen. And that would be the second part that I would like to use Maps. Do you know if I just show the location in Maps if I would be charged? If so, then I can use redirection to Google Maps using the Latitude and Longitude that I got from the event creation.
Thanks in advance!
See https://www.google.com/nonprofits/offerings/google-earth-and-maps/ for non-profit organizations.
I am in the process of creating and publishing a map in Google My Maps, to show locations of various groups of businesses. The published map includes an option under the Share link to grab the embed code so as to publish the map elsewhere. I view the content of my map as having a value, and don't want others to be able to publish it. Can I disable the Embed option in the Share menu? Searching Google help has not helped.
I dont believe you can prevent users from downloading or sharing your google my maps. If you need to embed it, you will need to share it first. Once you share it, its accessible by anyone. Once its accessible, there is no way to prevent people from downloading, embedding or further sharing your data.
You can restrict whom you share it with but i guess you already know that and it is not what you want.
I am myself extremely interested in knowing if there is a solution/workaround to this
has anyone worked with react and sharepoint, please tell me, if there any reference for creating a react app and deploy in sharepoint online directly, many of the references are creating react app as web part, but I cant find what I looking for. please help
It actually depends on where you want your application to show up in the SharePoint.
In addition to the WebParts, there is AppCustomizer option that allows you to show your app in one dedicated the placeholder of the sharepoint site (top or bottom):
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/using-page-placeholder-with-extensions
Other that, there is "single page part" option that allows you app to occupy all the space on the page, and to be the only thing the user gets basically:
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/single-part-app-pages?tabs=pnpposh
I have an idea of building a travel/security mobile app connected with website, and besides other functionalities i should be able to find my phone on a map... similar to apple's iCloud web. Is that possible in Reactjs?
Yes. that is possible. There are many packages which gives the exact location of user.ex:- react-geolocated. Every time when the users location is updated make an api call to save in the db. and show the similar changes in other side (who is tracking the location).
I am working on a hybrid mobile app using ionic. I have developed all feature of app but One of the features I need is offline google map. I want to get lattitude and longitude of user when there was no internet and after reaching in interent zone it threw data using web API.
Is there a way how to do it? I want it for Android and Ios both.
If your issue is only getting the user location, that can be done with no need for internet. Instead, you can use GPS to get the location, and that can be specified by some options when you are getting the location, depending on what library you are using.