google-geolocation

When should I use ACCESS_COARSE_LOCATION permission?

£可爱£侵袭症+ 提交于 2019-12-02 21:01:35
I am building an Android app that will track the user's geolocation and draw their route on a map. I am using the Google Play Services location API, as described here . It is intuitive that my application requires the ACCESS_FINE_LOCATION permission, which I put in the manifest: <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> Do I also need the ACCESS_COARSE_LOCATION permission? What's the use case where I need the coarse location? Do I also need the ACCESS_COARSE_LOCATION permission? No. What's the use case where I need the coarse location? If you do not ask for

Geo location getCurrentPosition() and watchPosition() not work on insecure origins

天涯浪子 提交于 2019-12-02 14:18:34
问题 I need user's Lattitude and longitude using php. try following code. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Example of HTML5 Geolocation</title> <script type="text/javascript"> function showPosition(){ if(navigator.geolocation){ navigator.geolocation.getCurrentPosition(function(position){ var positionInfo = "Your current position is (" + "Latitude: " + position.coords.latitude + ", " + "Longitude: " + position.coords.longitude + ")"; document.getElementById(

Google geolocation using cell tower info- Curl 400 Bad request PHP

这一生的挚爱 提交于 2019-12-01 01:30:16
I'm trying to get latitude and longitude from cell tower info using Google's geolocation api . It requires a valid JSON with information like MCC, MNC, cellId, lac etc.., My PHP post request looks like this. <?php header("Access-Control-Allow-Origin: *"); $mcc = $_POST["mcc"]; $mnc = $_POST["mnc"]; $cellId = $_POST["cellId"]; $lac = $_POST["lac"]; $post_array = array( "cellId" => (int) $cellId, "locationAreaCode" => (int) $lac, "mobileCountryCode" => (int) $mcc, "mobileNetworkCode" => (int) $mnc, ); $post_data = json_encode(array('cellTowers' => array($post_array))); echo $post_data; $url =

Google geolocation using cell tower info- Curl 400 Bad request PHP

三世轮回 提交于 2019-11-30 19:52:31
问题 I'm trying to get latitude and longitude from cell tower info using Google's geolocation api. It requires a valid JSON with information like MCC, MNC, cellId, lac etc.., My PHP post request looks like this. <?php header("Access-Control-Allow-Origin: *"); $mcc = $_POST["mcc"]; $mnc = $_POST["mnc"]; $cellId = $_POST["cellId"]; $lac = $_POST["lac"]; $post_array = array( "cellId" => (int) $cellId, "locationAreaCode" => (int) $lac, "mobileCountryCode" => (int) $mcc, "mobileNetworkCode" => (int)

Chrome navigator.geolocation.getCurrentPosition() error 403

此生再无相见时 提交于 2019-11-28 08:54:21
For some reason suddenly when calling navigator.geolocation.getCurrentPosition() I get this error: Network location provider at 'https://www.googleapis.com/' : Returned error code 403. It used to work perfectly yesterday! Could there be anything with their servers?? It appears it is back up now. But before I realized it was working, I used another way to get location data as recommended by another user on reddit.com var latLong; $.getJSON("http://ipinfo.io", function(ipinfo){ console.log("Found location ["+ipinfo.loc+"] by ipinfo.io"); latLong = ipinfo.loc.split(","); }); Source: https://www

Chrome navigator.geolocation.getCurrentPosition() error 403

岁酱吖の 提交于 2019-11-27 02:30:01
问题 For some reason suddenly when calling navigator.geolocation.getCurrentPosition() I get this error: Network location provider at 'https://www.googleapis.com/' : Returned error code 403. It used to work perfectly yesterday! Could there be anything with their servers?? 回答1: It appears it is back up now. But before I realized it was working, I used another way to get location data as recommended by another user on reddit.com var latLong; $.getJSON("http://ipinfo.io", function(ipinfo){ console.log

This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console

与世无争的帅哥 提交于 2019-11-26 18:27:27
I have a latitude, and longitude : "-27.0000,133.0000" . I want produce a map base on that. I've tried go to this link https://maps.googleapis.com/maps/api/geocode/json?latlng=-27.0000,133.0000&key=****** I keep getting this error on the browser { "error_message" : "This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console: Learn more: https://code.google.com/apis/console", "results" : [], "status" : "REQUEST_DENIED" } But I think I already enable that API. I log-in to my Google Console, and double check. When I go to : https://console