geolocation

Expected ratio of ServiceWorker instances to Geolocation Updates

一个人想着一个人 提交于 2019-11-29 11:32:32
EDIT: There is a new version of my Brotkrumen Web App in the same location. Most important design/proposed-specification change is that TravelManager subscription should now be Client specific. The TravelEvent must contain the intended Client.id (TravelEvent.source.id). This means that the UA must monitor and filter GeoLocation updates per client. I have also added new demo functionality such as a Trip Summary that is displayed when you press the "Arrive" button. The trip can also be replayed onto Google Maps by pressing "Map Trip" or "Replay". If the last and next geolocation updates for the

Mongodb : Check if a point is inside a stored polygon

房东的猫 提交于 2019-11-29 11:22:06
问题 I'm new to the mongodb geolocation features. I stored some polygons that represent the country borders in a database along with the country name. Now what i would like to do is checking which country a point is in. For example if i give my own geolocation i would like to get the country where i am. Is there a way to do it with mongodb? Maybe with geoWithin? Thank you 回答1: You must store your location data like this schema: {"loc": {"coordinates":[ [ [1.0,1.0], [1.0,10.0], [10.0,10.0], [10.0,1

Is there an easy way to determine which hemisphere a user is in?

 ̄綄美尐妖づ 提交于 2019-11-29 10:54:59
I'm working on a project which includes seasonal content, and we're thinking of determining the user's location to work out what season it is for them. The obvious way of doing this is to Geo-locate their IP, then grab the latitude. > 0 is Northern hemisphere, and < 0 is Southern. I'm happy to go that way - though it seems a bit of a waste to pinpoint an IP to an exact location, just to determine which half of the planet they're on - but I thought I'd throw it out there in case anyone has any tricks which might shortcut the process. Request headers, stuff that can be extracted with JS on the

W3C geolocation API not working on Safari 5

痞子三分冷 提交于 2019-11-29 10:36:05
W3C geolocation API doesn't seem to work in safari 5. I tried this page and it sort of tells me that Geolocation is unsuccessful. The code: http://code.google.com/apis/maps/documentation/javascript/examples/map-geolocation.html can somebody explain me why this is so? gerbz Looks like geolocation in safari only works when you're connected to wifi (not wired): Geolocation in Safari 5 I'm using Safari 5.0.5 on Mac Snow Leopard and clicking after on your link I was getting Error: The Geolocation service failed Try enabling the location services in Safari. Go to Preferences->Security and check

How to find distance between two addresses? (Java server side)

£可爱£侵袭症+ 提交于 2019-11-29 10:33:29
问题 I have a "social" geographic aware application I'm developing, and the million dollar question is how do I list a set of items that are "within X miles" of "my location" since there are million applications that do that, I was surprised to find that only Google Maps API has a free web service for that, and worse, it is only supported if used within a Google Map. So do I have to develop my own distance calculator? is there any free / paid service that will allow me to at least transform an

Geolocation distance SQL from a cities table [duplicate]

不羁的心 提交于 2019-11-29 10:29:27
问题 This question already has answers here : Calculate distance between 2 GPS coordinates (27 answers) Closed 4 months ago . So I have this function to calculate nearest cities based on latitude, longitude and radius parameters. DELIMITER $$ DROP PROCEDURE IF EXISTS `world_db`.`geolocate_close_cities`$$ CREATE PROCEDURE `geolocate_close_cities`(IN p_latitude DECIMAL(8,2), p_longitude DECIMAL(8,2), IN p_radius INTEGER(5)) BEGIN SELECT id, country_id, longitude, latitude, city, truncate((degrees

Is It Possible to get a (rough) Mobile Phone Location from a HTTP Request

烂漫一生 提交于 2019-11-29 10:24:40
If memory serves me correctly, google does this for the maps site. I know google's mobile maps app can determine the rough location (I assume using some kind of cell tower lookup), yet I seem to remember the site getting somewhat close to the current location when viewing on a mobile browser. Anyone know how/if that's possible? Does the IP address change based on the tower or area (seems like they'd be using some kind of gateway common to the carrier)? With a regular HTTP request the only option you have is GeoIP but this will only give you the country & operator no better. Depending on the

Using geocoder on production server

跟風遠走 提交于 2019-11-29 10:22:25
问题 I am developing a location based application. And i need a trustable source for getting geolocation. right now i am using this geocoder plugin. and i am getting this error:- Geocoding API not responding fast enough (see Geocoder::Configuration.timeout to set limit). I am getting error when our team of 5 is testing on staging servers I need a fast enough solution with some ~10k request a day with no per second limits PS: I am open to use some paid service. EDIT Think of a case you want to

IllegalArgumentException thrown by requestLocationUpdate()

强颜欢笑 提交于 2019-11-29 09:54:34
We recently tested our application against android API level 14 and 15. We started development targeting minimal SKD Version 8 and excluding tablets (3.x). With 2.x everything works well but when running the app on a 4.x droid it crashes at the point we're obtaining user's location. FATAL EXCEPTION: main java.lang.RuntimeException: Unable to create service java.lang.IllegalArgumentException: provider=network at android.app.ActivityThread.handleCreateService(ActivityThread.java:2263) at android.app.ActivityThread.access$1600(ActivityThread.java:123) at android.app.ActivityThread$H.handleMessage

Mysql spatial distance using POINT - Not working

戏子无情 提交于 2019-11-29 09:49:08
问题 My goal is to use mysql POINT(lat,long) to find nearby entities in the database. I'm trying to do something like in the bottom of this tutorial http://www.scribd.com/doc/2569355/Geo-Distance-Search-with-MySQL . Here is what I have got: Table: CREATE TABLE mark ( id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(20) DEFAULT NULL, loc POINT NOT NULL, SPATIAL KEY loc (loc) ) ENGINE=MyISAM; Inserting some test-data: INSERT INTO mark (loc,name) VALUES (POINT(59.388433,10.415039),