geolocation

Return the location data from GeoCoordinateWatcher.StatusChanged event in Windows Phone 7

对着背影说爱祢 提交于 2019-12-08 12:43:54
问题 I'm writing a Windows Phone app where I need to get user's location. I'm trying to this in a nice way (well as much as I can), using a separate class where I'm querying GeoCoordinateWatcher for location data and return that data to calling method. The problem is, I don't know how to return the the LocationData struct to the calling method from the StatusChanged event of the GeoCoordinateWatcher . See the code & comments: public struct LocationData { public string latitude; public string

Why does my variables dont take the value in the function?

江枫思渺然 提交于 2019-12-08 12:31:01
问题 I want to display on screen the var longitude en latitude but I think that the function is executing last and I'am stuck with the initial values. The objective is to print on screen the exact values of the geolocation that the browser returns. Thanks !!! <!DOCTYPE html> <head> <script> var longitude = "10"; var latitude = "20"; </script> </head> <html> <body onload="getLocation()"> <script> var longitude = "30"; function getLocation() { if (navigator.geolocation) { navigator.geolocation

Designing a normalize database for getting 5 nearest neighbor using MySQL spatial index

匆匆过客 提交于 2019-12-08 12:15:31
问题 I will be using MySQL with spatial index for a database, then i will query for 5 nearest neighbors from a given point(lat/long), these points will be interest points in Dominican Republic. Once that i get the 5 nearest points i will need the Name of the Location, Type of the Location, Address of the location and (lat,long) for each point. What should be the right way to design my database? i was thinking of doing the following: Table: Name Columns: ID, Name Table: Type Columns: ID, Type Table

Detect if user enters or leaves a region - geocoding

不羁的心 提交于 2019-12-08 12:15:17
问题 I'm starting with geocoding. And I have a lot of doubts. I'm able to do forward and reverse geocoding (I guess, its not perfect). And now, I'm trying to detect if user (device) enters or leaves a region. For that, I picked up apple's sample code "Regions". The sample uses regionMonitoring . I already try it in a device, but its not working well. I set a region with 25 meters radius, and when I left the region (walking) doesn't happen anything. My question is: there is another and better way

Convert longitude latitude coordinates (WGS) to grid with equidistant axes (in given area)

穿精又带淫゛_ 提交于 2019-12-08 11:56:21
问题 I have a lot of geocoordinates in tow data sets and want to run a nearest-neighbor-search. I came across the package 'RANN' and the function nn2(x,y) runs really fast. Now there is the problem, that of course in the area of London a degree to the north is a quite a longer way then a degree to the west. My idea now was to convert the location coordinates to some grid where one step in the direction of x is nearly the same as one step in the direction of y. The area is London (Center -0.1045,51

Google Geocoding v3 - Getting formatted Address [duplicate]

走远了吗. 提交于 2019-12-08 11:35:28
问题 This question already has an answer here : Google Geocoding - Grab Address along with coordinates (1 answer) Closed 6 years ago . I was wondering if anyone is able to help me. I am having a hard time getting both the coordinates and the formatted address returned to me in my dialogue box on my geocoding result, even though I seem to be able to grab the city, country. Here is the code I am working with: http://jsfiddle.net/d5DBh/5/ Code var myLatlng = new google.maps.LatLng(31.272410, 0.190898

Google Maps Javascript V3 geolocation - cannot access initialLocation variable unless alerted

巧了我就是萌 提交于 2019-12-08 10:26:30
问题 apologies if this has been answered already - I've looked for a few hours on StackOverflow and elsewhere, and can't figure it out. I'm trying the Google Maps V3 geolocation function (Google Maps Javascript API V3 - Detecting the User's Location), and wanted to add a simple centre marker (amongst other things) after the map has been centered. If I add the following at the end of the "initialize" function, it doesn't seem to have access to the "initialLocation" variable: var marker = new google

Phone gap geolocation with google maps

我只是一个虾纸丫 提交于 2019-12-08 09:45:11
问题 I wanna make an app which requires me to get my position and display it on google maps. I used the code from http://wiki.phonegap.com/w/page/16494764/PhoneGap%20Geolocation%20Sample%20Application. I am developing for Android 2.2 using phonegap 2.0.0. I am using the emulator 2.2. I have installed everything from Phonegap correctly and i obtained a google Api3 key for the map. I place the key after: http://maps.google.com/maps/api/staticmap?center=(here i place the key). Now when i start the

From Latitude and Longitude to absolute X, Y coordinates

狂风中的少年 提交于 2019-12-08 09:37:47
问题 I have a series of Lat/Long coords. I need to transform it in X, Y coordinates. I've read about UTM, but the problem is that UTM coordinates are relatives to a single zone. For example, this two coordinates UTM has the same Easting (x) and Northing (y) but different code zone, and so each coords point to a completly different location (one in spain and one in italy): UTM: 33T 292625m E 4641696m N UTM: 30U 292625m E 4641696m N I need a method to automatically transform that relatives coord in

Can't get current location when offline Windows 10 App?

≡放荡痞女 提交于 2019-12-08 09:21:34
问题 I'm trying to find out whether it's possible to get the current location of a Windows 10 device if it's not connected to the internet via Wi-Fi (Wi-Fi) is disabled . I'm aiming this at Windows 10tablets and I don't think they all support GPS. Does anyone know what would be the best way to go about this? Or is it possible at all? when i use Geoposition pos = await geolocator.GetGeopositionAsync(); it returns Exception . 来源: https://stackoverflow.com/questions/33391228/cant-get-current-location