|
GeolocationAPI
Provides the geolocation of a device running a Gears-enabled web browser.
Since Google Gears has been shut down since March 2011, the time has come to also say goodbye to the Geolocation API that powered Google Gears. The Google Gears Geolocation API will stop responding to requests on November 17, 2012. Note that the JSON protocol described here was originally published to allow developers to provide their own network location server for use through the Gears API. Since Google's network location server was only to be used through the Google Gears API, which is no longer available, no developers should be affected by this change. |
► Sign in to add a comment
The information seems complete except for:
What's the URL for the HTTP POST request?
Any example of how much (read: little) info I need to send if I have only cell info from one cell?
Any thoughts of using URL arguments as input and XML as output? Easier to use from other languages than Javascript.
My scenario doesn't involve Gears.
Cheers
aggree with redsmurph!
another question, the source looks like a Symbian code other than web or windows application, maybe a background introduction is better?
Regards Peng
What is the highest accuracy attainable for: 1. Fixed broadband locations? 2. Mobile devices?
Accuracy improvement suggestion: Have you considered averaging locations of individual cell sites in data sets where they are the only cell site detected by mobile devices?
i.e. where movement is - on average unrestricted and evenly distributed - clusters of mobile devices around a single point should return locations as a cluster averaged on the true position.
Does anyboy know the url to post?
is this API need API Key; for, i always got 404 Error
The URL works for me, but any request i get this message:
Bad Request Version not supported.
Found: use "version":"1.0"
Are API and service subject to agreement? (as all Google services are) if Yes where ?
I noticed that you can add as many cell_towers you want, but longitude and latitude remains unchanged. Like only first CellID is taken in consideration.
More cellIDs input shouldn't give more precise position?
Randy P. SMith 4601 S Crysler Independence, mo 64055 - 35833 358-2638
Is it according to GOOG's terms and conditions to use the server side facilities of Google Gears location API by "hand rolled" HTTP POST request?
Although this blog seems not to be moderated, here some obscurities, probably someone notes that:
1) According to the doc, the cell_id element is of string type. According to the sample it is of int. Both is accepted, so please fix the doc.
2) mcc and mnc are Int32 outside the cell_id struct (inside int16). Should be unified.
3) Shouldn't the cell_towers struct contain the carrier element too?
4) At least for german locations I tested the returned address object (if reverse geocoding is requested) does not contain street and house number information, although this information is given in "ordinary" geocding mode. Is this "by design"?
Regards
... the latter "although this information is given" is meant: If provided street and street number a valid geocode (which may be resolved on a map) is returned using Google Maps geocoding functions. Reverse geocoding of the same geocode using Gears location api does miss the street/street number info. Sorry for being not specific enough.
Sorry to echo MrPatrol? and Neil Young on this; is there a proper method to establish a contact with google for business/commercial licensing? I would like to make a proposal; however, it is important to me to make sure that it profitable enough for google so that it is worth their time. Steve Block, or anyone at google, I can be reached at nine seven two 659 1626 extension 150. Thanks and my appologies for the unstructured inquiry and contact request. Ray B
"the location API also has the ability to send various signals that the devices has access to (nearby cell sites, wifi nodes, etc) to a third-party location service provider, who can resolve the signals into a location estimate.
The protocol between the device and the location service provider is HTTP POST."
Who is the third party location service provider? Is this currently Google or ? How can I send money to Google for this service?
Thanks for the comments. A few answers ...
> 1) According to the doc, the cell_id element is of string type. According to > the sample it is of int. Both is accepted, so please fix the doc. The server will accept an integer because we use a JSON format, so JavaScript? type conversion rules apply. I've updated the sample to use a string to avoid confusion.
> 2) mcc and mnc are Int32 outside the cell_id struct (inside int16). Should be > unified. This document was used for development work. The JSON format in use by Gears makes no distinction between int16 and int32. A definitive user-facing document for the JSON format will be posted soon.
> 3) Shouldn't the cell_towers struct contain the carrier element too? No, A device can be in contact with multiple cell towers, it can only use one carrier at a given point in time.
> Who is the third party location service provider? Is this currently Google? The Geolocation API allows the user to specify the network location provider, but the default is the Google provider. See the Geolocation API documentation for details.
In general, it's best to post questions to one of the Gears mailing lists, rather than here.
Steve
I extracted the necessary values from my Sony Ericsson K810 which has no GPS or wifi using: String cellid=System.getProperty("com.sonyericsson.net.cellid"); String mcc = System.getProperty("com.sonyericsson.net.cmcc"); String mnc = System.getProperty("com.sonyericsson.net.cmnc"); String lac = System.getProperty("com.sonyericsson.net.lac");
I then hand rolled a python script to call the given URL with the specified json object, using these values. First of all, I got a JSON Bad Parse error because the service didn't like the lac and cellid which appeared to be in hex and I sent as strings. I tried again using the decimal conversions of these values and got a 200 OK status, but an empty Json object. I tried once more with some random cellid and lac values and in some cases retrieved the expected result with lat and lng values etc.
When I use the Google Maps j2me app, it is able to resolve my location at the same position. Does it use any different technology to resolve location? What are any possible reasons that my hand rolled request is not getting resolved? And finally, am I violating the terms of use by calling the service directly and not using the gears framework?
Thanks for your time, Harry.
It seems that the Geolocation API is able to automatic retrieve cell-id information,and the Geolocation API can use the cell-id information to get user's location. All above what I say is right or not ? I am confused if the API can automatic get location ,how it determine via cell-id or GPS (If my device have all) Can I specify the Geolocation API to get location via cell-id?
There are some curious little parsing problems with json responses. Latitude and longitude CANNOT be integers, but can be '20.' or '20.1'. horizontal_accuracy MUST be an integer, since if a float, you get a malformed response error. I suspect there are other problems like this in how the parser handles json responses. So if pulling your hair out over malformed response errors, look at integer vs. float values.
Steve- given that wimax networks now exist (XOHM), can we talk about updating this API to support wimax? Not to mention that Google is an investor...
Hi, I love it ;)
What are the terms of usage of anything on the www.google.com/loc/json portal?
Specifically, it says in the TOS that you can't use google services other than through provided APIs .. is connecting to the www.google.com/log/json with a web request and providing the JSON request above as part of the request breaking this or is it part of how it's intended to be used?
Steve thanks for your answers above. I didn't know about the multi-provider-single-carrier issue, but this sounds logical, if thought twice :)
Currently I'm trying to make the get_location run with just a WiFi? BSSID, but it always returns a position, based upon my IP (far, far away). I'm doing this using BSSIDs, which are resolvable using SkyHookWireless?' API. Q: Does Gears support WiFi? - only based positioning currently? GSM cell based positioning works fine.
Regards
Is there a way to connect the GeolocationAPI to '''GPS''' devices API (satellite positioning is becoming now very widespread in many mobile devices, including now some mobile phones not just GPS navigation devices, whose prices have dramatically dropped)?
Also the retreived geolocation should be able to list '''several locations''', if present in the client device, each one tagged with the source provider (generic IP geolocation, WiFi? provider, GSM carrier, GPS..), allowing users to view which one is most aaccurate and use one of them (the position.accuracy field is not always consistant)
For IP geolocation, there are several databases on the web, more or less accurate or up to date. But for many Internet providers, this just gives the location of the ISP office (as registered in the WHOIS database for the assigned IP address block), because IP addresses are assigned randomly by the ISP at each connection (only the ISP knows the exact routing to the connected client). In addition, once they are assigned, these IP blocks are not always maintained if their use by the ISP change over time (for example when an ISP deploys new BAS equipement for ADSL: the IP does not necessarily indicates the physical DSLAM, but most often only a BAS which may be located anywhere in the country, and even sometimes in another country). For ISP customers connected by modem through POT lines, this IP location may even be completely non significant. all that can be said from this IP is that it belongs to the network of some ISP.
One the opposite, some IP locations may be very accurate, such as the IP addresses provided by FON wifi hotspot (if the hotspot is fully parametered by its maintainer). Connection through cable TV or fibre providers may also provide much better positioning (but this often requires some acces to some database, not just reverse-ip DNS and WHOIS data).
Note: not all devices require authorization, the IP address notably is public.
Please update the response information to match what google gears currently does. 'accuracy' is a new property and it is required. horizontal_accuracy and vertical_accuracy are gone. Using them instead of accuracy causes a malformed response error. Thanks.
Thanks for all the comments. A few responses ...
- Answers to many of the questions about use of the API can be found in the Geolocation API documentation at http://code.google.com/apis/gears/api_geolocation.html. This Wiki page is intended to document work in progress for those developing Gears, not to serve as definitive documentation of the API.
- Regarding the JSON protocol, I've updated this document to reflect the current behaviour in Gears. Note that official documentation of the protocol will soon be added to the Geolocation API documentation.
- The Gears Terms of Service prohibits direct use of the Google location server (http://www.google.com/loc/json) via HTTP requests. This service may only be accessed through the Geolocation API.
Hi,
I was in Fance few weeks ago and was suprised by some of the results i got back: (data as: MCC, MNC, LAC, CELL_ID)
First result was great for data : 208 10 28602 7473 (45.823502, 6.724991)
Second result was not so great for data : 208 10 6 6961 (55.952674, -3.189814) The second result is in Scotland, Edinburgh
MCC and MNC are the same for both datas....should you do reverse geo coding to make sure the location match the MCC? (i think it will be better to return no result when the MCC doesnot match the lat, lon)
Thanks
Hi,
Could any of you help me with sending a JSON object via a http POST request in Symbian C++ or just C++ code?
Thanks
Hi,
it would be great if You could integrate a form field in the Gears Location settings for defining a certain location manually (as a fallback position or if You want information for a different place than where You are). It would even better, if users could create several "location profiles" (for example: actual location, at home, my favorite place in Paris, ...)
i was wondering if its possible to get teh SSIDS and Cell information from google gears too
Will Google ever release a public API for use outside Gears?
Plz can anyone give one sample request using IP
Hello,
I am wondering if any of you had any luck? please shed some light on this.
My codes like below
int bid = CDMAInfo.getCellInfo().getBID();
API returned the location somewhere is in LV.
Regards!
Hi If I am not mistaken ,in order to use this API we need to provide the "MCC, MNC, LAC, CELL_ID" ? Is there anyway this API can be used just with cellid information ?
Even I am working with a CMDA device and can not get the correct value when I use this API. btw my LAC (nid = CDMAInfo.getCellInfo().getNID();) kept on coming out to be zero.
Randy SMith 4601 S Crysler Independence, mo 64055 - 35833 358-2638
Wow! Absolutely impressive!
This API rocks!
Randy SMith 4601 S Crysler Independence, mo 64055 358-2638
Randy SMith 4601 S Crysler Independence, mo 64055 358-2638
It's great to see these capabilities being adopted in state of the art browsers like Safari, Firefox, and the Android browser. Did you know it's also possible to use geolocation across even legacy browsers on feature phones? Contact me at Useful Networks for more info. www.useful-networks.com
Randy SMith 64055 S Crysler Independence, mo 64055 35833 358-2638
Randy SMith 64055 S Crysler Independence, mo 64055 35833 358-2638
now, google geoolcation api can not support Mobile.Only it support Wifi...Oh, My god... wo want app it at www.ipkaka.com sorry. i am a chineseman. Enlish is poor
I am totally confused, is there a way to send the request directly using HTTP POST or not?
If yes, can someone please post an example? Thank you.
I want to know if it is possible to get location via HTTP POST, too.
I need to get location of external modem, then I want to send gsm cell info from modem to other pc and see the position in the pc. How can I do that???
Thanks in advance...
info was too overwhelming for me.
Hi! zg911.cn! Are you sure the google geoolcation api can not support Mobile now? Indeed I also found that the google geoolcation api is unstable.But I can not confirm that the wrong if of google geoolcation api or my code! This problem has troubled me for days , I hope you can help confirm. Thank you.
Can anyone give an example using HTTP POST with PHP? Thanks!
Can anyone give an script of geoolcation for mobile? Thanks!
Randy Smith 4601 S Crysler Independence, mo 64055 35833 358-2638
I just successfully tested this on a mobile device - a Vodafone HTC V1615 running Windows Mobile 6 Professional. I used the following to test:
http://code.google.com/apis/gears/samples/hello_world_geolocation.html
Does this require that the mobile device or computer have gears installed on it to work?
6+
Thank you!It is so amazing which really helps my work.
thanks quite interesting .
I code PHP version that works perfect with googleapi. It needs only 2 infos, cellid and location area code to work worldwide. For sale. Interested customers please contact me.
google: what's the limit reqs/sec for this?
Same problem!
It works fine before on my Blackberry, but now returns 400 error both on emulators and on real device
I'm sorry, I meant GSM parameter (MCC, MNC, LAC, CID), not GPS. That was my mistake.
Can someone teach me how to download a tracker on my pc please
hello, my project depends on the answers from google, and now how do I do?
help please Helppppppp
the API can be accessed here: https://developers.google.com/maps/documentation/business/geolocation/ you need an api-key and the limit per day are very low...
hello,I always fail to use The Google Maps Geolocation API. I follow the Geolocation requests,for example:"https://www.googleapis.com/maps/api/geolocation/v1/geolocate?key=API_key", and always get 404 for respond
who can tell me why?
I tried the same return 404
Oh ! God .. Can someone tell me other location api ?
Hi! I need to use the Google Maps Geolocation API. https://developers.google.com/maps/documentation/business/geolocation/
I send to the server (www.googleapis.com):
I receive from the server:
How use this service? I tried many different variants unsuccessfully... Thanks!
I spoke with a representative from google to see how this works api, and surprise, this api is only used for mobile ... but now and as we do with desktop applications? ... good then I just thought Skyhook ... so far no one gave me a solution that works the same as google gears for desktop.
I await ideas ...
Guys, the correct URL should be "https://www.googleapis.com/api/geolocation/v1/geolocate?key=API_key", I spent a whole day to figure this out...
Anybody knowing the pricing of this API for 10000 requests/day? 100requests/day is too limited.
Any geek got any solution why http://www.google.com/loc/json stopped working
is anybody has new method about this! help!
https://www.googleapis.com/geolocation/v1/geolocate?key=API_key query any cdma returned 404 not found
Dear all,
1)return error information as follows: {
} 2)I implement as follows: public class SCell{ }test cara meningkatkan penjualan online
you can delete it
After a few minutes search I found this:
https://developers.google.com/maps/documentation/geocoding/?csw=1#Geocoding