Drupal powers over 1% of the Internet, more than one million websites. Over a quarter of adult Americans use mobile or social location-based services such as Google Maps, Weather lookups, and restaurant searches (see Pew Internet). As location becomes a core part of what users expect from websites and mobile devices, Drupal gives you the tools to create a website that meets these demands. Drupal’s strength is in creating interactions between mapping data and all the other sorts of data (e.g., restaurant reviews, business locations, user locations, voting districts).
Chapters 1 and 2 focus on the theory of maps, cartography, and considerations of mapping in general. A well-designed and well-thought-out map can increase the usefulness and usability of a web application. At the same time, a cumbersome, badly devised map can frustrate users and drive them away from your site. These first two chapters will not instruct you in the technical abilities that you need to get maps on your Drupal site. Instead, and more importantly, they will help you think about the maps you are creating, what they are for, and what you expect the user to get out of them. If you just want to start making maps with Drupal, and you know exactly what maps you need, skip ahead to Chapter 3, but it is worth reading these introductory chapters and understanding your role as map maker.
Chapter 1 introduces mapping, specifically web mapping, and why you may want to make maps with Drupal. Chapter 2 dives deeper into the mapping concepts that you will come across, such as map projections and data storage, and outlines some of the challenges of making maps online. Chapters 3 and 4 contain an overview of the main mapping modules for Drupal and have detailed tutorials for configuring these modules to create maps. Chapter 3 focuses on the storage of spatial data and Chapter 4 covers using this data to create maps. Chapters 5 and 6 are about customizing the maps on your site by creating your own modules. Chapter 5 explains how to use JavaScript and PHP to add new ways of interacting with maps. Chapter 6 provides ways to make your maps look more beautiful. Chapter 7 pulls this all together with an explanation of how to configure your maps in code for use with version control.
Maps, generally defined, probably first appeared over 18,000 years ago (see Wikipedia), but it wasn’t really until the 1500s that maps (as we think of them today) were produced in large numbers (Woods, Rethinking the Power of Maps, page 27). Around that time, maps became significant navigational and military aids and powerful tools for cities, states, and nations to help organize boundaries and administrative activities. These maps started to outline and actually define states and other political boundaries. Woods writes, “the map possessed an all but unique power to give the elusive idea of the state concrete form, to those outside looking in, certainly, but also to those living within.” This idea that maps have the power to literally define the world around us, and not just represent it, still holds true today and is in your hands as a map maker.
It is important to keep in mind that while maps are driven by data that has been collected, often from observed data, maps are not inherently objective artifacts. A common perception of a map is that it is a neutral display of collected data, similar to a spreadsheet. But there are many questions when looking at a spreadsheet or a map: How accurate is the data? How was the data collected? What data is not presented? These issues show the subjectivity of maps.
Maps are akin to statistics. This definition of statistics from Wikipedia could apply to mapmaking: “Statistics is the study of the collection, organization, analysis, and interpretation of data.” In statistics, data gets collected, aggregated, and then put through various mathematical algorithms to either prove or disprove a hypothesis, usually around some preexisting idea about the world. Statistics can easily be misused by applying specific methodologies to ensure a certain analytical outcome. In the same way, a mapmaker collects and combines a huge amount of data, simplifies and codifies it, and then presents it on paper or a computer screen so as to assert some specific idea. Depending on the decisions made throughout the process, that idea can be conveyed in many ways.
Maps are art. “Art is the product or process of deliberately arranging items (often with symbolic significance) in a way that influences and affects one or more of the senses, emotions, and intellect” (Wikipedia). Once data has been collected for a map, there are still many decisions to be made on how to visually communicate that data on a map, such as symbols, colors, interactions, or annotations. How does one symbolize a church? What color is a county road? Where will the legend be? With maps, as with art, every decision, no matter how small, is often intentional, so to convey a very specific vision to the viewer. In these decisions is the power to communicate with maps.
Maps tell a story. Users expect a map to communicate an idea to them. This could be a story about how there are over a billion people that live on less than a dollar a day (see Figure 1-1). Or the story could be more complex, describing the rise, climax, and decline of newspapers in the United States over the past 300 years; this story was told in the interactive map by Standford’s Rural West Initiative.
With any kind of story telling, the more detailed and interactive you can be, the more likely you will be to keep your audience captivated. What colors should you use? What font should the street names be in? How should you use instructions and legends to teach people to interact with the map? What happens when a user clicks on a marker on the map? These decisions lead your users to the end of your story.
Through a cartographer’s choices of selection, omission, or simplification, a map can be manipulated to illustrate entirely different human circumstances in the same physical geography. | ||
--John Brian Harley, map historian, 1989 |
Maps try to convince you that something is somewhere. The something could be physical like a tree or river, or it could be a territory, such as the State of California, or it could be a mere notion, like the idea that California is a Democratic state. The somewhere could be any place, but it is only useful if it is a place that we, as users, can connect ourselves to; it could be our town, our neighborhood, our country. Maps are also communicating to us by the things that are not somewhere on the map. These decisions assert an idea of what is important or what is not important, and collectively with the symbols, colors, lines, and dots that make a map, they create an argument for your user to agree with or not.
Most of what we see on maps we tend to believe without much thought, such as the national boundary of France, but other boundaries, such as the areas of Israel and Palestine, are currently disputed by many people, and maps help represent and define those positions. Maps are not wholly objective as discussed above. Maps can lie; even when no deceit is intended, the best mapping can, and often does, mislead for specific purposes. And even if what your map asserts may be trivial, by using map APIs such as Google or Bing map tiles, you are asserting all of the ideas and ideologies of that service as well as your own.
All this is to say that mapmakers are not cognitive agents parachuted into a pre-given world with a chain and a theodolite, to measure and record what they find there. Rather, they’re extraordinarily selective creators of a world—not the world, but a world—whose features they bring into being with a map. Mapmakers propose this, not that, observe these things, not those... | ||
--Denis Woods, Rethinking the Power of Maps, page 51 |
As a quick example, take a look at this map of California from 1940, which focuses on trying to convince the user that California an amazing place with lots of fun opportunities (Figure 1-2). This is in stark contrast to what a modern Google Maps Road Map of California does, focusing on providing road data and specific relevant features (Figure 1-3).
In modern life, maps have become an almost instinctive way of seeing our world. In fact, they are our strongest, practically our only, way to perceive the world around us as a whole (given that most of us don’t get to go on a space walk). Maps are in the glove compartments of our cars, on our phones, in the newspaper, on hospital walls, and on the streets. It is hard to imagine a world without maps: indeed, without maps, it is hard to imagine a world.
What did we do before maps? Well, we had many other mechanisms to describe place and boundaries. The most important was language; people described where things were by referencing common ideas and objects. This conversation involved both telling and asking about place and detail. Your maps are in conversation with your users. With computer-based mapping, especially web mapping, interactivity allows the map to talk back to the user, whether it be a pop up with more detailed information, by being able to zoom out to see more of the world, or a hint on what is nearby. Your map should be a lucid, truthful, and friendly conversationalist.
So why map at all, and why make maps on your website? As described in the previous sections, mapping is not an inherently objective way to display data: maps are a mechanism for having a conversation, telling a story, or persuading; a map is a communication tool and an art. Still, it is important to decide if this will enhance your web application, and ultimately give your users a better experience, whatever that may be. Maps can be a bad idea.
Think about your audience. Does your audience know how to use a web map? Google Maps has defined the modern web mapping experience, and in doing so has brought many Internet users to this common map interface. Still, not all of your audience may be capable of navigating this interface. Keep this in mind if you are adding on new interactive features to a map: what makes it more useful to many will also make it more incomprehensible to some.
Does your data have geographical relevance? In general, if your data mentions place names, creating a map to explore that data will enhance the user experience. A map, coupled with a more traditional keyword search, can provide a more visual exploration method for your users. If your content is very geographically significant, for instance bus stops and times, a map may be almost necessary for users to understand the data.
Even if you have geographical data and an audience that can manage a web map interface, you will still have to be able to make decisions around your map to ensure that the map conveys the story you want to tell. If you are not able to complete the goal of the map, through lack of design, not providing enough context, or inability to provide real interaction, it may be best to avoid a map so that your users are not distracted by it, and instead focus on other methods for telling the story.
With web mapping, most people do not have the resources to create map tiles themselves, or even to host tiles (for detail on map tiles, see Mapping Terms). Later in the book we will discuss recent developments in open source mapping that have made these things more accessible. But even so, it is likely that you will need to use the map tiles of other map makers, such as Google, Bing, or MapQuest. They are not all the same. There are clear differences in the technical implementation, visual design, and the commercial and legal considerations. But beyond this there are different assumptions made by the maps and satellite imagery.
The following images show the difference in tile sets of road data in Stockholm (Figure 1-4) and the satellite imagery over the Horn of Africa (Figure 1-5). You can see that there are differences in data, design, and filtering.
Figure 1-4. Street tiles over Stockholm from Google, Bing, Yahoo, and OpenStreetMap, as seen at Tile Compare
Figure 1-5. Satellite tiles over the Horn of Africa from Google, Bing, and Yahoo, as seen at Tile Compare
Critical cartography is a new term describing a new sort of thoughtful cartography (mapmaking) that carefully considers the effects of maps. When it comes to mapping, it is important to think: not just about where, but also about why and how. This will produce more exciting and useful maps for everyone. Not every Drupal map maker needs to be a deep thinker in the theory of cartography. But if you would like to get more into the philosophy of mapping, here are some useful and intriguing resources (more are in Appendix A):
Get Mapping with Drupal now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.