gps

iOS Swift. How to get a GPS metadata from just a UIImage (NSURL)?

痞子三分冷 提交于 2019-12-04 13:50:14
问题 Have a reference to an image only having its NSURL. How to get a GPS metadata from it? Of course, I can load a UIImage from NSURL, but then what? Majority of answers I've found here is regarding UIImagePicker, and using ALAssets then, but I have no such option. 回答1: Answering my own question. The memory-effective and fast way to get a GPS metadata is let options = [kCGImageSourceShouldCache as String: kCFBooleanFalse] if let data = NSData(contentsOfURL: url), imgSrc =

Where do the location and currentBestLocation come from? in Android Dev Guide (Obtaining User Location)

自闭症网瘾萝莉.ら 提交于 2019-12-04 13:15:47
问题 I read the tutorial about Obtaining User Location in Android Dev Guid and, I try to adapt this to the following code.. but i don't know which location value I should put into isBetterLocation(Location location, Location currentBestLocation) Example.class private LocationManager locman; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); String context = Context.LOCATION_SERVICE; locman = (LocationManager

how to trap the location alert response iphone

大兔子大兔子 提交于 2019-12-04 13:03:40
I am using GPS in iphone and it show conformation message for use location service. and i want to trap what user select "Allow" or "No". can any one suggest how i do this? Thank You don't get a direct callback from this alert. However, if the user does not allow Core Location usage, you'll receive a -locationManager:didFailWithError: with a kCLErrorDenied error to your CLLocationManagerDelegate . Since iOS 4.2, you can also listen to -locationManager:didChangeAuthorizationStatus: or check the authorizationStatus of CLLocationManager . This gives you a detailed status. 来源: https://stackoverflow

Why Location permission are required for Ble scan in android Marshmallow onwards

纵然是瞬间 提交于 2019-12-04 12:55:34
问题 With the latest release of Android called Marshmallow,Starting a Bluetooth Low Energy scan requires permission from Location group. As a result of that one of the following permissions are required: ACCESS_COARSE_LOCATION , ACCESS_FINE_LOCATION Any reason why we need to switch on GPS for BLE scan? 回答1: BLE beacons can be used to get location information using nothing more than the BLE broadcast UUID data and an internet connection (e.g. iBeacon, AltBeacon etc.) Since this is possible and the

read NMEA sentences from GPS

非 Y 不嫁゛ 提交于 2019-12-04 12:38:06
I have a Mio P550 device, which has a GPS included. I try to use SerialPort to get NMEA sentences, by simply use SerialPort.Read(). Data is returned in some weird encoding. GPS should return NMEA sentences in ASCII, but it doesn't. Here is my code for reading: dataLength = this.serialPort.Read(buffor, 0, Gps.BUFFOR_LENGTH); Debug.WriteLine("data length: " + dataLength); if (dataLength > 0) { for (int i = 0; i < dataLength; i++) { char c = Convert.ToChar(buffor[i]); if (c == '\r' || c == '\n') { string data = stringBuilder.ToString(); Debug.WriteLine("data readed: " + data); if (data.StartsWith

Mobile GPS web application

天大地大妈咪最大 提交于 2019-12-04 12:35:16
问题 I need to develop a web app. (PHP) 100% for mobile phones and need to get the information from the mobile phone GPS, in order to get the user's current position. My question is, what should I do? I know PHP but I'm completely clueless about the GPS part (never worked with them before). All i'm looking is for headsup to see if I can handle the job or just reject it. I've heard that the W3 geolocation API does a very good job but after testing it i'm not convinced about the accuracy and browser

Google Maps - Location keeps jumping between my real location and 0.6 miles away (Random place)

大憨熊 提交于 2019-12-04 12:21:33
I've got Google Maps v2 running on my app, using a service to get the users location. Problem is the location keeps changing. It shows my real location for a bit, then jumps to a random location that I've never been to before. I'm check GPS/Network lat/lng via the service and calling them in my maps class, where I then animate the camera to move to my location. I don't really know what's wrong, or where to start with this one. Does anyone know what sort of problem this is? It's baffling to me. I don't really know what code to post. The accuracy of the location via network is 1121m where as the

Lookup country for GPS coordinates without Internet access

旧时模样 提交于 2019-12-04 11:24:25
问题 I need to find out in what country given GPS coordinates are, on a device that has no Internet access (e.g. this, but without the easy on-line solution). Having no experience with GIS, I guess I'd need some kind of module that would statically store shapes of countries and match current location against them. I'd therefore like to ask what kind of tools would be best for this, and what is the best way to obtain the country data. I'm using Python on an embedded Linux box. 回答1: There's a shape

How to SET Android Mock GPS location?

依然范特西╮ 提交于 2019-12-04 11:13:46
Description I'm having a issue while trying to use android mock locations, my main goal is to set the android GPS into thinking we are in a different spot, AKA fake GPS. Current attempts I have currently tried two different similar solutions, avaiable in both this websites: Programming Jungle Mobiarch Both tutorials are from 2012, I don't know if they are outdated or I'm having a hard time implementing them to work. Coding development First I make sure I have permissions: ACCESS_COARSE_LOCATION ACCESS_FINE_LOCATION ACCESS_MOCK_LOCATION * Note : 1 and 2 are both checked, if they are not

Location and distance calculation using Wifi in android

江枫思渺然 提交于 2019-12-04 11:07:24
How to get the distance of our mobile device from a wifi hotspot kept inside a building? This is basically for navigational purposes inside the building.. Any help would be appreciated. If you want to use WiFi for indoor location (step 1 before navigation), then distance to the WiFi Access Points is not the correct approach. Instead use RSSI . With Android you would need to take WiFi fingerprint of a building by moving around every few meters and sample the RSSI strength . You need to provide a user interface that lets the user manually specify on an image of the building (e.g. a CAD drawing).