location

iphone app - how to get the current location only once and store that to be used in another function?

风格不统一 提交于 2019-12-03 06:20:22
I've been working on this for the past 2 weeks - i have an app that shows a legible route on a map that goes from a start point to a destination point. the destination point is the users address (as defined/entered by the user in the settings menu we have set up) and if i hard code the start point, the map, route and application all work fine. once i try to implement anything that involves using the cllocation or cllocationmanager, it crashes and gives me a thread error (there are 3). Here is the current view controller header & implementation file for this: #import <UIKit/UIKit.h> #import

Country/State/City Database? [duplicate]

感情迁移 提交于 2019-12-03 06:10:02
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: Database of Countries and their Cities Ok, this one is a non technical question. I am creating a business directory and I'd like to categorize listings by location. Instead of giving users an option to enter the location, I am going to provide them with a list of locations which follow a Country/State/City format. I tried GeoWorldMap by GeoBytes. It looked promising in the beginning and I felt that is exactly

Get a user's State with Geolocation

不问归期 提交于 2019-12-03 05:02:40
What's the most efficient way to get a United States user's State? Is HTML5 Geolocation an option without needing to involve google maps? Marcel Here's a couple of examples in JavaScript and JSON (with the help of jQuery ) using both the IP lookup method (with the help of IPinfoDB ) and the Geolocation API method (with the help of Google Maps API and YQL ). In both examples I'm retrieving the region and country but there are several values you can choose from. Be aware these examples don't do any error handling and here they are edited for brevity, otherwise see the full demo . IP Lookup in

iOS Location Services visits and system Frequent Location

左心房为你撑大大i 提交于 2019-12-03 04:53:12
I noticed that Frequent Location on iPhone seems to use much less battery than an app monitoring iOS Visits ( https://developer.apple.com/reference/corelocation/clvisit ). Frequent location on iPhone can be viewed on the phone via Settings -> Privacy -> Location Services -> System Services -> Frequent Locations. I would like to know if Visit monitoring service from CLLocationManager is the same as iOS Frequent location or is it on different system used by Apple. If Apple is using the same service why it does not have any impact on the battery? Joshua Briefman The two APIs are intended for

Creating Android Location Object

你说的曾经没有我的故事 提交于 2019-12-03 04:51:34
I am using the Geocoder class to fetch multiple location objects by using the following code: Geocoder geocoder = new Geocoder(this, Locale.getDefault()); List<Address> addresses = geocoder.getFromLocation(LATITUDE, LONGITUDE, 3); Address[] addresses_array = new Address[addresses.size()]; addresses.toArray(addresses_array); for( int i = 0; i < addresses_array.length; i++ ){ //create location object here locOBJ.setLatitude(LATITUDE); locOBJ.setLongitude(LONGITUDE); } In addition, inside the forloop, I am trying to dymanically create location objects to add to an array; How can I create blank

Why is my 301 Redirect taking so long?

荒凉一梦 提交于 2019-12-03 04:49:53
问题 In a long tiredsome quest to speed up my site, I have figured out something is wrong with the redirection: currently my index.php handles all the homepage redirections via PHP header location 301 Redirect Permanently: website.com >> website.com/en/home and website.de >> website.de/de/home etcettera etcettera (around 20 for this multilingual website) it takes anywhere from 200ms to 6000ms to do the redirecting. Check out the waterfall! After that, the page loads in a thunderbolt's blink of an

Qt/Qml: how to include map tiles for offline usage?

天大地大妈咪最大 提交于 2019-12-03 04:47:18
I need to include offline tiles (slippy map) into a Qt/Qml mobile application that mainly runs on Android and iOS. The only well-documented and working solution I found is the commercial Esri Arcgis Runtime for Qt. However, creating tile packages requires using the Arcgis stack, either desktop or server (please correct me if I am mistaken). https://developers.arcgis.com/qt/ I am looking for an open source and easy to use alternative. QtLocation has just been improved in Qt 5.5, but there seems to be no out of the box solution for offline tile packages there: http://doc-snapshots.qt.io/qt5-5.5

Difference between LocationRequest setInterval (long millis) and LocationRequest setFastestInterval (long millis)

我们两清 提交于 2019-12-03 04:30:40
问题 I am writing my own background location updates for interval of every 5 minutes in android. I would like to know the difference between setInterval and setFastestInterval When I setInterval to 5 mins and setFastestInterval to 2 mins. The location update is called every 2 mins. I would like to know the difference. I couldn't understand what exactly is written in the developer page for this https://developer.android.com/reference/com/google/android/gms/location/LocationRequest.html Also: Is

Android: Check if Location Services Enabled using Fused Location Provider

[亡魂溺海] 提交于 2019-12-03 04:24:33
问题 According to the Android documentation: The Google Location Services API, part of Google Play Services, provides a more powerful, high-level framework that automatically handles location providers, user movement, and location accuracy than the platform location API in android.location . But using the fused location provider (from location APIs in Google Play services) I do not know how to check if the user has the location enabled or disabled. Using the old android.location it was easy:

Current URL To Download KML Data From Google Location History?

心已入冬 提交于 2019-12-03 04:22:40
问题 I need to download google location history data in kml for a period of time. Up until August 26, 2015, a URL in this format worked: https://maps.google.com/locationhistory/b/0/kml?startTime=$start_seconds&endTime=$end_seconds Now a link in that format fails. I suspect the problem is related to google changing the way its website displays location history, though that change happened nearly a month earlier on July 22. A commenter on the google products forum suggested this: [T]he KML