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,678 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

Samsung Galaxy Note 4 release date, price and specs 2014

IDG UK Sites

iOS 8 features wishlist: the changes iPhone and iPad users want in Apple's iOS 8

IDG UK Sites

25 Years of the World Wide Web: Happy Birthday, Intenet

IDG UK Sites

Developers get access to more Sony camera features