geolocation

iOS location permission after app reinstall

你离开我真会死。 提交于 2019-12-08 20:36:05
问题 I’m using Crashlytics for internal application tests and noticed one interesting thing. I’m using geolocation in my app and asking for permissions from a user. When customer install app for first time he sees default Apple’s geolocation permissions asking pop up. And everything work fine. But, if user will remove app from phone and install it again... in this case, when I’m asking for permissions, pop up just won’t appear BUT geolocation is WORKING. How? Is this some sort of new feature or

user disallowed geolocation - notify user second time

寵の児 提交于 2019-12-08 20:14:49
When trying to get geolocation on iPhone the first time - I declined. Every other time I want to get the location (before another reload of the page) I get no response (no error and no success): navigator.geolocation.getCurrentPosition( function (location) { ig_location.lat = location.coords.latitude; ig_location.lng = location.coords.longitude; alert('got it!'); }, function(PositionError) { alert('failed!' + PositionError.message); } ); Is there a way to notify the user every time I fail to get the location? (I do not need to use watchPosition...) The Geolocation API is designed so that it

How do I calculate route distance between many GeoJSON points in MongoDB?

倖福魔咒の 提交于 2019-12-08 19:44:15
问题 How do I calculate route distance between many GeoJSON points in MongoDB? Can I have a database query that sort items by their date field, then calculates the distance between points and finally sums all of then to calculate the total distance? Here are some examples of my data: { _id: 599cfc236ed0d81c98007f66 tracerId: 59a07ea26ed0d81d78001acd loc { type: "2dsphere", coordinates: [ 159.9, -37.92 ] }, date: 2017-08-26 00:16:42, speed: 58, } { _id: 59a074d46ed0d81d78001acc tracerId:

Physical Address to GeoLocation UK

Deadly 提交于 2019-12-08 19:18:34
Is there a good physical address to GeoLocation conversion database in the UK? I am trying to use this to build a globrix style search box http://www.globrix.com/ for a web application. Any pointers will be nice. I have been searching for hours. I have found several that convert UK Postcodes into Geolocation. But I need the addresses listed as on Globrix. The Google Maps API provides a geocoder webservice that you can actually use independently of Google Maps itself. You send it the address/postcode, and it responds with a lat/long plus disambiguated addresses. We use it server-side in the UK

Convert between Degree and Milliseconds

故事扮演 提交于 2019-12-08 18:25:32
I know the formular for conversion from Degree to Milliseconds and vice-versa. It can be implemented like that: protected function decimal_to_milisecond($dec) { if (!empty($dec)) { $vars = explode(".",$dec); if (count($vars) == 2) { $deg = $vars[0]; $tempma = "0.".$vars[1]; $tempma = $tempma * 3600; $min = floor($tempma / 60); $sec = $tempma - ($min*60); return round((((($deg * 60) + $min) * 60 + $sec) * 1000)); } else return false; } else return false; } function milisecond_to_decimal($sec) { if (!empty($sec)) { $s = $sec / 1000; $d = (int)($s / 3600); $s = $s % 3600; $m = (int)($s / 60); $s

Convert the coordinates of a shapefile in Geopandas

你说的曾经没有我的故事 提交于 2019-12-08 17:49:28
I am new at spatial analysis, but I cant find this answer anywhere. I have a list of post codes in CRS coordinates, latitude and longitude, and London's Boroughs shape file in OSN coordinates, and I would like to map them together, but this is what happens. This is the head of the postcodes london_post_codes.head() Out[81]: postcode latitude longitude 0 WD6 1GS 51.658021 -0.255663 1 WD17 1LA 51.660366 -0.397525 2 WC2N 6LE 51.509413 -0.121676 3 WC2N 6NA 51.508363 -0.124454 4 WC2N 6ND 51.508216 -0.123829 while this is the shape file read in geopandas borough = gpd.read_file('London_Borough

Alternative to Google Maps Geolocation API

﹥>﹥吖頭↗ 提交于 2019-12-08 17:19:17
问题 I'm working on a project that involves a huge volume of real time data per second (achieved by websockets). Because of this, it can't handle calling Google's API to convert a City + Region to a longlat coordinate. I'm getting about a 1 to 100 success rate. Is there an unlimited alternative to City & Region to Coordinate service of the Google API? Ideally a locally stored JSON array of such data? 回答1: Usually when you're dealing with a large number of data points, you'd geocode them once on

How to write a background service to get latitude and longitude?

匆匆过客 提交于 2019-12-08 14:29:46
问题 I need to write a background service to get latitude and longitude values. I have an Android application in which it has to find where the user is currently. Is there any way to programmatically get the latitude and longitude values from the system services (or some program)? 回答1: Use LocationManager . The documentation covers this. 来源: https://stackoverflow.com/questions/3640973/how-to-write-a-background-service-to-get-latitude-and-longitude

How to get geo coordinates from GestureEventArgs using bing map control?

二次信任 提交于 2019-12-08 14:28:20
I have WP7 application and using Hold event. Is it possible to get geocoordinates for a point I'm holdin my finger on? Thank you Point p = e.GetPosition(this.MapMain); GeoCoordinate geo = new GeoCoordinate(); geo = MapMain.ViewportPointToLocation(p); geo now contains coordinates of tap. 来源: https://stackoverflow.com/questions/8526697/how-to-get-geo-coordinates-from-gestureeventargs-using-bing-map-control

JMapViewer, load raster to a position

萝らか妹 提交于 2019-12-08 12:52:37
问题 I would like to load and display a raster file over the map in the JMapViewer. The raster file: should be loaded at a specific position, size dynamically changes using the zoom operations, I hope these operations are supported by JMapViewer. Currently, I am using a class derived from the MapMarkerCircle: public class ImageViewer extends MapMarkerCircle implements MapMarker { private BufferedImage img; public ImageViewer(Coordinate position, BufferedImage img) { this(position, 1, img);} public