I have seen it pretty often so far that for some reason the latitude or longitude values return by getLatitude() are multiplicated with 1E6 in Google-Maps-examples. What’s the reason for this? Why 1E6? What’s wrong with the raw values returned by those functions ?
Share
I think I’ve read somewhere that this is related to performance. getLatitute() returns a
doublewhich is floating-point datatype. Math on floating point datatypes is slow if the device doesn’t support floating-point operations.So by multiplying the double value with 1E6, degrees become microdegree and so the calculation can be done with integer math without loosing too much resolution.