W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2013

Re: [whatwg] Request: Implementing a Geo Location URI Scheme

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 7 Jun 2013 15:30:29 +0000 (UTC)
To: Rodrigo Polo <rodrigo.polo@gmail.com>, Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net>, Glenn Maynard <glenn@zewt.org>, Julian Reschke <julian.reschke@gmx.de>
Message-ID: <Pine.LNX.4.64.1306071511450.2772@ps20323.dreamhostps.com>
Cc: whatwg@lists.whatwg.org
On Tue, 4 Jun 2013, Rodrigo Polo wrote:
>
> Many apps and web browsers make very difficult to work around geo 
> location data, making a URI scheme available in all web browsers could 
> be great, just like "mailto:" opens an email client "geo:" could open 
> your default maps app on desktop or mobile devices, here I give you a 
> more detailed review, an open letter to all web browser devs: 
> http://rod.gs/fixgeo

It's not exactly clear what you want changed to the browsers or the spec. 
As far as I can tell, geo: is already supported the same way mailto: is.


On Tue, 4 Jun 2013, Rodrigo Polo wrote:
>
> I know the "registerProtocolHandler" but it doesn't work exactly as 
> proposed, "geo" "protocol" isn't accepted on Chrome only "protocols" 
> with the "web-" prefix

It should work; it's already listed in the spec. I recommend contacting 
Chrome developers or filing a bug (http://crbug.com/, click New Issue).


> and the URL parameter have to match the webpage that make the request, 
> it is designed for websites, not for local apps

Yes, registerProtocolHandler() is for Web apps. For native apps, the apps 
need but use the platform-provided way of registering a URL handler or URL 
intent, for the scheme "geo:", the same way they do for mailto:.


On Wed, 5 Jun 2013, Julian Reschke wrote:
> 
> If you want to "geo" URIs to invoke a local mapping application, all you 
> need is to install an URI handler fort that scheme and that application 
> in the *operating system*. This is how things like mailto: have been 
> working for two decades now.

Indeed.


On Wed, 5 Jun 2013, Rodrigo Polo wrote:
>
> Hi, well, the "kind of support" I think should be implemented is 
> actually something that should be a standard, any anchor that have a 
> "mailto:" inside is supported out of the box in any web browser and the 
> first time it is clicked the web browser asks for the default app to 
> open that link.

As far as I can tell, clicking geo: links does exactly the same as 
clicking mailto: links, at least in Firefox and Chrome.


> So, the main idea is to establish a standard way to handle geo location, 
> first by making the URI scheme available on all web browsers and letting 
> the user decide whether he wants to use a local app or a web page to 
> access the links with the URI scheme just as it is done with the 
> "mailto:" URI scheme, second step has to be done by the maps developers, 
> they have to give a way to receive this geo location information from 
> the browser and show the user the location, it could be by a URL or a 
> parameter sent to the local binary/executable.

As far as I can tell, this is done. If it is poorly implemented, then 
please file bugs with the implementors.


> I know this is something that can be achieved very easily by the web 
> browser developer and the maps app developer, the main thing is to make 
> it an standard that everyone uses and that everybody know that it will 
> work just as it works the "mailto" URI scheme today, I'm very confident 
> that most of the users will appreciate it.

I think such standards already exist, both in the form of a geo: URL 
scheme and in terms of registerProtocolHandler() allowing 'geo:'.


> The common day to day applications are infinite, useful and enjoyable for
> anyone, here some examples:
> Twitter able to "detect" a geolocation on a tweet and make it a geo link
> (anchor) so it can be clicked and it will open your map app.

Twitter could implement this today; I recommend approaching them to do it.


> Receiving an emails with geo location coordinates on a link instead of an
> address and when you click it it opens your preferred maps app or webpage
> and not the one the user "force" you to see.

E-mail writers can do this today.


> Common websites have a contact page that can omit showing a map or an
> address and instead show a link with the geo location.

Web sites could do this today.


> Chat apps like WhatsApp can share geo locations that open on your default
> app and not into a frame inside that app giving you de possibility to just
> press the "directions to that location" to find your way to that point.

This is already possible. Indeed on Android (not sure about iOS) it's 
pretty standard for apps to give geographic/navigation intents.


> Faceboook fan pages or business pages can have a geo location link and 
> with just a click I can see the location and get directions to that 
> place.

This is possible today. Facebook (or facebook users) just have to provide 
the geo: link, and geography software or Web sites just have to register 
to handle the URL.


> The possibilities are limitless but for that to happen it is required 
> that everyone agrees on enabling this URI scheme on all web browsers.

As far as I can tell, it is already enabled, modulo some bugs.


> BTW I know that app makers can add their own URI handler just as the 
> "magnet" handler works on bittorrent clients, but again isn't available 
> in the markup out of the box.

I don't understand what you want out of the box.


On Wed, 5 Jun 2013, Rodrigo Polo wrote:
>
> You are completely right, but in the tests I made on Chrome the "geo" 
> URI handler can't be used with the "registerProtocolHandler" call, it 
> throws a security error and the use of geo location URI it is not 
> included as a "recommendation" or "good practice" when we talk about the 
> markup, so it is not a technical thing, it is more an idea that could be 
> included in further discussions between web browsers developers, map app 
> developers and the users so everyone adopt the idea of having the geo 
> URI scheme adopted as an standard, I'm quite sure this idea can help a 
> lot of users and web developers to give a better user experience and it 
> is more important that many other things, it will make the life of users 
> a lot easier.

Well, that's an issue of advocacy, more than standards. 


On Wed, 5 Jun 2013, Julian Reschke wrote:
> 
> That being said: I agree that "geo:" should be added to the white list 
> so that browser-based handlers for "geo:" become possible.

It's been on the whitelist since last October.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 7 June 2013 15:30:59 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:22 UTC