gps

How to calculate distance from different markers in a map and then pick up the least one

醉酒当歌 提交于 2019-12-17 15:46:16
问题 I have to get distance from different markers on the map to the current location of the device and the pick up the shortest one. I have the lat and long for the markers and the current location lat and long can be fetched dynamically. Suppose I have 5 markers on the map, Bangalore (Lat : 12.971599, Long : 77.594563), Delhi (Lat : 28.635308, Long : 77.224960), Mumbai (Lat : 19.075984, Long : 72.877656), Chennai (Lat : 13.052414, Long : 80.250825), Kolkata (Lat : 22.572646, Long : 88.363895).

How to show our own icon in BlackBerry Map?

我的未来我决定 提交于 2019-12-17 14:52:18
问题 I want to know how to use our own logo to show the particular place in BBMap? Can anyone knows how to do this ? 回答1: BlackBerry Map It's not possible in Blackberry Map to show custom icon for POI. Things you can include in Location on Blackberry Map: The latitude of the location * 100,000. South is negative. The longitude of the location * 100,000. West is negative. The label to be displayed beside the location. The description displayed when the BlackBerry smartphone user selects details.

How to get current date and time from GPS unsegment time in python

故事扮演 提交于 2019-12-17 11:52:41
问题 I have gps unsegmented time like this: Tgps = 1092121243.0 And I'd like to understand what date and time is that. The begining of GPS time is 6 January 1980. Python function datetime.utcfromtimestamp could give seconds from 1 January 1970 year. I found following: from datetime import datetime GPSfromUTC = (datetime(1980,1,6) - datetime(1970,1,1)).total_seconds() curDate = datetime.utcfromtimestamp(Tgps + GPSfromUTC) Out[83]: datetime.datetime(2014, 8, 15, 7, 0, 43) I'm not sure about

Check WiFi and GPS isConnected or Not in Android?

我只是一个虾纸丫 提交于 2019-12-17 10:48:11
问题 I would need to check the wifi is on or off in the phone at the runtime? if it is not connected, i want to show dialog and goto directly Setting/Wireless Controls to enable it by user. its for both wifi and Gps staus of the phone. How to do it? which intent to wake for this? Any idea? 回答1: You can use the WifiManager class to get the state of Wi-Fi. See this question for opening Wi-Fi settings. And this question for GPS status. 回答2: To check if the device is connected via mobile or wifi you

Algorithm to find all Latitude Longitude locations within a certain distance from a given Lat Lng location

99封情书 提交于 2019-12-17 08:02:02
问题 Given a database of places with Latitude + Longitude locations, such as 40.8120390, -73.4889650, how would I find all locations within a given distance of a specific location? It doesn't seem very efficient to select all locations from the DB and then go through them one by one, getting the distance from the starting location to see if they are within the specified distance. Is there a good way to narrow down the initially selected locations from the DB? Once I have (or don't?) a narrowed

How to show more than one location in Blackberry MapField?

混江龙づ霸主 提交于 2019-12-17 07:41:10
问题 I can able to show one location using co ordinates or longtitude and latitude but i dont know how to show more than one location in the blackberry MapField.If is it possible pls share with me how to do this.. 回答1: Same way as How to show our own icon in BlackBerry Map?. Pass an array of Coordinates into custom MapField, define a bitmap for location point and paint it for each Coordinate in custom MapField paint() method. Remember to zoom in/out CustomMapField for best fit of all location

Android GPS incorrect location data on query

百般思念 提交于 2019-12-17 07:39:24
问题 I am not using mock locations for this... In fact the code was working fine just last week. I have an app that gathers GPS data and spits out a google maps link using X,Y coordinates generated by the application itself. I am not 100% sure why its not working the way it should be but when I request the app to make a google maps link based on the GPS location provided by the phone it tells me I am 5 - 6 blocks away from my point of origin (Where I actually am at the time) Not quite what I want

iOS: App is not asking user's permission while installing the app. getting kCLAuthorizationStatusNotDetermined every time - Objective-c & Swift

╄→尐↘猪︶ㄣ 提交于 2019-12-17 06:25:34
问题 I am trying to fetch user location in my iOS app. I have included corelocation framework in my project first. Then on a button click I am invoking the core location api as below. When I am trying to install this in a device, the core location never asks the user permission. When I try to fetch the location on button click, I am getting kCLAuthorizationStatusNotDetermined as the authorisationStatus. Please help me in this. I have no clue what is happening. - (IBAction)fetchLessAccurateLocation

Getting Latitude and longitude in 30 seconds

别说谁变了你拦得住时间么 提交于 2019-12-17 02:32:55
问题 I am trying to get location of user as longitude and latitude from GPS/network which ever is available and i want to get it fast , or else previous location coordinates will return if cannot get new one right now. Here is my attempt: public class GPSTracker extends Service{ // The minimum distance to change Updates in meters private static final long MIN_DISTANCE_CHANGE_FOR_UPDATES = 10; // 10 meters // The minimum time between updates in milliseconds private static final long MIN_TIME_BW

LocationClient getLastLocation() return null

随声附和 提交于 2019-12-17 01:03:35
问题 Like the questions someone encountered before I tested one the nexus s(4.0.4 with google play service available) and avd (4.2.2 with google api), in both case locationclient's getLastLocation() always return null . public class MainActivity extends Activity implements LocationListener, GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener { private LocationClient mLocationClient; private LocationRequest mLocationRequest; boolean mUpdatesRequested =