Thank you all - v2 map viewer upgraded to v3. Comment on browser detect.

936 views
Skip to first unread message

Joseph Elfelt

unread,
Jul 24, 2010, 12:57:37 PM7/24/10
to Google Maps JavaScript API v3
Thank you to those who so generously share their time in this forum to
help others, including myself, up the learning curve. I have an eye
out for questions that I may be able to answer to help pay the favor
forward.

Now about browser detecting....
In v2 we had GBrowserIsCompatible(). In v3 we are on our own.
Alas, what’s a poor v3 developer to do?

Here’s the list of browsers officially support by v3:
http://code.google.com/apis/maps/faq.html#browsersupport
In addition, there appears to be some unofficial support for Opera.

Here’s a link to the browser detect routine I wrote. It’s in php but
could easily be ported to javascript. Please feel welcome to use it
if it can help you.
htttp://www.mappingsupport.com/forum_post/ browser_detect.txt
My app displays a warning message if the user’s browser is not on the
officially supported list and then the app tries to launch and produce
the requested map.

For more info on the murky world of browser detecting:
http://www.zytrax.com/tech/web/browser_ids.htm
http://www.quirksmode.org/js/detect.html

And if you are curious, my app is called Gmap4 which I audaciously
refer to as an enhanced Google map viewer. For example:
http://www.mappingsupport.com/p/gmap4.php?q=http://www.mappingsupport.com/p/gmap4/helpfile/Stafford_Creek.kml&t=t2

Homepage: http://www.mappingsupport.com/p/gmap4.html

Joseph Elfelt

unread,
Jul 24, 2010, 3:28:14 PM7/24/10
to Google Maps JavaScript API v3
Oops - Looks like a space sneaked into the link to the browser detect
code snip. Try this one:
htttp://www.mappingsupport.com/forum_post/browser_detect.txt

Pil

unread,
Jul 25, 2010, 3:56:42 AM7/25/10
to Google Maps JavaScript API v3
Browser sniffers are generally not a good practice. Even in this case
I wouldn't use them nor recommend them for the follwing reasons:

IE 7 is supported whereas IE 6 is not. There is not much difference
between those out-dated browsers, so I'd expectt that IE 6 can in fact
execute and diplay most of the maps features.

FF 3+ is supported whereas FF 2 is not. FF 2 is (compared to IE 6 and
7) a highly develepod and modern browser. So I'd expect that FF 2 is
able to display all of the maps without problems.

Opera isn't officially supported althought it's a modern and up to
date browser - although with slight failures here and there. All in
all I think it's not a sufficient reason to exclude this browser
because it isn't supported.

There are a few other Mozilla flavoured browsers whose abilities can
be compared with newer Firefoxes, althought their identity
(i.e .userAgent string) is different. Again no good idea to exclude
them.

Kesuke

unread,
Jul 25, 2010, 8:26:20 AM7/25/10
to Google Maps JavaScript API v3
Personally I like broswer detection scripts. I use a 'high-standards'
version, where I won't accept anything below firefox 3, IE8 and
similar. The key thing is to make sure you direct people to a message
explaining why they weren't able to see your site and how they can
upgrade (rather than just stone-walling them).

These days installing browsers is f*ing ridiculously easy, and most
operating systems prompt or automate the process. So my logic is that
users have a duty to keep their browser up to date - otherwise a
minority are holding back the website (and indeed the entire web) for
everybody.

The broad range of available browsers has created an environment where
it is now the job of the browsers to accomodate US as developers (gone
are the days of having to bend over backwards to get IE6 working!) -
because users have demonstrated they will happily jump ship to
platforms with the best user experience. Hence why IE went from a
market share of 95% in 2003 to 60% in 2010 :)
> > htttp://www.mappingsupport.com/forum_post/browser_detect.txt- Hide quoted text -
>
> - Show quoted text -

geoco...@gmail.com

unread,
Jul 25, 2010, 11:32:52 AM7/25/10
to Google Maps JavaScript API v3
On Jul 25, 5:26 am, Kesuke <Nick_dai...@hotmail.com> wrote:
> Personally I like broswer detection scripts. I use a 'high-standards'
> version, where I won't accept anything below firefox 3, IE8 and
> similar. The key thing is to make sure you direct people to a message
> explaining why they weren't able to see your site and how they can
> upgrade (rather than just stone-walling them).
>
> These days installing browsers is f*ing ridiculously easy, and most
> operating systems prompt or automate the process. So my logic is that
> users have a duty to keep their browser up to date - otherwise a
> minority are holding back the website (and indeed the entire web) for
> everybody.

Where I work (as in many large companies) the IT department does not
allow me to install software. There is a corporate standard, and
right now it is IE6...

So you are preventing me from using your website during the majority
of the day...

-- Larry
> > > htttp://www.mappingsupport.com/forum_post/browser_detect.txt-Hide quoted text -

Joseph Elfelt

unread,
Jul 25, 2010, 1:10:05 PM7/25/10
to Google Maps JavaScript API v3
Well this is all quite interesting.

OK, for now I have disabled the browser detect code in my app.
I certainly don't want to leave out Larry :)

The 'Help' file for the app has a section listing the officially
supported browsers/OS combinations and states that other combos may
or may not work.

Kesuke

unread,
Jul 25, 2010, 1:15:20 PM7/25/10
to Google Maps JavaScript API v3
I see your point, although on my main site (3500 regular members,
monthly pageviews of around 75,000) we've seen a steady drop in IE
use. We are slightly skewwed since we cater to a specific 17-26 age
group in the UK, and the younger ones especially tend to have
computers that are new within the last 2 years. But grabbing our
analytics for the past month;

IE - 38.48%
Firefox - 29.65%
Safari - 16.22% (inc iPhone)
Chrome - 13.64%
Opera - 1.19%

Of the IE users, 30.7% are not using version 8 (most of those are
using 7). So basically only around 12% of our total users are not
using a modern browser. Our view is that we will not compromise the
experience for the other ~90% to accomodate them when they could
easily update in under 5 minutes.

We were concerned this policy might hurt our user numbers, but infact
found it had the opposite effect. By improving the user experience, we
have provided a platform that is better than our competitors who are
pegged back by trying to support IE6. We also get far fewer queries/
complaints about the site not working. Furthermore, because we have a
mainly re-visiting member audience we have been able to promote the
uptake of new browsers within this group - improving both their online
experience and security.

At any rate, its a matter of personal preference clearly and I didn't
want to hijack this with an essay - but wanted to add some context and
data to my early commments.


On Jul 25, 4:32 pm, "geocode...@gmail.com" <geocode...@gmail.com>
wrote:
> > > > htttp://www.mappingsupport.com/forum_post/browser_detect.txt-Hidequoted text -
>
> > > - Show quoted text -- Hide quoted text -

Joseph Elfelt

unread,
Jul 25, 2010, 3:17:00 PM7/25/10
to Google Maps JavaScript API v3
Kesuke,

Thanks for your comments - not a hijack at all.

There's obviously a larger and important issue, namely the pros and
cons of using browser detect code in v3 apps.

If an app does not have browser detect code, then is there some way to
detect when a v3 app is giving the user a bad experience?
After all, if my app does not seem to be working right for someone
(due to their browser choice) I don't want them to be mad at the app
and I don't want them to be mad at me.

Pil

unread,
Jul 26, 2010, 1:18:06 AM7/26/10
to Google Maps JavaScript API v3
The only solution I know of is testing: Test in as many different
browsers as possible so that you're able to evaluate the annoyance and
notice known failures (and their reasons) in a help/support page.
Reply all
Reply to author
Forward
0 new messages