Does google offer geo location ip services like freegeoip, maxmind etc which can offer me the users exact ( need almost accurate like how gooogle offers) location, Country - State - City, Timezone,
Brower used
Mobile or PC
Google offers it as service of HTML5 in web browsers. You will need to have users permission to retrieve their geolocation information. The web browser will prompt for permission.
If you need the best accuracy for mobile users you should use the navigator geolocation API (see https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition) and enable high accuracy to get the exact GPS position.
A good practice if your app can benefit from a less accurate location instead of no location at all is to fall back to an external IP geolocation API when the user denies location access : https://db-ip.com/api/jsdoc.php#browsergeo
Related
Is W3C Geolocation API more accurate the IP geolocation for non-mobile devices? I am using https://ipstack.com/ and I am seeing big discrepancies between actual location and location identified by the service for desktop users, but after reading
https://en.wikipedia.org/wiki/W3C_Geolocation_API
GPS (Global Positioning System) This happens for any device which has GPS capabilities. A smartphone with GPS capabilities and set
to high accuracy mode will be likely to obtain the location data from
this. GPS calculate location information from the satellite signal. It
has the highest accuracy; in most Android smartphones, the accuracy
can be up to 10 metres.
Mobile Network Location Mobile phone tracking is used if a cellphone or wireless modem is used without a GPS chip built in.
Wi-Fi Positioning System If Wi-Fi is used indoors, a Wi-Fi positioning system is the likeliest source. Some Wi-Fi spots have
location services capabilities.
IP Address Location Location is detected based on nearest Public IP Address on a device (which can be a computer, the router it is
connected to, or the ISP the router uses). The location depends on the
IP information available, but in many cases where the IP is hidden
behind Internet Service Provider NAT, the accuracy is only to the
level of a city, region or even country.
It doesn't seem the W3C Geolocation API is any better for desktop users. It seems to be more precise for mobile users, but not desktop users. Is this correct?
It doesn't seem the W3C Geolocation API is any better for desktop users. It seems to be more precise for mobile users, but not desktop users. Is this correct?
This is correct, the W3C geolocation API is a good bet when
The user is using a browser (the UX for informed consent is well thought through by the browser maker, e.g Apple's Safari or the Firefox teams)
The user is on mobile (GPS hardware, WiFi triangulation, Google or Apple's-proprietary services such as Google Play Location Services being available) with the underlying OS
Fine location matters for your application (e.g ride-hailing or food delivery to your current location)
If the above criteria are generally not applicable most of the time to your application, then IP geolocation API services such as Fastah are a good choice for the country, approximate city, and geo-coordinates information.
In general, W3C Geolocation API is more accurate than IP geolocation such as IP2Location because it uses multiple parameters to determine location.
If GPS is not available in non-mobile device, they can use the WIFI MAC address or cell tower ID to determine location.
According to this, there is no easy way to tell the exact location of an IP address. So, when I visit Google Maps on my laptop from my home wifi, how does Google show me the exact location of my house ? What additional information does Google use to track me down ?
Instead of IP address geolocation, your browser might have WIFI geolocation enabled. It will pass the router MAC address to Google to find your house location. Google has a lot of Android device with GPS enabled to verify the location.
I am developing a software to remotely manage NFC tags - change their actions and track campaign performance such as:
No. of taps on individual NFC chips
date and time of taps on individual NFC chips
location of NFC chips when tapped
When the user tap the NFC, they are directed to our server which then redirect the phone's browser to the designated destination set in the campaign.
I have completed all of the above except for the location one as it gives me the inaccurate location.
At the moment, I'm using the site http://ipinfodb.com + their API to get the phone ip address and supposedly location, but it's innacurate.
Another, more accurate approach would be to "get" the phone's location via the GPS but not sure how to approach this.
Any suggestions would be much appreciated.
Probably an easier solution would be to get the data out of an analytics backend such as Google Analytics (relying on their accuracy ...)
Otherwise you need to ask the user's permission - but that needs to be done on the web site acting as the redirection target, as otherwise you would break the flow.
This website finds my location with a reasonable presicion. If i use mobilephone the website finds my exact location. If it is possible without asking permission why most of them asks me before getting my location? Isn't it makes personal security vulnerabilities?
From the same page you gave us:
Webkay uses the Google Geolocation API to locate you. This is an
educated guess and never as accurate as a GPS Location. The accuracy
depends on your location and also on your connection type. If you are
on a mobile network expect an error of up to 50km. This example just
tries to demonstrate how accurate a website can guess your location
without asking you for permission to access your GPS.
A site only needs permission, if it wants to enable your device's GPS. Also, without the permission, the guessed location is heavily dependent on your mobile carrier signal and IP address. If you are in a location with a lot of mobile towers, the location (obviously) will get more precise.
A site can use the information from all near mobile towers around you to triangulate the position and guess where you are. Think of it like a mesh.
For example: I am using a computer to write this now and the location is easy ~100km off, because it has only my IP adress to estimate the location.
Is it possible to update user's location without using the network? I'm using MapBox for my application, and i really need to know about it. It seems obvious that user can see where he is using GPS, but I am not sure yet.
you mean locally? you can get GPS location on devices and via the browser's HTML5 GeoLocation, and technically just feed that to the mapbox map via the regular javascript (assuming you have the required files accessible locally).
http://www.w3.org/TR/geolocation-API/
here's an example using google maps:
http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_geolocation_map
the location isn't 100% accurate as it guesses by IP address, WiFi signals and GPS data (if available).
you didn't specify, but if you're talking about native code, you can do the same thing with different methods on iOS.