2,131 Tutorials

How to modify your Google Map

Customise maps to include extra information

Once you've put your business on the map with Google Maps, customising that map to suit your customers' needs is a piece of cake.

Follow our simple eight-step walkthrough to add extra information to your own version of Google Maps, and even to upload that information to the main Google site.

1. So far we’ve covered the basics of adding a map to your home page, but there’s much more you can do. You can provide additional information about the location by adding the code map.openInfoWindow(map.getCenter(), document.createTextNode(“Hello, world”));.

Step 1

Step 1

2. Placing this code beneath the map.setCenter instruction will display a balloon on the map with the text 'Hello world'. To provide something more useful to your visitors, change the text in brackets to something that better describes the location. This text will then be displayed at the centre of your map.

Step 2

Step 2

3. Google Maps can be viewed as normal maps or as satellite images. To change the view of your map from standard to satellite, add the following line of code underneath the co-ordinates: map.setMapType(G_SATELLITE_MAP);. Changing the instruction to G_HYBRID_MAP creates a combination of both views.

Step 3

Step 3

4. To create an overlay that allows you to zoom in and out of your map or to pan from side to side, add the code map.addControl(new GLargeMapControl());. Using the code GsmallZoomControl instead, however, inserts more discreet plus and minus buttons to control the zoom levels.

Step 4

Step 4

Send to a friend

Email this article to a friend or colleague:


PLEASE NOTE: Your name is used only to let the recipient know who sent the story. Both your name and the recipient's name and address will not be used for any other purpose.