Google api to fetch the location history of a user

家住魔仙堡 提交于 2020-01-01 09:33:10

问题


I am looking for a google api to fetch the user location history, I know google is storing users location history and we are able to track it from -

https://maps.google.com/locationhistory/b/0

But is google providing an api through which we can access this user history through an app, I think google latitude used to that only but I am not sure and any ways it is shut down.


回答1:


As far as I'm aware there is no API that achieves what you're after. I don't even think the latitude API provided tracking for other users.

Logically it could be a bit of an invasion of privacy if it did exist. Most people don't read the T&C's or permissions when they install an app and it would be fairly easy to use this for the wrong purposes.




回答2:


Although there is no API ready for use one can build together a script based on Curl that sets the right cookies and retrieves the content like described by Terence Eden [LINK].

Another way - although not well suited for an app - is to create an archive of your Google account information (select only location history information to keep it small) and therewith getting a Json-file with all location information.




回答3:


I have found this in the GOOGLEMAP website. there are other Class too Like Polygon. I didn't tried this but Hopefully it will work.

// Instantiates a new Polyline object and adds points to define a rectangle enter code here PolylineOptions rectOptions = new PolylineOptions() .add(new LatLng(37.35, -122.0)) .add(new LatLng(37.45, -122.0)) // North of the previous point, but at the same longitude .add(new LatLng(37.45, -122.2)) // Same latitude, and 30km to the west .add(new LatLng(37.35, -122.2)) // Same longitude, and 16km to the south .add(new LatLng(37.35, -122.0)); // Closes the polyline.

// Get back the mutable Polylineenter code here Polyline polyline = myMap.addPolyline(rectOptions); enter code here



来源:https://stackoverflow.com/questions/20678204/google-api-to-fetch-the-location-history-of-a-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!