Question

GeoPoint point = new GeoPoint(
       (int) (userlocation.getLatitude() * 1E6),
       (int) (userlocation.getLongitude() * 1E6));

I am creating geo point like above but it's not at exact location of user it's nearly 500 to 600 meters away

Here userlocation is location I am getting from location listener

In user location I get values something like 18.453225455645 & 78.15446456546 But while plotting I can use only 18.453225 & 78.154464 i.e. -- only six digit after decimal. if I try to use extra values marker shows wrong location.(It's due to geopoint needs values in int )

How I can plot exact location on map??

Edited:-- I don't think any one has solution on this. I checked few apps & find out one app called myTaxi which has more accuracy than Google map don't know how they get that. Currently I am just rounding latitude & longitude.

Thank You

Was it helpful?

Solution

a. Just by removing the last few digit after six digits will not give you an error of 500-600 m as 5 digit after decimal places should give you precision of about 1m.

b. Are you using GPS or some other location provider? Use only GPS as Location Provider if you want accurate location. There is a catch though GPS would require a line-of-sight to work correctly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top