I was trying to work on creating a shared map for all users by using the Google Maps API. I would like User A to be able to see User B on the map, assuming User B is sharing his location. How can this be accomplished using Google Maps API on Android or iOS? This would basically resemble the Uber application where the costumers can see the drivers on the map.
As far as I know this functionality isn't really available through the API. What you could do is check if the user's location is available for sharing. Then using your own backend, most likely a MBaaS, share the location data with people they allowed access to their location. Then you could just draw a marker on the map representing the user
Related
I want to open the default google maps application from my application, let the user pin a location, and get the pinned location details back to my application.
somekind of startActivityForResult(), where the result data would be a latitude,longitude or anything like that.
is there a way to do this? is it possible?
PS: I already know/worked with the maps sdk, but in this application this is the only use case with maps, that's why i can't afford using the sdk.
No, you can't do that with the Google Maps app. Here's a PlacePicker library that accomplishes this task though:
https://github.com/suchoX/PlacePicker
I want to build an application where the user can see his current location, and all the users logged in to the app as well.
I want to build it for Android and IOS.
Can I use Apple Maps on IOS and Google Maps API on Android?
Will the application be able to show the current logged in users location on both IOS and Android with no problems? even though am using Apple maps on IOS and Google Maps API on Android?
To be more clear: the android user can also see the IOS users on the map and Vice-Versa
Or I have to use Google Maps API on IOS as well?
Its possible. Just you need to save the lat long on your server of every logged in user. And while any client i.e. Android or iOS app login the app you can have an endpoint that returns the location of all logged in users in server. For server component, you need to develop one endpoint to save the lat long and one endpoint to fetch all the lat long's saved on server.
Of course can. iOS and Android native components will return you same location (as much as possible apart) in spherical coordinate system, then you can do with this location what do you want.
Yes you can. The information is sent by the clients, on the server side you can manage/handle that information as you want/need ;)
I am a dummy in android app development. I have developed an app that when a button is clicked, the google maps application opens. I want to get the name of the location that has been selected in the google maps application and use it in my own application. Is it possible to do so? Plus, can it be done without integrating google maps or google places API in the application?
You want to use the "Start activity for result" construct. With that, and some data in an intent, you can request a location like that from Google Maps.
I would also recommend allowing a person to share a location from Maps to your app. Depending on what your app would be doing with the data.
You can get location name from the point you clicked on a map.
You can do it using the device to query into the Google Map Api or you can write a rest service where you pass in your location and the service hand you back the location name.
I´m making an app that requires the locations of all users that are signed into it and displaying all of their locations to each other on a map.
What tool can you recommend me for the job?
You can use google maps api for android (here), and have your app ask for device's current location when user signed on, then post the geo location to a server, finally display the available info using maps marker.
For creating such an app you need to have a PHP server that would first store the geocoordinates of all the users who are currently signed in in a MySQL database. Once you have that part of information you have to convert that database data into JSON object and create your own API/URL which can be requested via an Android client using HTTP. This would populate the maps of all your users with markers displaying their current location.
For implementation details please take a look at the following tutorial.
Android has with version (4+ ?) introduced offline maps where I can on the handset select an area to cache and then Google Maps downloads that map data on the handset.
As I got a comment: I want to use the data, that is already on my device (if the user has done the downloading for offline maps use before). And not open a new data connection to Google's servers (e.g. because data charges would apply).
Can I use that map data from within my app - e.g. by sending the maps app an intent do show an area (perhaps with overlays)?
Or use even the map widget inside my app?
I am not talking about downloading some tiles from the Google servers into my app
Can I use that map data from within my app - e.g. by sending the maps app an intent do show an area (perhaps with overlays)?
Well, you can invoke a map application using ACTION_VIEW and a geo: Intent. Whether that will view some cached area depends on what map app the user uses and whether or not the user cached the area around your specified latitude and longitude.
Or use even the map widget inside my app?
While you can integrate a MapView in your app, it will not use this cached data. Partially, that is because the MapView code predates any of this caching stuff. Partially, that is because the cached data is owned by another process (the Maps app) and therefore is inaccessible to you.