This site demonstrates a set of Drupal packages that enable the collection and display of geographic information. The map on the home page shows two content types, each containing a geographic location, that are managed by this demo system and then fed into the home page Leaflet map as separate streams of GeoJSON data (more about that below) and mapped as distinct layers.
Drupal helps you to manage the content of your web site: create, edit, publish and display. To understand information management and presentation in Drupal, it is important to understand Drupal's concepts of content and views. Content is the information stored for use in your web site and it is logically divided into content types, each of which represents a different type of thing (entity). A content type is a fixed bundle of fields that store all the pieces of information you have for some entity type (e.g., a name, description or location) and with which you can create as many instances of that type of entity as needed. For example, one of the content types used in this demonstration site is called a documented location, representing a place at which photographic evidence has been collected in support of a simple analysis concerning the uniformity of housing density in urban areas of Toronto. This content type was adapted from an exercise in which students were asked to decide whether or not housing density was approximately uniform throughout a Statistics Canada Dissemination Area (DA) and then document a set of locations within the DA using annotated photographs as the primary evidence for or against the assertion that housing density is uniform within that DA. The dissemination areas are the second content type used in this demonstration site.
By default, setting up a content type in Drupal is an administrative task but creating and editing instances of a content type can often be delegated to a logged-in user or even an anonymous site visitor, possibly with moderation support, depending on site policies and objectives. Once a content type has been set up, Drupal offers different interfaces for viewing and editing examples of that type. Figure 1 shows a sample of a documented location display containing photographs, descriptive text, a brief summary of the evidence, a location, a reference to the DA in which the location exists and an evidence type tag ("housing") for the evidence included about this location. Each field may be included in the display or left out and each field included may be configured to appear differently (e.g., an image could be shown as a small thumbnail or the display could merely include a URL for the image file). The display may appear differently for different groups of site users (e.g., logged in vs anonymous site visitors).
Figure 2 shows the editing form for a documented location used when creating or updating a documented location (the actual form is continuous but has been split to better frame it here). The form is a combination of the selected editing interfaces for each of the fields that are used in the content type. As with the content type display, the form can be configured as needed with each field editor selected to best suit the information required and the users expected to create and edit the content. For example, the form below shows a map that allows the location to be edited cartographically while the Location text box would show a text description of the location once edited. If more convenient and useful for a particular application, the location could instead be entered as a pair of latitude, longitude coordinates using a differently configured and less flexible editing form.
Moving beyond individual instances of content, a view in Drupal is a collection of content items that meet some set of criteria and are returned as a group for aggregated display in some form. With respect to the database underlying a Drupal site, you can think of a view as being the results from a database query, selecting the type of content to be included and the conditions each instance of content must meet for that instance to be included in the view set, combined with a method for displaying the query results once returned. Views commonly return lists or galleries of content entries. For example, visit the home page now and type "detached' into the search box and look at the results returned. Similarly, to create a list of all documented locations in a DA, enter the numerical DA identifier in the home page search box.
The map shown on the home page of this site could be a view. The main difference between it and the list of documented locations just described is the form of display created out of the returned query results. Rather than a textual list of information, a map view organizes the locations of the content items in a map. Figure 3 shows two fragments of interactive screen shots showing the pop-ups displayed when you click on: a) a documented location point or b) a dissemination area. The view results include enough information to allow the web map to provide a summary of each content instance when a user clicks on its representation (documented location: map point; dissemination area: the bounded area on the map). Because the documented location and dissemination area shown are different content types, each includes different fields and the summary is customized for the fields available in each content type. There's not a lot of information collected in this demonstration data for the dissemination area because they are mainly used to show the boundary on this map but this content type could be expanded to include, for example, profile information from the most recent census.
The main reason I do not say that the map on the home page is a view is because this map has been designed to combine two views into a map display, as shown in Figure 4. One view includes all of the documented locations that have been published on the site and returns the information as a GeoJSON description of the set of instances with summary information and the location for each. The other view returns the set of dissemination areas that intersect the current viewing area of the map, including just enough information to draw the boundary on the map and to show the numeric identifier of the area when it is clicked.
- Not sure what GeoJSON looks like? Here's an example: https://ggrmaps.utsc.utoronto.ca/giamedia_demo/dl_geojson_feed. It is a machine exchange data format that just happens to be almost human readable. It's not very pleasant to read.
As shown in Figure 4, the content item summaries included in the view results include references back to each content item that, as shown in Figure 3, are turned into interactive hyperlinks that allow users to dig deeper into the content once they have loaded and examined the summary display provided by the map. Clicking on one of these links would show a page similar to Figure 1. In the case of the documented locations, the view information also includes hyperlinks to summaries of entries that use the same evidence type keywords. This indexing based on terms from a fixed vocabulary (here, the different types of evidence to be presented in photographs) provides another way to index and understand the content on the site.
By working within the paradigm of contents and views, a map created within a Drupal system can be seen as consistent with the information handling provided by the content management features of Drupal. The information to be mapped is simply managed content, created and managed in the same ways all Drupal content is handled, that includes geographic locations. The map is just another view or is an application built on views of content. Although Drupal can store and display location information in flexible ways, there are many specialized features of geographic information systems that Drupal does not include. By including the storage and display of geographic locations with the complex content management features that Drupal does include, Drupal can enable collaborative online data collection, display and flexible search in ways that are beyond the abilities of many geographic information systems.
Comments