1. Home
  2. Computing & Technology
  3. JavaScript
photo of Stephen Chapman
Stephen's JavaScript Blog

By Stephen Chapman, About.com Guide to JavaScript since 2004

Allowing Visitors to Move and Zoom the Map

Monday September 8, 2008
Your visitors can interact with any Google Maps on your page. You can make it easier for them by adding controls to the map.

One thing that your visitors can do with any Google map is to click and drag to change the place that the map is displaying. This can make it easier for them to be able to see the surrounding area to work out how to get from where they are to the spot you have marked on the map. Not everyone realises this though and in any case if they are starting from too far away they may have no idea of which way to drag the map to find out where to go.

You can make things easier for them by adding a control to the map that makes it easier for them to move the map around and also to allow them to zoom the map in and out. Google provide this control in two different sizes and either one can be easily added to your map with a small change to the JavaScript.

Allowing Visitors to Move and Zoom the Map
Comments

No comments yet. Leave a Comment

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.