Preface

Audience

This book is intended for people building Drupal websites who would like to visualize their content on a map. Maps are powerful and can tell a rich story. A map is instantly readable, but at the same time almost infinitely revealing. With the rise of maps on the Internet and now on cell phones, the way we navigate our lives has changed. Recognizing this, more web developers are integrating location into websites and applications.

Drupal is a versatile content management system, and because of that, it has been extended through many contributed modules to support mapping. Drupal is not primarily a mapping platform, however, so mapping in Drupal can be tricky. But because Drupal is so extendable, mapping in Drupal can be adapted to your specific needs. This book will help you navigate these complexities to create beautiful and engaging maps.

By the end of this book, you will be able to create a website with a map that automatically centers on the user’s location. The map will include events and local groups that have been added through intuitive interfaces. Rather than using one of the maps from Google or Bing that have become so familiar, perhaps you will create a custom base map that fits the color scheme of your site. And rather than some pink pins, the events and local groups shown on your map will be marked with custom icons created for your site.

We assume you know how to install Drupal, install contributed modules, and enable themes; maybe you have already built a site that is used publicly. If you have not done these things or feel you do not have a great grasp on Drupal, don’t stop reading this book just yet. Read over the first few chapters to get a feel for what is possible, take that enthusiasm and read over some other tutorials or books to learn the basics of site building with Drupal, and then come back. There are some great titles to get you started working with Drupal, some of which are listed in Appendix A. But don’t worry, we will try our best to not assume too much.

Later in this book, we will look at writing code to extend existing mapping modules. When we get there, we will assume you know a little about writing Drupal modules; at a minimum you should understand how to create a simple custom module for a site and be familiar with Drupal hooks. If you are new to writing Drupal modules, there are some books listed in Appendix A that will help you get up to speed developing for Drupal.

Drupal and Mapping Glossary

Drupal and web mapping come with specific terminology that is helpful when talking about these technologies, like modules, nodes, map tiles, and WKT. If you are new to Drupal or web mapping and these terms are not familiar, take a moment to read Appendix C now. We will also be explaining some of these terms throughout the book, particularly in Chapter 2.

Drupal 7 Modules

This book is written for Drupal 7, which was released in January 2011. Most of what we shall discuss will use contributed modules found on http://drupal.org. As we write this book, most of the modules mentioned are in active development, and they may or may not have full releases specifically for Drupal 7. Though we are confident that the ideas and structures will remain consistent, interfaces and module versions may change a bit from what you read in this book. We will do our best to keep this publication up to date as this dynamic topic changes. Errata will be listed at the URL in How to Contact Us.

Conventions Used in This Book

The following typographical conventions are used in this book:

Italic

Indicates new terms, URLs, email addresses, filenames, and file extensions.

Constant width

Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.

Constant width bold

Shows commands or other text that should be typed literally by the user.

Constant width italic

Shows text that should be replaced with user-supplied values or by values determined by context.

Tip

This icon signifies a tip, suggestion, or general note.

Caution

This icon indicates a warning or caution.

Using Code Examples

This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.

We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Mapping with Drupal by Alan Palazzolo and Thomas Turnbull (O’Reilly). Copyright 2012 Alan Palazzolo and Thomas Turnbull, 978-1-449-30894-0.”

If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .

Safari® Books Online

Note

Safari Books Online is an on-demand digital library that lets you easily search over 7,500 technology and creative reference books and videos to find the answers you need quickly.

With a subscription, you can read any page and watch any video from our library online. Read books on your cell phone and mobile devices. Access new titles before they are available for print, and get exclusive access to manuscripts in development and post feedback for the authors. Copy and paste code samples, organize your favorites, download chapters, bookmark key sections, create notes, print out pages, and benefit from tons of other time-saving features.

O’Reilly Media has uploaded this book to the Safari Books Online service. To have full digital access to this book and others on similar topics from O’Reilly and other publishers, sign up for free at http://my.safaribooksonline.com.

How to Contact Us

Please address comments and questions concerning this book to the publisher:

O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (fax)

We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at:

http://mappingdrupal.com

To comment or ask technical questions about this book, send email to:

For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.

Find us on Facebook: http://facebook.com/oreilly

Follow us on Twitter: http://twitter.com/oreillymedia

Watch us on YouTube: http://www.youtube.com/oreillymedia

Acknowledgments

Alan and Thomas would like to thank the book’s technical reviewers, including Denis Wood, Sara Hodges, Robert Holmes, Joseph Bachana, Ronald Turnbull, Théodore Biadala, Reuben Turk, Ankur Rishi, and Patrick Hayes. Thanks also to Julie Steele from O’Reilly for guiding us through the writing process. And a very special thanks to all of the people who have contributed to Drupal and open source mapping over the years.

Alan has been working on the OpenLayers module for Drupal for almost three years and would like to thank all the amazing people that have helped out on the project and made it the successful project it is today. This includes all the committers, patch providers, documenters, and screencasters; thank you all very much. He would also like to thank the Drupal community as a whole for being so supportive and welcoming over the years; it is projects like Drupal that really show how open source is more than just code. He would also like to personally thank Ellie F. for supporting him through writing this book.

Thomas would like to thank his father, Ronald Turnbull, both for tirelessly editing the entire book and for teaching him as a five-year-old to read maps. He would also like to thank his geography teachers over the years, especially Irene McCann, George Dalling, and Bob Hodgart. Thanks go to Wendy Brawer at Green Map for introducing him to Drupal and the concept of open source mapmaking. Thanks finally to Sara Hodges for her input and support.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset