Geolocation-enabled build
By maxfroumentin. Thursday, 26. March 2009, 10:42:48
We are delighted to release the first build of Opera with geolocation support. The geolocation Working Group of the W3C has recently relased the first Working Draft of the geolocation API specification, and we are now releasing the first Labs build with support for the API.
The API is used in a web page's Javascript code to retrieve the current latitude and longitude of the browser. The following snippet shows how a web page would request the browser's location:
// One-shot position request:
navigator.geolocation.getCurrentPosition(showMapCallback);
function showMapCallback(position) {
// Show a map centered at (position.coords.latitude, position.coords.longitude).
}
As you can see, the API is very simple, and doesn't get much more complicated with more advanced functionalities (see more examples from the specification)
Geolocation on the web is not new. Many sites already use the IP address of the browser to serve targetted content, mostly ads (you will have seen the 'Find a Friend in [your city]' banners). However, that method is notoriously inaccurate and cannot be reliably used for more advanced geolocation services. On the other hand, the device which the browser is running on is more likely to have an accurate idea of its location if it has a GPS unit or can triangulate the wireless access points or cell towers, or look up its IP address. Even if the device doesn't have the right hardware, a location provider web service can be used. This build uses the Skyhook service, and therefore you will need to register your site on loki.com in order for your geo-enabled web application to be allowed to request the locations of users. Additionally, if you're running Windows XP you will also need to run svcsetup.exe, which ensures that wifi scanning will not be affected by various "wifi managers" that are shipped with many laptops. All this won't be necessary in future releases, but for now if you experience crashes, it is likely because you need to run svcsetup.exe first.
More importantly, leaving it to the browser to transmit its location means that the user can remain in control of their privacy. This build will prompt the user if they agree to send their location, every time a site requests it. While the UI in this build is experimental, it provides one possible way of protecting the user's privacy.
The W3C Geolocation API is likely to become a widely adopted standard, and Opera is providing this early implementation of the API to let developers and users start experimenting with it. We would be very grateful for feedback from both developers and users, on the API itself and on what functionality and level of privacy control you would like to see exposed in the user interface.
Once you have installed this build, you can go and test it out on our geolocation demo page, which will show were you are on a map, and will display scheduled near you.


Tamil # 26. March 2009, 12:00
godjonez # 26. March 2009, 12:17
This is in 32-bit Windows XP Professional, SP3.
EDIT: Managed to get it to work, a problem with the skyhook program.
sirnh1 # 26. March 2009, 12:20
Originally posted by maxfroumentin:
Sounds nice. Haven't tried the build (yet), but is there also an option (in the interface) to never show the prompt, but allways automaticly either refuse or allow the request no matter what page/site you are viewing?
Zotlan # 26. March 2009, 12:36
Originally posted by sirnh1:
You can set it to remember your decision per site.
The Wingogi builds are meaningless as far as interface is concerned though. They're there to test the engine. They don't even use Opera's regular interface.
EDIT: interestingly www.nu.nl (very popular Dutch site with news snippets) also asks for your location but Wingogi crashes when you say yes.
sirnh1 # 26. March 2009, 12:49
Originally posted by Zotlan:
I know, but only realized it was a 'wingogi' build when I was unzipping my download
mgillespie # 26. March 2009, 13:30
Is this an indication that the 9.x line of Opera may be getting the new Presto Engine, before Opera 10 arrives???
Hmmm, interesting.....
Chas4 # 26. March 2009, 13:49
olli # 26. March 2009, 14:02
sirnh1 # 26. March 2009, 14:23
It didn't even seem to try to load the page...
EDIT: The test build says: "What's on near you. Showing events near Amsterdam". Sorry to say but Amsterdam is not where I am. (Amsterdam is in the netherlands, and I'm in belgium)
Yes I did run svcsetup.exe first, but still have a few dozen crashes...
Hmmm... 9 posts and 3 from me. I think I'll stop playing for today...
Eddie_Lopez # 26. March 2009, 14:36
ariesptn # 26. March 2009, 17:01
Galileo # 26. March 2009, 18:34
elvasvj # 6. April 2009, 12:05
netwolf # 24. June 2009, 14:24