location

Calculate whether one coordinate is within range of another

有些话、适合烂在心里 提交于 2019-12-07 07:25:21
问题 I'm writing a Windows Phone 7 app that needs to be location aware. Specifically I want some (c#) code to run when the phone comes within a (fixed) range of a particular location, say 0.5 miles. I have all the lat / long data for the physical locations in memory. I will be using the Geo Coordinate Watcher class to get the devices current coordinates. Now the only trick is to calculate whether the user is in range of any of the locations. Thanks! Update : as promised here's the little C#

significant location change does not trigger at least every 15min

倾然丶 夕夏残阳落幕 提交于 2019-12-07 07:07:05
问题 According to apple docs, significant location change should update location at least every 15min. I am indeed receiving updates when I move significantly, but not when the device is stationary. What is your experience with updates? Do they come at least every 15min? If GPS-level accuracy isn’t critical for your app and you don’t need continuous tracking, you can use the significant-change location service. It’s crucial that you use the significant-change location service correctly, because it

iPhone running periodical process in the background - battery optimized way

独自空忆成欢 提交于 2019-12-07 07:00:56
问题 I want to run a specific task in the background. This task takes few seconds to complete (it writes some GPS location data to a file). This task should run once every 1 hour. As I understand from the SDK, I do not have a way to INITIATE something in the background unless I run Location Services forever. When this service runs, it gives me an event from time to time, and I'm able to run my code during these calls. I tried it, and even with the minimal precision possible, my battery goes down

Android: best method to calculate distance between two locations

我们两清 提交于 2019-12-07 05:18:13
问题 i researched a little in this topic, but there are many opinions that don't exactly give a clear image. My problem is this: I'm developing a gps-based app for Android, in wich i want to know distance between my current location specified by Androids LocationManager, and other location in real time. I tried Haversine formula, a Law of Cosines formula, then I discovered, that Android SDK gives me a simple function Location.distanceTo(Location) - i'm not sure what method does this function runs

How can you get your historic location data from new iPhones with iOS 5 (for personal use)?

你说的曾经没有我的故事 提交于 2019-12-07 04:14:15
问题 It used to be easy to get your historic location data from a file called consolidated.db on an iPhone (see, for example, http://petewarden.github.com/iPhoneTracker/). However, this is more difficult on new iOS systems. Is your data still somewhere on your phone, though, and is it possible to access it? To be clear, I'm not looking to use the location API; rather, I'd like my historic location data as an end-user of my device. Are there any scripts/apps available that can do this for me? 回答1:

Custom message for geolocation

佐手、 提交于 2019-12-07 02:53:32
问题 I am looking for a way in which i can display a custom message when the geolocation script asks for the user to either allow or deny access to their location. At the moment it displays a message asking weather the user wants to allow or deny access to their location. Instead of it saying the default "Allow website.com to access your location" I want to be able to change it to my own text such as "Allow location access to display better results". I will look forward to your responses. 回答1:

Send notifications based on the users location

本小妞迷上赌 提交于 2019-12-07 01:21:15
问题 In my android app that I am developing, I would like to be able to send notifications to the user's phone depending on their location. For example, A user gets notifications for special deals at restaurants that are local to their current location. I would like to know the best way to do this? (Not have the code, just the general structure of how to do it). I have thought of two possible ways: Way 1: 1) Have the app get the user location and report it to the server every 5 minutes. 2) If the

Android how to use location.distanceTo()

女生的网名这么多〃 提交于 2019-12-07 00:06:38
问题 I am using a fragement, I need to get my currently Location (lat and lng) and I need to calculate my currently location with the destination location. Can you pls give me a hand. what is the best way to calculate the location: How can I get the distance from my currently location and the destination location using lat and lng ; LocationManager locationManager; Location locatio; locationManager = (LocationManager)getActivity().getSystemService(Context.LOCATION_SERVICE); location =

Google location API: request location updates with pending intent?

时光毁灭记忆、已成空白 提交于 2019-12-06 22:49:54
问题 I have started to implement the Google Location API using this tutorial. I've managed to get it to work in my application quite fine, it updates my location at the right intervals etc. Now I am working on how to update my location when the device is in sleep mode. According to the documentation, this method is the way to go: public void requestLocationUpdates (LocationRequest request, PendingIntent callbackIntent); My question is, how do I set up this PendingIntent, and how do I handle it? I

Vue-cli项目部署到Nginx服务器

不想你离开。 提交于 2019-12-06 21:57:44
0. Nginx使用 以windows版为例,下载niginx压缩包并解压到任意目录,双击nginx.exe,在浏览器中访问 http://localhost ,如果出现Welcome to nginx!页面则说明成功。 nginx常用命令如下: nginx -h # 打开帮助 nginx -t # 检查配置文件是否正确 # 以下命令均要先启动nginx才能执行 nginx -s stop # 停止 nginx -s quit # 退出 nginx -s reopen # 重新启动(注意不会重新读取配置文件) nginx -s reload # 重新读取配置文件 1. 部署项目到Nginx根目录 对于vue-cli创建的项目,修改vue.config.js文件(位于项目根目录下,没有的话自行创建): module.exports = { // 开发环境中使用的端口 devServer: { port: 8001 }, // 取消生成map文件(map文件可以准确的输出是哪一行哪一列有错) productionSourceMap: false, // 开发环境和部署环境的路径 publicPath: process.env.NODE_ENV === 'production' ? '/' : '/my/', configureWebpack: (config) => { // 增加