DragZoomControl v1.0: Easier zooming, coming right up!

Wednesday, June 06, 2007 at 10:00:00 PM

Do you ever have the experience where you're sitting there staring at a map, and you know exactly the area you want to zoom onto, but it takes you 3 double clicks, 5 pans, and some scroll wheel action to get there? At those times, I always wish I had something which would let me just drag a rectangle on the map to zoom in.

Luckily, developer Andre Lewis realized the need for a drag-to-zoom control last year and introduced GZoom to the community, with a great response. The GZoom control is now named DragZoomControl and is the latest offering in the Google Maps API Utility Library open source project. In the library, you'll find full documentation, multiple examples, and even a compressed version of the javascript source for the bandwidth-wary. DragZoomControl is highly customizable (check out this interactive options playground for it) - but if you need to customize even more, just download the source to your server and tinker to your heart's delight!

Below is an example that combines the open-sourced MarkerManager with DragZoomControl for a rather pleasing drag-to-zoom-to-discover-more-markers experience. Click the magnifying glass to get your drag on. (Note: Weather markers are randomly generated- so don't be surprised if you see a sunny London!)

As always, please report any issues you find in the Maps API Google Group, and consider joining the open-source project if you'd like to work on extending DragZoomControl further.