问题
Google History JSON exporeted api return two integer for latitude and longitude, the file look like this:
{
"locations" : [ {
"timestampMs" : "1525631885005",
"latitudeE7" : 511052047,
"longitudeE7" : 207459413,
"accuracy" : 16
},
...
]
}
I have script that search through that JSON and I want to test if it find correct location, so how can I convert that numbers to values that can copy paste to google map web app to test?
回答1:
latitudeE7
and longitudeE7
are the latitude and longitude multiplied by 10e7 (10^7).
To get the latitude and longitude divide them by 10e7. That is latitude:51.1052047, longitude: 20.7459413
That would be "Bliżyn, Poland".
来源:https://stackoverflow.com/questions/50203799/how-to-convert-long-lat-integers-from-google-history-json-to-google-map-format