Online Book Reader

Home Category

Mapping With Drupal - Alan Palazzolo [12]

By Root 317 0
API available.

One company that decided to make this trade off is Development Seed. Development Seed has worked with open source web-based mapping for years and contributed a lot to many Drupal modules. They switched from primarily using the OpenLayers JavaScript library to using Modest Maps. They wrote their own library for the interaction and map widgets to go on top of this, called Wax, and in doing so they reduced file size by 70%. Although there is this considerable improvement in file size, the significant trade off is that Modest Maps and most of the other newer mapping APIs do not yet have integration with Drupal.

NOTE

Recently, CloudMade released an open source JavaScript mapping library called Leaflet. It is simple and lightweight. There is also a new Leaflet module for Drupal that provides some basic integration between Drupal and Leaflet. It is something to keep an eye on.

Tile rendering


The other way to work around web browser limitations in creating maps is to render your data as raster imagery (see Raster data).

Until recently this required a thorough understanding of complex and/or expensive GIS software. This barrier has been reduced by two recent new technologies. The first of these is TileMill, which is open source software for designing maps and creating map tiles that integrate with various mapping APIs.

TileMill allows you to load in a large dataset containing spatial data and turn it into map tiles. The data could be points, such as locations of health centers, or shapes, such as outlines of states in the US. They can be rendered on the tiles in different colors to represent the data. And despite rendering the data into the map tiles, people can still click on the map to get more information about the data. TileMill and other ways of creating tiles are discussed in Map Tiles.

While using TileMill allows web maps to display massive data sets, the trade off is that the tiles that are generated need to be hosted (an extra expense) and the maps can only contain the information that is available when the tiles were created. It is difficult to display current information in the same way that would be possible if the information was being pulled straight from a database. Every time you update the data you must rerender all the tiles. If you are mapping incidents of violence during civil unrest, you do not want to wait a day or a week to update your map.

The other interesting new technology that uses tile rendering to display large data sets is Google’s Fusion Tables. Using the Google Maps JavaScript API, you can query data and map tiles are rendered on the fly to display that data. Currently, though, there is no integration in Drupal for Fusion Tables.

Usability


Large amounts of data are a problem for the web browser, and are also a problem for people looking at the map. A map with hundreds of markers covering it is overwhelming. Too much information is as bad as too little. Indeed, it is worse, as it takes longer to load!

Another problem happens when the map is trying to display several pieces of information at the same location, for example, showing three businesses in the same building on different floors. With a standard configuration it is impossible to access more than one marker. Clustering, discussed earlier, is one way to deal with this. The other way is to manage what data is displayed and to give users different ways to refine this, for example by using exposed filters in views, or detecting a user’s location and showing them what is nearby. This is discussed in Chapter 4.

As more people access websites through mobile browsers on tablets and smartphones, it is important to consider the user experience for this audience. In other words, keep the maps you build simple, so that the information can be seen on small screens and so that the maps load quickly. The latest versions of the APIs for both Google Maps (V3 Maps API) and OpenLayers (2.11) have added a lot of improvements for using maps on mobile devices. They have made the maps faster, have added support for touch screens

Return Main Page Previous Page Next Page

®Online Book Reader