Categories
Uncategorized

Enabling and Disabling the Mouse Wheel “Zoom” Feature on Map APIs

Microsoft Laser Mouse 7000 superimposed over a Live map of Toronto

The major map APIs provide a “zoom” feature that lets you zoom the map in or out if you position the cursor over the map and use your mouse’s scroll wheel. Sometimes you want this function enabled, sometimes you don’t. David Janes, over at his Code Blog provides the JavaScript code for:

  • Enabling and disabling the mouse wheel zoom for Google Maps and Microsoft Virtual Earth
  • Disabling the mouse wheel zoom for Yahoo! Maps (it’s enabled by default, but there doesn’t seem to be a way to re-enable it once disabled.)

Links

Categories
Uncategorized

Universal Zoom Levels for Google Maps, Live Search Maps and Yahoo! Maps

Google Maps, Live Search (a.k.a. Microsoft Virtual Earth) Maps and Yahoo! Maps are all based on Navteq’s mapping technologies. As a result, the tiles used in rendering the maps are the same size, and if you set the zoom to equivalent levels in each, you can seamlessly switch between the three. Take a look at the map below, which shows a map of Toronto as rendered by Google Maps, Live Search Maps and Yahoo! Maps:

Seamless stitched-together map of Toronto, with the left third rendered by Google Maps, the middle third rendered by Live Search Maps and the right third rendered by Yahoo! Maps

The article Switching Between Mapping APIs and Universal Zoom Levels at David Janes’ Code Weblog explains that the mapping systems differ in their zoom levels:

  • Google Maps has 20 levels of zoom, ranging from 0 (out in space) to 19 (pretty close to ground level).
  • Live Search Maps has 19 levels of zoom, ranging from 1 (out in space, but not as far out as Google Maps’ 0) to 19 (pretty close to ground level). Live Search Maps’ zoom levels are equivalent to Google Maps’; for example, zoom level 5 mean the same level of zoom in both Google Maps and Live Search Maps.
  • Yahoo! Maps provides the fewest level of zoom – a mere seventeen. Their counting system is the opposite of Google Maps’ and Live Search Maps; in the Yahoo! system, larger numbers mean farther away from the ground, not closer. The closest you can zoom in with Yahoo! Maps is zoom level 1 (street block level, equivalent to Google’s and Live Searh’s zoom level 17) and the farthest you can zoom out is zoom level 17 (equivalent to Google’s and Live Search’s zoom level 1).

David proposes a universal zoom level and provides code to do conversions between it and Google’s, Live Search’s and Yahoo!’s systems.

Links