geolocation

How to Parse XML data to a PHP variable

流过昼夜 提交于 2019-12-06 03:47:21
I am mediocre with php and ignorant with XML...if you can be detailed it will help me learn. I am attempting to use PHP programming to execute a scripts to this link... http://ws.geonames.org/postalCodeSearch?postalcode=VARIABLE_ZIP&country=US . The VARIABLE_ZIP is the actual zip code entered into the form that will submit the information in the link above. The output of that link creates an XML page that i do not want displayed anywhere on my website. What I want to do is capture the XML data Latitude and Longitude values as variables within php and store them into a database. 1) I have a

Android: how to get the walking distance between two geo coordinates?

别来无恙 提交于 2019-12-06 03:22:20
问题 I used this query URL http://maps.google.com/maps?q=from+A+to+B&output=kml ,which is given in the answer to this question. But after I tried it, it doesn't work with coordinates. It works with address names tho. I guess I could use google's geocoding to get the addresses first. But I wonder if there is another way to get the walking distance between two coordinates? 回答1: My New Answer :) Use the Google Directions API. It should be possible to make a request to http://maps.google.com/maps/api

GPS Signal Strength Calculation

 ̄綄美尐妖づ 提交于 2019-12-06 03:07:01
问题 I want to display a signal bar for a GPS device using .NET CF. I'm able to read NMEA data and get the SNR signals. But they are a number of satellites with some active and some inactive with various SNRs. I thought about getting average of total SNR but it won't give a accurate value as three strong signal satellite is enough for GPS fix and with another 5 satellites with bad SNR can mess up the signal bar calculation. How am I gonna calculate GPS signal in percentages in a proper way? 回答1:

How do I enter an “empty” POINT() geometry value into a MySQL field of type POINT?

亡梦爱人 提交于 2019-12-06 03:04:55
问题 I have a table with a POINT geometry field. I enter latitude/longitude points into it like this: INSERT INTO table( point ) VALUES( POINT( lon_value, lat_value ); Sometimes I do not have lat/lon values to enter. I am unable to enter a blank, a NULL, or an empty POINT() ... since POINT(0,0) is actually a location on the globe, that won't work either. What is the solution here? 回答1: I would use coordinates of North Pole INSERT INTO table( point ) VALUES( POINT(0.0000,90.0000); If the actual

Cordova geolocation plugin not getting location from GPS for Android

我怕爱的太早我们不能终老 提交于 2019-12-06 02:56:46
in my Cordova application, I am trying to get user's location from GPS. For that I am using Geolocation plugin . I need to get location after every 10 seconds. I am doing something like: navigator.geolocation.getCurrentPosition( $rootScope.onSuccessForLocation, $rootScope.onErrorForLocation_High, {maximumAge:600000, timeout:7000, enableHighAccuracy: true} ); Now when this code runs, it gives me location in callback method but its not coming from GPS as when app starts the GPS icon should appear and starts blinking in status bar. But it is not happening. I had an old app which is using same

Javascript Function - Convert Geolocation Code to Street Address

时间秒杀一切 提交于 2019-12-06 02:51:15
问题 I am looking for a javascript function or jquery library to convert geolocation code (e.g. 42.2342,32.23452) to street address For examples. navigator.geolocation.getCurrentPosition( function(pos) { $("#lat_field").val(pos.coords.latitude); $("#long_field").val(pos.coords.longitude); } ); Here is a google api URL to get address data http://maps.googleapis.com/maps/api/geocode/json?latlng=41.03531125,29.0124264&sensor=false I want to see "formatted_address" : "Hacı Hesna Hatun Mh., Paşa Limanı

Find all localities/regions of a city

假如想象 提交于 2019-12-06 02:32:47
问题 I have tried to find a lot over the Internet but I am unable to get a perfect utility/API for my requirement. I am looking for a utility that, given a city name, provides all the localities/regions of that city. (Would be great if alongwith the regions, the pincodes of every area/region could also be provided). P.S - I have been wondering if Google Maps, open-street maps provide such data, as their maps are already very data exhaustive and they virtually have every data point in their system?

Location always returns “Unknown”

霸气de小男生 提交于 2019-12-06 01:54:19
I've just tried my first WP7 application on a real device. My problem is that I use geolocation for one of the features, but I always get location unknown. I don't know if there's any way to grant location permissions to my app or if I am missing something. In the phone settings the location services are enabled, and maps app is working without any problem in finding my actual position. I've checked the GeoCoordinateWatcher.Permisson property and its value is "Granted". I already have this line <Capability Name="ID_CAP_LOCATION"/> in WMAppManifest.xml. Any ideas to solve it? [EDIT] Here's my

Point in Polygon using Winding Number

若如初见. 提交于 2019-12-06 01:26:22
问题 The question is: how do you determine if a point is within a polygon? This question has been asked and answered many times. There are multiple methods for determining whether a point is within a polygon. I've grokked the Winding Number algorithm, ported a solid answer from another SO thread into C# and written xUnit tests around it to ensure that I could refactor ruthlessly. The goal was to take an answer, all of which seem to use a procedural programming approach and variable names that are

MyLocationOverlay or LocationManager for updating current location

为君一笑 提交于 2019-12-06 01:07:00
问题 I am using MapView to show current location of a user on a Map. To update the location while the user is on the move, I have to a choice: I can use MyLocationOverlay to draw the current location and extend it to allow tracking of the users location on the move and to have custom marker. The problem with MyLocationOverlay is that I cannot control the frequency with which the device requests the location from GPS. I am worried about the battery drain here. I can use Location Manager and