geolocation

Get users current time in php with their lat/long/city

你。 提交于 2019-12-24 14:13:33
问题 I'm using http://ipinfodb.com/ api in order to get users lat/long... I have users timezone in the format of an array. The array returns the following information... array(11) { ["statusCode"]=> string(2) "OK"... ["countryCode"]=> string(2) "CA" ["countryName"]=> string(6) "CANADA" ["regionName"]=> string(16) "BRITISH COLUMBIA" ["cityName"]=> string(8) "VANCOUVER" .... ["timeZone"]=> string(6) "-07:00" } With the information from the array, how would i find the users current time when i have

Phonegap background geolocation plugin not found

巧了我就是萌 提交于 2019-12-24 13:43:14
问题 I am looking for a solution to my problem and I've been searching in the repo issues, stackoverflow and more, without finding a solution : I installed the background geolocation plugin og phonegap as it is explained here : https://github.com/christocracy/cordova-plugin-background-geolocation. When deviceready event is received, I try to execute your code example in it but I encountered a few problems : first, window.navigator.geolocation was not found, I had to replace it by navigator

Location Button doesn't work GoogleMaps v2

此生再无相见时 提交于 2019-12-24 13:02:57
问题 I'm trying to get my current location with the location button on Google Maps but I have some problems. With the new runtime permissions (API level 23), I don't know if i am doing well or not. With that code below, when I use a virtual device API 23, the location button doesn't appear and with a virtual device API 22, it appears but don't do anything. So what can be the problem ? public class MapsActivity extends FragmentActivity implements OnMapReadyCallback{ private GoogleMap mMap;

Location Button doesn't work GoogleMaps v2

倾然丶 夕夏残阳落幕 提交于 2019-12-24 12:55:10
问题 I'm trying to get my current location with the location button on Google Maps but I have some problems. With the new runtime permissions (API level 23), I don't know if i am doing well or not. With that code below, when I use a virtual device API 23, the location button doesn't appear and with a virtual device API 22, it appears but don't do anything. So what can be the problem ? public class MapsActivity extends FragmentActivity implements OnMapReadyCallback{ private GoogleMap mMap;

FusedLocationProviderClient With Service Android Kotlin

﹥>﹥吖頭↗ 提交于 2019-12-24 12:05:09
问题 I am using Fused Api for location update. I am using Fused Api with Activity is working fine. But when i use it within service class its showing This is my Service class code . Where error occurring 回答1: Class Task (https://developers.google.com/android/reference/com/google/android/gms/tasks/Task) have three overloads of method addOnCompleteListener : addOnCompleteListener(OnCompleteListener<TResult> listener) addOnCompleteListener(Activity activity, OnCompleteListener<TResult> listener)

How to render geojson with three.js and d3.js

瘦欲@ 提交于 2019-12-24 12:02:49
问题 I use three.js r49, d3.v2.js and d3-threeD.js i want to render my city(Mashhad) with three.js but i got a problem i can render europian countries with these codes but i cant render with existing json file. d3.js Ref d3-threeD.js Ref these are my codes: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>GEO Bar</title> <link rel="stylesheet" href=""> <script type="text/javascript" src="./scripts/jquery-1.7.2.js"></script> <script

Android: Getting Latitude and Longitude

强颜欢笑 提交于 2019-12-24 10:57:12
问题 Is it possible to get the Lat & Lng without going outdoor? My current situation is that user would have to be outdoor in order to get their location , in which also takes quite a long time for them to get one. I want my user to be able to get their location indoor. 回答1: Yes it is possible , take hint from following code: try { gps_enabled = locManager.isProviderEnabled(LocationManager.GPS_PROVIDER); } catch (Exception ex) { } try { network_enabled = locManager.isProviderEnabled

Android get location is null after phone reboot

空扰寡人 提交于 2019-12-24 10:49:11
问题 In my app im getting the phone's location via this function, but when I restart the phone and start the app I get null from this method. Is there something that im missing or doing wrong? What should I do to fix this issue? Here is the function im using: public void getAddress() { Log.v("--", "get address 1"); boolean isGPSProviderEnabled = locationManager .isProviderEnabled(LocationManager.GPS_PROVIDER); boolean network_enabled = locationManager .isProviderEnabled(LocationManager.NETWORK

How to get all the cities for a country in iPhone App

心不动则不痛 提交于 2019-12-24 10:46:39
问题 In my iPhone app I am using Google API. One thing I have to do is I have a drop down of countries and when I select any country, i need to fetch all the cities of that country. Is it possible with Google API or I have to use any other. Please suggest! Thanks- 回答1: The google Geocoder API returns JSON , It is just a kind of a web service which uses GET method And This is the Google Gecoder API and This is the link for that web service and in this link i have given the region name as london.

getCurrentLocationInBackground Parse.com

耗尽温柔 提交于 2019-12-24 10:43:08
问题 I'm trying to develop application that uses GPS locations for services. Each service should has a location (GeoPoint). I'm trying to get my current location and save it to parse database. I tried to use getCurrentLocationInBackground but unfortunately there is not guide on how to use this. I used the below code but unfortunately it't not working. Please help! void getLocation() { // ParseGeoPoint location = null; Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_LOW);