Book Image

PHP Ajax Cookbook

Book Image

PHP Ajax Cookbook

Overview of this book

Table of Contents (16 chapters)
PHP Ajax Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Using Google Maps


Google Maps, probably the most popular mapping service on the Web, is the mapping application provided by Google free of cost. Google Maps contains a powerful API, by using which Google Maps can be used by different third-party websites for various purposes like route planning, finding driving directions and distance, and so on.

Google Maps is becoming a very powerful and useful tool day by day as it's been widely used by many review-based service applications and many popular mobile applications.

In this section, we will learn how to embed a Google map to a web page.

Getting ready

A Google Map can be embedded in a website using a simple <Iframe> code that is basically used for displaying the map of a particular location or highlighting the landmarks of the location. It can't be used for Google Map API interactions.

As you can see the previous image, you can get the Iframe code of the particular location from the Google map by clicking the Link tab.

How to do it...

But rather...