geolocation

How to get HTML5 position in WebView updated at a regular interval (with FINE_ACCURACY)

时光总嘲笑我的痴心妄想 提交于 2019-12-06 00:52:32
I'm developing an application to track my phone at regular intervals (not only the first time) with navigator.geolocation.getCurrentPosition() running in an HTML5 page running in a webkit webview running in an android 2.1 application. I already read responses to the following questions: Using navigator.geolocation.getCurrentPosition in WebView on Android 2.0+ (PhoneGap related) Android: Using html5 to determine geolocation in webview with javascript api Geolocation cannot be load on webview Android WebView using GeolocationPermissions I managed to get the position through the javascript method

Qt WebKit and HTML5 geolocation

筅森魡賤 提交于 2019-12-06 00:42:10
I’m learning HTML5 and testing the new features on a Qt hybrid application. Now I’m working on a simple geolocation example but when I call navigator.geolocation.getCurrentPosition(displayLocation); it seems the QtWebKit does not support it, but acording to this http://trac.webkit.org/wiki/QtWebKitFeatures22 the version of QtWebKit that comes with Qt4.8.0 supports geolocation. This is the code I’m using: window.onload = function() { getMyLocation(); } function getMyLocation() { if(navigator.geolocation) { navigator.geolocation.getCurrentPosition(displayLocation); } else { alert("No geolocation

Android Geocoder - different results when called from different geographical locations

送分小仙女□ 提交于 2019-12-05 23:02:53
I have the following code in my Android program List<Address> addressList = geoCoder.getFromLocation(37.790551,-122.433931, 1); if (!addressList.isEmpty()) { address = addressList.get(0); String number = address.getSubThoroughfare(); String streetName = address.getThoroughfare(); ..... } This is a request to essentially get a street name (hence the 1 ) from a latitude and longitude in San Francisco. When I execute this program on a phone in Europe (specifically Ireland) number is returned as 2250-2290 and streetname is returned as Fillmore St . When I get a friend to run the same code on his

Calculate distance between current location and and a different location using Google Maps API V3

混江龙づ霸主 提交于 2019-12-05 22:50:27
I'm trying to calculate the distance between my location and a different location, but all I get is NaN. I'm pretty sure I placed the code in the wrong place in the script. Can somebody help me figuring this issue? <!DOCTYPE html> <html> <head> <script src="http://maps.google.com/maps/api/js?sensor=false&v=3&libraries=geometry"></script> </head> <body> <p id="demo"></p> <button onclick="getLocation()" id="demo">get current location</button> <button onclick="console.log(distance)">get ditance from current location to other location</button> <script> var lat; var longt; var latLngA = new google

IP localization: mapping ip->location fixed over time?

廉价感情. 提交于 2019-12-05 22:42:30
I'm administering a web platform and want to get some statistical data, where my users come from. I can store the remote IP and I know that there are localization services that map an IP to a geolocation. How is this mapping done? Are there fixed tables, which IP address was given to which region? Must I request the mapping in the moment of the access or can I request it days/months/years later? In other words: Is the mapping from IP to location fixed or does it change over time? The mapping from IP to location change over time. I have read that the databases change 5% each month, even though

Get IP address location from windows application

只谈情不闲聊 提交于 2019-12-05 22:39:47
I have seen many questions and answer on stackoverflow regarding how to fetch geolocation of an IP address in asp.net but.. How can I fetch the IP address location in winforms ? I am working on the C# winform application and I need to show user ,its ip address and Its location . I am able to show user's Local,External IP address but I could not find any way to show Location. Any body knows if I can do this with any WebRequest or any other solution ? Edit: I am able to accomplish the task by following method. Send IP address to a site which shows location from the IP address.(e.g. www

Is there a reason that Cassandra doesn't have Geospatial support?

一曲冷凌霜 提交于 2019-12-05 21:57:12
问题 Since Cassandra is based off of the Dynamo paper (distributed, self-balancing hash table) + BigTable and there are spatial indexes that would fit nicely into that paradigm (quadkey or geohash). Is there a reason that Geospatial support hasn't been implemented? You could add a GeoPoint datatype as a tuple with an internal geohash and specify a CF as containing geo data. From there you can choose the behavior as having the geo data being a secondary index, or a denormalized SCF. That could lay

Table with coordinates of a hexagonal grid that covers the world

假装没事ソ 提交于 2019-12-05 21:39:50
Looking for an implementation in PostGIS for generating a hexagonal grid that covers the the whole planet in order to aggregate data over each hexagon. Any pointer in the right direction would be of great help! End product: - A table containing the center point for each hexagon in a hexagonal grid that covers the whole world. - The hexagons have a fixed area Some time ago I adapted a function to generate hexagons that might be exactly what you're looking for. It takes the parameters cell width, and the coordinates for southwest and northeast corners, and generates a hexagonal grid. CREATE OR

get location when pages loads

穿精又带淫゛_ 提交于 2019-12-05 20:45:57
I am Building a website useing HTML, CSS and Java script. I am wanting to get the location of the user when page loads. so they do not need to press a button. I was hoping some one can help. !DOCTYPE html> <html> <body> <p id="demo">Click the button to get your coordinates:</p> <button onclick="getLocation()">Try It</button> <script> var x=document.getElementById("demo"); function getLocation(){ if (navigator.geolocation){ navigator.geolocation.getCurrentPosition(showPosition); } else{ x.innerHTML="Geolocation is not supported by this browser.";} } function showPosition(position){ x.innerHTML=

Determine if a string is a valid geographic location

南笙酒味 提交于 2019-12-05 19:04:43
I've got a bunch of "locations" - some are accurate (gaborone, botswana), some are geocodes (40.75,-73.997) and some are completely useless (#siliconcape). I need to find a way to run through the list and determine the City and Country of each string and geocode, and return nulls for the invalid locations. Is there some sort of library/service/api/method that can be used to determine whether or not a given string represents a valid geographical location? While accounting for typos, ordering errors, etc? Probably the easiest method would be to use something like the Google Geocoding API . It'll