Pman's Lab

Welcome to my lab.

A demonstration of what I work on during spare time. Visit the my Lab page to see what I have done so far.

Features of GMouseWheelControl

GMouseWheelControl has all the features that can be accomplished by the use of a scroll wheel mouse on a map. All of the features has been mentioned in the Main Page where a demo of GMouseWheelControl was provided. Here you'll find complete details of the features/functionalities that has been added to this custom control for Google Map as well as their compatibility(according to what I was able to test).

GMouseWheelControl has two main features, both of which revolves around panning/moving the Google map in addition to zoomin in/out using scroll wheel. However, they both achieves the end result on it's own approach. Different users may find different approach useful or suitable for them. One approach is to use the Scroll Wheel and another is to take advantage of movements of the mouse.

Scroll Wheel

Scroll wheel feature will allow to change the behaviour of the user's scroll wheel mouse when they scroll up or down on the Google Map. When clicked on the Scroll Wheel button, the user will be presented with three options to choose from. The user can also get these options by middle clicking or clicking on the map using scroll wheel button on the map. These options are:

  • Pan Vertically
  • Pan Horizontally
  • Zoom In/Out

Selecting any of the above options will enable that behaviour, if it wasn't enabled already and will disable the other options. If the selected option was already enabled, then it will be turned off/disabled.

Compatibility

All three funtionalities of the "Scroll Wheel" button should be working on any browser where Google Map is already working. The user should be able to pan/move the map vertically or horizontally or zoom in/out using mouse scroll wheel. Simply scroll up or down to pan/move the mouse accordingly or to zoom in or out of a specific area. However, it has been tested and found to be working in the following browsers installed in Windows XP only:

  • Firefox 2.0
  • Internet Explorer 6.0
  • Opera 9.0

Getting these options by middle clicking on the map won't work in every browser. Please see below for middle clicking compatibility/alternative.

Requirement

Obviously, you will need to have a scroll wheel mouse to be able to use this feature. I'm not a Mac user, but I belive Mac computers don't use scroll wheel mouse and as such they will not be able to use this feature.

Click & Pan

Using this feature will allow an user to be able to pan/move Google Map in any direction without clicking on the pan arrows or keep dragging and dropping. In other words, this is an automatic pan feature. This feature can be enabled or disabled by simply clicking on the "Click & Pan" button. If enabled, simply click on the map by middle mouse button or scroll wheel button and move your mouse pointer wherever you would like the map to pan. Further you move your mouse pointer away from where you had clicked in the map, the faster the map will move and vice versa.

Compatibility

Similar to the "Scroll Wheel" feature, this will work in any browser where Google Map is already working. However, only following browsers have been tested and found to be working, which are installed in Windows XP:

Requirement

Unlike the "Scroll Wheel" feature, Scroll wheel mouse is not a requirement for this feature. Even by using on old two button mouse or Mac users with one button mouse(not tested yet), an user should be able to use this feature with the help of the alternative to Middle Click on the map.

Middle clicking on the map won't work in every browser. Please see below for middle clicking compatibility/alternative.

Middle Click

Middle click is an important part of GMouseWheelControl. If "Click & Pan" is enabled, the user will need to middle click on the map in order to start automatic pan relative to where the mouse pointer is on the map. Otherwise, the user can use this middle click feature to be able to get options for using scroll wheel mouse.

Alternate to Middle Click

Clicking on the map using middle mouse button or scroll button has been tested to be working only on Firefox and Internet Explorer browser. Also, those who are still using two button mouse or Mac users with one button mouse, won't be able to do middle click. As such an alternate solution was needed, which is available to everyone including those who are able to do middle click.

Shift + Click

Simply press and hold Shift key in your keyboard and click on the map. This will work for all the functionalities that depends on Middle Click.

Compatibility

Both Middle click and the alternate solution/shortcut has been tested in the following browsers installed in Windows XP, using a scroll wheel mouse:

  • Firefox 2.0 (Middle Click AND Alternalte shortcut)
  • Internet Explorer 6.0 (Middle Click AND Alternate shortcut)
  • Opera 9.0 (Alternate shortcut only)
Requirement

A Scroll Wheel mouse or three button mouse is required for Middle Click feature. However, it is not required if Alternate to Middle Click is used.

Smart Scroll

A lot of times you may show a map on your webpage along with other contents that may require your visitor to scroll to read full content depending on their screen resolution or monitor size. If you enable scroll wheel zoom offerred by Google Map API, and use your mouse scroll wheel on the map, you will notice two different behaviour/event taking place. The map will zoom in/out accordingly as well as the webpage will also scroll. This is really not desired intention of the user and that's exactly where "Smart Scroll" comes into play. Ofcoure, with a little bit of coding you can fix this problem yourself, but adding GMouseWheelControl on your map will automatically take care of this problem. The control knows when the user wants the webpage to scroll if mouse scroll wheel is used on the map.

After adding GMouseWheelControl, if you enable your scroll wheel mouse for zooming in/out or panning or automatic pan has started, the webpage will not scroll if your mouse pointer is over the map and the mouse scroll wheel is used. If any of those options are not selected and you use your mouse scroll on the map, the web page will scroll up or down accordingly.

Compatibility

Smart Scroll has been tested in the following browsers installed in Windows XP:

  • Firefox 2.0
  • Internet Explorer 6.0
  • Opera 9.0
Requirement

You will only notice the difference or usage of this feature if you have a scroll wheel mouse.

Always on top

If you really love the options for scroll wheel of GMouseWheelControl, you may sometimes find yourself in a position, where you are constantly switching back and forth between selecting an option for panning vertically or horizontally or zooming using your scroll wheel mouse. In that case, it may be convenient to have all of these options available all the time or at least until you are done. That's why a little pushpin has been added beside the options of "Scroll Wheel" feature, which will allow you to keep the options menu always available. Simply click on the pushpin icon again once you are done to unpin the options menu from the map.

Compatibility

This feature should be working in almost all browsers where Google Map is already working but it has been tested in the following browsers installed in Windows XP:

  • Firefox 2.0
  • Internet Explorer 6.0
  • Opera 9.0
Requirement

None. You are free as a bird.