Skip to Main Content
Mapping with Drupal
book

Mapping with Drupal

by Alan Palazzolo, Thomas Turnbull
December 2011
Intermediate to advanced content levelIntermediate to advanced
150 pages
3h 50m
English
O'Reilly Media, Inc.
Content preview from Mapping with Drupal

Chapter 6. Making Beautiful Maps

Over the last few years, thanks in a large part to Google Maps, people have become accustomed to using maps on the Internet. But because of the ubiquity of Google Maps, maps often have the feel of stock photography; they are very familiar and can be perceived as stale and impersonal. Recent developments in online mapping make it possible to use alternative map tiles and graphics, and even to create your own tiles.

This chapter covers various ways to make the look and feel of your map your own. We will show you how to customize markers, the map interface, map tiles, and map pop ups.

Markers

Even if you love the standard Google Map, you probably do not want to use the typical red pin to show the location of everything (see Figure 6-1). Fortunately, some other markers come with Drupal Modules, or alternatively you can add your own custom markers.

Google Maps typical marker

Figure 6-1. Google Maps typical marker

OpenLayers Styles

In OpenLayers styles we showed how to add a new color of circular marker. As well as changing the line thickness, color, and opacity, it is possible to use images for markers. When adding a new style at admin/structure/openlayers/styles, you can enter the path to an image file in the “externalGraphic” field. Normally this file will be in your custom module or theme. Some examples of custom images used as markers are shown in Figure 6-2. An example of a vector ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

High Performance Drupal

High Performance Drupal

Jeff Sheltren, Narayan Newton, Nathaniel Catchpole
Using Drupal

Using Drupal

Heather Berry, Angela Byron, James Walker, Jeff Eaton, Nathan Haug, Jeff Robbins

Publisher Resources

ISBN: 9781449311308Errata PageSupplemental Content