Gears Geolocation and Java

50 views
Skip to first unread message

Prognose85

unread,
Jan 5, 2009, 7:41:41 AM1/5/09
to Gears Users
Hi,

does anybody know if it is possible to write a Client for the Gears
Geolocation API in Java?

Thanks!

Austin

unread,
Jan 5, 2009, 1:55:06 PM1/5/09
to gears...@googlegroups.com

Hi,

It seems like you are trying to access Google location server directly.  I'm
afraid this would violate the Gears Terms of Service. Direct use of the
server using the JSON protocol is prohibited. See section 5.3 of
http://gears.google.com/tos.html

You can only use the Google location server through the Gears JavaScript
Geolocation API. See http://code.google.com/apis/gears/api_geolocation.html.
We publish the JSON protocol to allow third parties to implement their own
server, which Gears can then be configured to use instead of the default
server provided by Google.

Hope that helps,
Austin 

Prognose85

unread,
Jan 6, 2009, 1:47:16 PM1/6/09
to Gears Users
Hi Austin,

but the getCurrentPosition function offers the possibility to use
anothrt location Provider

geolocation.getCurrentPosition(successCallback,
errorCallback,
{ enableHighAccuracy: true,
gearsRequestAddress: true,
gearsLocationProviderUrls:
['http://localhost/myLocationProvider']
});

It is not allowed to write an own Location provider Web Services,
which will be called by the getCurrentPosition method of Gears?

Thanks!

Austin

unread,
Jan 6, 2009, 1:53:01 PM1/6/09
to gears...@googlegroups.com
Yes you are allowed to specify your own location server.  Sorry if I have misunderstood your original question.  I thought you were trying to access Google location server directly outside of the Gears JavaScript API, which is not permitted with respect to our TOS.

Austin

Prognose85

unread,
Jan 6, 2009, 2:07:16 PM1/6/09
to Gears Users

Hi Austin,

thanks for your fast answer!

I want to write my Location provider as a Web Service in Java. Is
there any example of how to write an own Location proivder for gears?
I thougth of using Axis2 which supports JSON, but don't really know
how to start.

Austin

unread,
Jan 6, 2009, 2:13:36 PM1/6/09
to gears...@googlegroups.com
Hi,

I am not aware of any location provider implementation in Java.  The protocol is fully specified in this wiki page, perhaps it can be of some help to you - 


Austin
Reply all
Reply to author
Forward
0 new messages