How does Twitter get geolocation data?

I was wondering if anyone knows how Twitter (or facebook) gets geolocation data such as various streets and possible buildings. It seems like Twitter is getting it from Google, but does anyone know any resources on how to install this?

Thanks! Matt Muller

+4
source share
2 answers

Google does not deal with all places as it seems. At least this does not work with Curacao. I am working on a more stable solution. See my open question for more details . If you just want google, you can use this.

Enable

<script type="text/javascript" src="http://www.google.com/jsapi"></script> 

Js

 if(google.loader.ClientLocation) { latitude = (google.loader.ClientLocation.latitude); longitude = (google.loader.ClientLocation.longitude); } 
+2
source

It does this through the HTML5 Geolocation API , which is now supported by most modern browsers. Of course, it is for the implementation of the browser that the interface must decide how to determine the location. A cell phone will be very different from a desktop machine, etc. For example, Firefox uses the Google web service to do this based on IP, while Mobile Safari will use Core Location.

A quick Google search will contain a lot of information on how to discover and take advantage of opportunities.

+1
source

Source: https://habr.com/ru/post/1332429/


All Articles