location

Getting acces to maps place favorites

六眼飞鱼酱① 提交于 2019-12-11 03:39:25
问题 In WP8.1 the MS maps app has favorite places like Home and Work. Cortana uses them of course. Is there a public API to get access to those information and even set new places? 回答1: Not at the moment. The only thing you can "ask" Cortana right now is to fire up your app with the argument you told her. There's no way to get to her notebook, that's where all that info is stored. Not sure if I'd want third party apps getting into that info. That's what Cortana uses to give you accurate answers,

JFrame wrong location with Ubuntu (Unity ?)

淺唱寂寞╮ 提交于 2019-12-11 03:38:14
问题 It seems that there is a bug with Ubuntu (maybe only unity). The decoration of the JFrame is taken into account for getLocation() and getSize() , but not for setLocation() and setSize() . This leads to weird behaviour. For instance, if you use pack() after the frame is displayed and the dimensions changed, the frame will go down 20 pixels... To illustrate a concrete case when it becomes really annoying, I made a SSCCE. It's a JFrame with a basic JPanel. If you drag the panel, the JFrame is

getLastknownLocation() returns null value on nexus

萝らか妹 提交于 2019-12-11 03:37:43
问题 i am developing location based project where i am using the following code i am using google api 8 for the project lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this); currloc = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER); TextView t = (TextView)findViewById(R.id.textView1); try{ t.setText("Your current location is - "+currloc.getLatitude()+","+currloc.getLongitude()); }catch (Exception e) { // TODO: handle exception t.setText("cant find current location "); } this

Android GPS accuracy not even close to built in maps app

南笙酒味 提交于 2019-12-11 03:30:03
问题 I've been experimenting with the Android SDK for a few weeks now, trying to achieve an accurate location from a background service. After trying a few configurations, I currently have this on a loop: Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_FINE); criteria.setAltitudeRequired(false); criteria.setBearingRequired(true); criteria.setCostAllowed(true); criteria.setPowerRequirement(Criteria.POWER_HIGH); bestProvider = locationManager.getBestProvider(criteria, true

How to get user country without internet and gps (may be Carrier?) in iOS

萝らか妹 提交于 2019-12-11 03:17:09
问题 I want to get user country without internet connection and GPS . I tried getting user's Country using Carrier information (CTTelephonyNetworkInfo *info = [CTTelephonyNetworkInfo new]; CTCarrier *carrier = info.subscriberCellularProvider;), but this provides Carriers original location, not Active country. For example if the user has AT&T sim card and he is in France, I get U.S. Any suggestions? 回答1: You can try getting the User's TimeZone city by checking the timeZone selected on the device

How to set a JFrame location beside another JFrame?

岁酱吖の 提交于 2019-12-11 03:14:38
问题 In Java, how could I set a JFrame to automatically go beside another JFrame? So, say I have two JFrame objects, frameA and frameB , and when the program runs, it sets frameA s location to be in the middle of the screen by using: setLocationRelativeTo(null); Now what I want is to make frameB to be on the right side of frameA , so they would be right beside each other. ( frameA s right side would be touching frameB s left side) How would you do this? 回答1: This is a test class I created to

Why distance matrix api always returning the status “ZERO_RESULTS”?

心不动则不痛 提交于 2019-12-11 02:34:44
问题 I am using the distance matrix api to calculate the distance between one source and multiple destinations. The source latitude / longitude and destination latitudes / longitudes are perfect. Also the route is existing in Google maps between those points. But the api is always returning the status "ZERO_RESULTS". What is the reason for this issue and how it could be solved. The response from distance matrix api is as follows : "rows" : [ { "elements" : [ { "status" : "ZERO_RESULTS" }, {

android locationListener not working?

只谈情不闲聊 提交于 2019-12-11 02:26:43
问题 I am having trouble using the loactionListener in eclipse for android. I have been googling for a while now an I can't seem to see why this shouldn't work. The only thing I can think of is that maybe it is because my testing device has no sim. (the internet is provided via wifi). I have used this as a reference and still, nothing. Could anyone help me with this problem. here is the relevant parts of my activity: public class MainMenu extends Activity implements LocationListener{ @Override

Facebook: Is there a way of getting the current_location of users who are not my friends? Graph API or FQL

℡╲_俬逩灬. 提交于 2019-12-11 02:19:14
问题 Let's imagine I have a user ID and username. I manually open her Facebook page (namely, http://www.facebook.com/username. And there it is! The "lives in" field appears saying she lives in wherever. Nevertheless, when I try to fetch her current_location using FQL (using Python): q = 'SELECT uid, username, current_location FROM user WHERE uid=%s' % aUser I get None in the field current_location. On the other hand, I can easily retrieve the current_location from my friends (I mean, for those

Experience of Location Services on Android using GPS and Network providers

删除回忆录丶 提交于 2019-12-11 02:06:45
问题 I have written a piece of code to get a feel of what my customer (cab driver) will experience when I enable location services on his device for my cab booking application. I enabled location services using both Network and GPS providers on the same listener. LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); lm.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, // God.KM20TIME, God.KM20DISTANCE, (LocationListener) updates); lm.requestLocationUpdates