Cover by Dylan James

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Adding a Google Map to content

Google Maps is a useful tool for describing locations of places, but implementing this manually involves writing some custom JavaScript code, which is not good for non-technical editors. In this recipe, we will be using the Location and GMaps modules to add a Castle content type with a Location field, which outputs its location on a Google Map. The Location field will feature various location attributes and a geocoding service, which will automatically plot the marker on the map, as shown in the following screenshot:

Adding a Google Map to content

Getting ready

You will need to install the most recent releases of the following modules:

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required