geolocation

How to make a phonegap build app work in background

隐身守侯 提交于 2019-12-10 12:25:02
问题 I need my app to work 24/7 recording the users location every 5 mins. It works fine while the phone is active but when it isn't the setInterval() 's strecth out to be up to 5x longer than they should. Using phonegap build, how would I go about making the app work as it should in the background while the phone is idle? 回答1: @Marty, both Android and iOS and run in the background, but require an extension to the regular config.xml. To be clear Android apps uses AndriodManifest.xml. iOS uses,

Geolocate an IP without extensions?

大城市里の小女人 提交于 2019-12-10 12:20:30
问题 Is there a way to locate an IP's country without using any php extensions? I know there are certain extensions, but is this possible without using extensions nor using other websites. For example: www.[ip to country].[something]/?ip=123.123.123.123 回答1: Download a database that maps IP addresses to countries, e.g. from MaxMind, and install it on the server. There is no way to calculate the information stored in the database without accessing remote systems. That's why you really need a

geoip_record_by_name returns nothing?

时光怂恿深爱的人放手 提交于 2019-12-10 12:09:14
问题 I tried this tutorial http://tech.cibul.net/install-maxminds-geoip-ip-database-on-ubuntu-for-php/ and did everything from it. Compiled the geoip module and also the php extension on my Ubuntu 11.10 installation. I also tried this more simpler terminal command (sudo) apt-get install php5-geoip And it showed successful installation but when I try geoip_record_by_name('127.0.0.1') and it still gives nothing, i.e. no array at all. 回答1: Try a different IP address - for example 111.111.111.111 as

GPS Location takes a few seconds to be retrieved

不羁的心 提交于 2019-12-10 12:04:51
问题 I have written an iPhone app that uses the iPhone's relative GPS location. I have a button in the user interface that does reverse geolocation (pulls the street name bases on the lat and long). The only problem is that the location object as retrieved by CLLocation *location = [[self locationManager] location]; is nil if the user taps the button too soon. I am initializing the LocationManager in viewDidLoad as I don't want to object to be created unless the user actually loads this screen. I

how to calculate all points(longitude,latitude) within a given radius from given point (longitude,latitude)?

自闭症网瘾萝莉.ら 提交于 2019-12-10 11:59:15
问题 I have a given point (longitude,latitude) and I want to get all the points ranges that comes lets say 5 miles radius in given point? 回答1: I'm just guessing here, but I think you'll need to find a different approach. If you're trying to do something like Foursquare, Google Maps, etc where it finds places within a 5-mile radius of your current location, I think you'll find that these services don't calculate all the points in that radius and then match them up to places at those points. There

Not getting latitude and longitude from background service

 ̄綄美尐妖づ 提交于 2019-12-10 11:56:20
问题 I am new in android I want to run a service in background and get latitude and longitude or Geo address after 10 minutes and send to the server. Please help me. Here is my code: In Activity public void serviceCall(){ Log.e("INSIDE ALARM", "INSIDE ALARM"); Intent intent = new Intent(getApplicationContext(), MyService.class); final PendingIntent pIntent = PendingIntent.getBroadcast(this, MyService.REQUEST_CODE, intent, PendingIntent.FLAG_UPDATE_CURRENT); long firstMillis = System

Get Civic Address in Windows Phone 8

℡╲_俬逩灬. 提交于 2019-12-10 11:43:58
问题 I'm trying to get the civic address via Geolocator in WP8. But it throws a System.NullReferenceException private void geolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args) { Dispatcher.BeginInvoke(() => { LatitudeTextBlock.Text = args.Position.Coordinate.Latitude.ToString(); LongitudeTextBlock.Text = args.Position.Coordinate.Longitude.ToString(); Tblock.Text = args.Position.CivicAddress.Country; }); } already tried with Geoposition also. Still throws exception. Tried a

How to geolocate an android device by using Network Location Provider

元气小坏坏 提交于 2019-12-10 11:35:17
问题 I am trying to develop an Android application that can be used to find location of a friend who has also installed the application. The application will find location not using GPS but through Android Network location provider . The person who want to get the location of a friend will send a particular SMS to the friend, the friend phone will then process the SMS in background, find the location using network location provider and reply the requester with a SMS containing the location. So, I

Converting Southing/Easting GPS coordinates to Latitude/Longitude

天大地大妈咪最大 提交于 2019-12-10 11:32:30
问题 I am developing a web application using JQuery Framework and am using Geolocation to determine the locations of our hardware stations to display on Google Maps. In our database the locations of the sites are stored in Southing/Easting format. I need a way to convert Southing/Easting coordinates to Latitude/Longitude that Google Maps can understand. Can anyone please tell me the formula or the best way to approach this problem? I have done searches on Southing/Easting however nothing came up,

Gets sub documents by geoNear - MongoDB

蹲街弑〆低调 提交于 2019-12-10 11:24:09
问题 i have this situation. In our database have "stores" documents, and "branch offices" as subdocuments ( One to Many ). Each branch office have a location attribute, which is indexed for geolocation searching. So, the problem is: {store:{"name":"store1", branchoffices:[{"name":"bo1","location":[ -70.64341379999999, -33.4268697 ]}, {"name":"bo2","location":[80.4,43.3]}]}} If i do this aggregation: Store.collection.aggregate( [{ "$geoNear"=>{"near"=>[ -70.64341379999999, -33.4268697 ],