Google Maps API

The Google Maps API lets you embed Google Maps in your own web pages with JavaScript. The API provides a number of utilities for manipulating maps and adding content to the map through a variety of services, allowing you to create robust maps applications on your website. At the moment Google’s latest release is Google Maps API V3.

Specifying the Sensor Parameter
Use of the Google Maps API requires that you indicate whether your application is using a sensor (such as a GPS locator) to determine the user’s location. This is especially important for mobile devices. Applications that determine the user’s location via a sensor must pass sensor=true when loading the Maps API JavaScript:

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true">

Language Localization
The Google Maps API uses the browser’s preferred language setting when displaying textual information such as the names for controls, driving directions and labels on maps. In most cases, this is preferable; you usually do not wish to override the user’s preferred language setting. However, if you wish to change the Maps API to ignore the browser’s language setting and force it to display information in a particular language, you can add an optional language parameter.

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language=en">

Region Localization
The Maps API serves map tiles and biases application behavior, by default, using the country of the host domain from which the API is loaded (which is the USA for maps.google.com). If you wish to alter your application to serve different map tiles or bias the application (such as biasing geocoding results towards the region), you can override this default behavior by adding a region parameter.

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&region=GB">

Leave a Reply