We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message
2,851 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

IDG UK Sites

Nokia Lumia 530 review: £60 smartphone offers decent build and performance, awful screen and...

IDG UK Sites

Apps watch: What the NFL can teach UK sports such as cricket and rugby

IDG UK Sites

Game of Thrones VFX work wins Emmy for Rodeo FX

IDG UK Sites

How to win iTunes Festival 2014 tickets: See Pharrell Williams, Ed Sheeran, Paolo Nutini, Kylie &...