# The Google Maps scroll/zoom confusion

This morning I used Google Maps to look up driving directions for my wife, and I did what I do practically every time I use it: I tried to scroll the map and ended up zooming into a tree a mile or so away from the address I was looking for. The problem, of course, is that Google has the scroll wheel—or scroll ball or scroll gesture, depending on what type of mouse or trackpad you’re using—tied to zooming instead of scrolling.

I vented my anger on Twitter

There are few things I hate more than Google Maps using the scroll wheel to zoom instead of scroll.

10:47 AM Sun May 29, 2011

and got a few replies and a few faves.

@drdrang With you on that one. Especially when the magic mouse does it of its own accord.

10:50 AM Sun May 29, 2011

@drdrang Agree. I don’t know how many times I’ve gone from a neighborhood to outer space by accident.

11:04 AM Sun May 29, 2011

@drdrang Amen. Burns me every time.

8:17 PM Sun May 29, 2011

These are all Mac users, but I know from people at my office that Windows users get caught by this, too.

The problem is that because every other use of the scroll wheel is to scroll (imagine that!), your fingers naturally make that motion when you want to scroll in a map. And you end up in either a tree or outer space.

I understand the argument that old-fashioned scroll wheels only worked in the up-and-down direction, so they couldn’t be used to scroll in the two dimensions of a map. I also know that Google isn’t alone in this appropriation of the scroll wheel. But that doesn’t make it right.

The weird thing is that in many situations the appropriation of a function is accepted. In web forms, we don’t use the tab key to insert tabs, we use it to jump from one input field to the next. Similarly, in a single-line input field the up and down arrow keys don’t move the cursor up and down (because they can’t), they move it to the start and end of the line. No one objects to these changes from the normal behavior.

The difference is that while the normal behavior of the tab and vertical arrow keys wouldn’t make sense in those contexts, the normal behavior of the scroll wheel (or scroll ball, or gesture) does make sense when looking at a map. In fact, scrolling may be the most common action users take when working with an online map.

The best behavior would be to tie the scroll wheel to a scrolling action, but maybe there’s some technical reason that’s impossible. If so, I’d like a user-controlled option to disable the scroll wheel entirely when working in Maps. Better to have no response at all than a response that moves me far away from where I was. That option is available to programmers who use the Google Maps API, but Google doesn’t make it available as an option to regular users.

What is available is this Safari extension by Mario Tausch.1 It’s called “Google Maps Scroll Zoom” even though its job is to prevent scrolling actions from zooming the map.

The key to the extension is this bit of JavaScript

javascript:
1:  var cb = function(e) {
2:      e.preventDefault();
3:      e.stopPropagation();
4:      return false;
5:  };
6:
7:  var href = window.location.href;
8:
9:  if (href.search("maps.google") > 0) {
10:      var childs = document.getElementById("map").childNodes;
11:      for (var i=0, l=childs.length; i<l; i++) {

which tells the page element with the ID “map”—which, unsurprisingly, is the <div> that contains the map—to ignore scrolling actions.