Book Image

Oracle APEX Cookbook : Second Edition

Book Image

Oracle APEX Cookbook : Second Edition

Overview of this book

Table of Contents (21 chapters)
Oracle APEX Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Including Google Maps


In your APEX application it is possible to include a Google map. A Google map can be very useful, for example, for contact details or directions. It is not only simple to include a map, but you can also extend the map with several functions. In former releases of APEX, you needed to create a PL/SQL dynamic region with JavaScript embedded in the PL/SQL code. Since APEX 4.0, you can use plug-ins. We will show you how to include the Google map with plug-ins. In this recipe we will create a Google map with markers representing the locations from the APP_CUSTOMERS table.

Getting ready

Make sure you have access to the APP_CUSTOMERS table. Also, make sure you have an API key to get the Google map working. If you haven't got any, request one at https://developers.google.com/maps/documentation/javascript/tutorial?hl=nl#api_key.

How to do it...

First of all, you have to define a plug-in.

  1. In the Application Builder, go to your application and click on the Shared Components icon.

  2. In...