hi guys im using the fused location provider to get the location of users and then i display a marker on their location . the problem is that the marker keeps moving even if my phone is not moving . the accuracy is set to HIGH_ACCURACY .
Related
I want to get the distance that the device moved between the start location and the end location. I'm getting the speed and the time user spent on the journey using GPSManager and GPSCallback.
Is there any way to get the accurate distance between start and end locations?
Here user doesn't know what the end location is. It is the location where the user stops the journey.
If you have latitude and longitude values of both start and end locations (I assume you have got), this answer which I have used before works well.
I was making a health based android app where when user presses a button, google maps get displayed on the screen along with locations of all hospitals within a kilometer radius marked.
I have used google places API to return JSON data of all hospitals within 1km but I don't know how to implement this.
Please do help me out.
It sounds like what you want to do is put markers on the map to represent the location of each hospital. You do this like so:
mMap.addMarker(new MarkerOptions()
.title(placeName)
.position(new LatLng(lat, lng));
Here, mMap is the Google Map and placeName, lat andlng` are the hospital details you've extracted from the JSON returned from the Places API.
More detail available in the online docs.
Im currently working with google maps on my android app and i need to compare distances when the camera is moved. I can get the current camera latitude and longitude by using the onCameraChange method, however, im struggling with getting the cameras previous latitude and longitude. Any suggestions would be great.
I do not see an existing API to get previous location with Google Maps Camera position api
You can create a prevLat, and prevLong variables. The first time your app starts, in initialization, save the location in these variables. Use these to calculate the distance in onCameraChange, and then update the prevLat, prevLang with current location at the end of onCameraChange.
I'm making a new private android app to take a picture, get your current location in WGS84, and at last send it all in an e-mail to your self.
I have send the mail with the content from the textfields, but I have made a button to get the your current location, but didn't know how to get your location and in same way also convert it to WGS84. I need to get it in this coordinatesystem, because it is used in a special sparetime activity, which uses this coordinatesystem.
Just forget the picture, the coordinate is more important.
Thanks in advance
Greetings Aksel
I'm not 100% sure if I got your question right. But you want to convert the location you get into WGS84 coordinatesm right? I'll guess you get your position via the Android LocationManager using something like: LocationManager.getLastPosition(). What you get is a Location . This location can be formated in different ways.
The questions is what exactly do you want? WGS84 is a reference system and does not say anything about the way coordinates are represented. A common representation are sphereical coordinates (also called Lat/Lon coordinates): Spherical Coordinates.
Another representation would be Cartesian coordinates. Maybe thats what you are looking for. To get cartesian coordinates you should use a 3rd party library.
Hi
how i show My Location on Google map ? i see j2me google map application that show My Location , how can i get My Location cordinate ?
thanks
A good start would be to look at Here
and to fetch current coordinates check the documents here
Note: It must be a GPS Enabled phone