Chapter 1. Google Maps JavaScript API Basics

In this chapter, we will cover the following topics:

  • Creating a simple map in a custom DIV element
  • Creating a simple fullscreen map
  • Moving from the Web to mobile devices
  • Changing map properties programmatically
  • Changing base maps


Location is becoming a very popular topic day by day, and Google is one of the main game changers in this area. Most websites have a contact page with Google Maps showing the location of the business. This is the simplest usage of the Google Maps JavaScript API. There are also other advanced usages of it to show different information on maps. This whole book contains multiple usage recipes on the Google Maps JavaScript API, from beginner to advanced topics. There are ...

Get Google Maps JavaScript API Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.