latitude

NETWORK_PROVIDER not providing updated locations

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: LocationManager locationManager = (LocationManager)getApp().getSystemService(Context.LOCATION_SERVICE); //getApp() returns my Application object locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER , 1, 1, this); locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 1, 1, this); That's the code I'm using to listen. With GPS enabled, everything works fine. However, if I disable GPS and rely on network location, it gives me stale results -- in this case, from two days ago. I cannot get it to update. Calling

MySQL Great Circle Distance (Haversine formula)

匿名 (未验证) 提交于 2019-12-03 02:01:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've got a working PHP script that gets Longitude and Latitude values and then inputs them into a MySQL query. I'd like to make it solely MySQL. Here's my current PHP Code: if ($distance != "Any" && $customer_zip != "") { //get the great circle distance //get the origin zip code info $zip_sql = "SELECT * FROM zip_code WHERE zip_code = '$customer_zip'"; $result = mysql_query($zip_sql); $row = mysql_fetch_array($result); $origin_lat = $row['lat']; $origin_lon = $row['lon']; //get the range $lat_range = $distance/69.172; $lon_range = abs(

How to Get City Name by Latitude &Longitude in android?

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to city name by current location but i have latitude and longitude.how to get it? i used button click then i get double value latitude and longitude. my code in below.please help me. Thanks!! Button btnShowLocation; GPSTracker gps; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); btnShowLocation = (Button) findViewById(R.id.btnShowLocation); // show location button click event btnShowLocation.setOnClickListener(new View.OnClickListener() { @Override public

Phonegap Android Geolocation watchPosition timeout

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using Cordova 3.0.0, A Samsung Galaxy S3 4.1.2 to test. When I test the Phonegap full example for watching position : http://docs.phonegap.com/en/edge/cordova_geolocation_geolocation.md.html#geolocation.watchPosition I get one first line with coords, and then I got the error : code 3 message : Position retrieval timed out. And no other location are returned. The same code on my iphone is working. I am testing when walking, and when I was in a car, same thing. I noticed that when I use google maps on the android device, a gps icons pops

get the latitude and longitude from the xml url using ajax

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Here is my jQuery ajax :- function getlg (){ var cntry_code = 'IN' ; var reg = 'Rajkot' ; var xml ; $ . ajax ( { url : "http://services.gisgraphy.com//geocoding/geocode?address=" + reg + "&country=" + cntry_code + "" , async : false , dataType : 'xml' , success : function ( data ) { xml = data ; } }); var lat = $ ( xml ). find ( 'lat:eq(0)' ). text (); alert ( lat ); var lng = $ ( xml ). find ( 'lng:eq(0)' ). text (); alert ( lng ); } I am trying to pass in URL city name and country code and get xml file. try jsfiddle :- http:/

Get attibuteDict of a subclass Xml parsing - Swift

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I want to get attribute of a subclass of my item : <pdv id = "1000002" latitude = "4621842" longitude = "522767" cp = "01000" pop = "R" > <adresse> 16 Avenue de Marboz </adresse> <ville> BOURG-EN-BRESSE </ville> <ouverture debut = "01:00" fin = "01:00" saufjour = "" /> <services> <service> Automate CB </service> <service> Vente de gaz domestique </service> </services> <prix nom = "Gazole" id = "1" maj = "2015-05-30 11:30:17" valeur = "1206" /> <prix nom = "SP95" id = "2" maj = "2015-05-30 11:30:17" valeur = "1398" /> <prix nom =

get latitude and longitude from city name

匿名 (未验证) 提交于 2019-12-03 01:28:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In my current android application, I would like to get the geocordinates based on an entered city name, street name or zip code. How can I accomplish this? Best Regards 回答1: get geo co-ordinates via net private static JSONObject getLocationInfo(String address) { StringBuilder stringBuilder = new StringBuilder(); try { address = address.replaceAll(" ","%20"); HttpPost httppost = new HttpPost("http://maps.google.com/maps/api/geocode/json?address=" + address + "&sensor=false"); HttpClient client = new DefaultHttpClient(); HttpResponse response;

Error Domain=kCLErrorDomain Code=2 “The operation couldn’t be completed. (kCLErrorDomain error 2.)”

匿名 (未验证) 提交于 2019-12-03 01:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: import UIKit import CoreLocation class ViewController : UIViewController , CLLocationManagerDelegate { @IBOutlet var latLabel : UILabel ! @IBOutlet var longLabel : UILabel ! @IBOutlet var courseLabel : UILabel ! @IBOutlet var speedLabel : UILabel ! @IBOutlet var altLabel : UILabel ! @IBOutlet var addressLabel : UILabel ! var manager : CLLocationManager ! var userLocation : CLLocation = CLLocation () override func viewDidLoad () { super . viewDidLoad () manager = CLLocationManager () manager . delegate = self manager .

mysqli fetch array displays only the first row

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have written this code: require("config.php"); $rows = array(); $query = "SELECT accountname, bill_city, bill_code, bill_country, bill_street, latitude, longitude, setype FROM vtiger_accountbillads, vtiger_account, vtiger_geocoding WHERE accountaddressid = accountid AND accountid = crmid"; $result = mysqli_query($connection, $query); $rows_number = $result->num_rows; echo $rows_number . " "; $row = mysqli_fetch_array($result); if($result->num_rows > 0){ for($i=0; $i $row[0], "city" => $row[1], "code" => $row[2], "country" => $row[3],

CLLocationCoordinate2D to CLLocation

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: i have the following loop in my viewDidLoad: for(int i=1; i=6) { Koordinate *coord = [[Koordinate alloc] init]; coord.latitude = [[componentsArray objectAtIndex:0] floatValue]; coord.longtitude = [[componentsArray objectAtIndex:1] floatValue]; coord.magnitude = [[componentsArray objectAtIndex:2] floatValue]; coord.depth = [[componentsArray objectAtIndex:3] floatValue]; coord.title = [componentsArray objectAtIndex:4]; coord.strasse = [componentsArray objectAtIndex:5]; coord.herkunft = [componentsArray objectAtIndex:6]; coord.telefon =