DeArmond.net

Thoughts, adventures, projects, and photography by Shawn DeArmond

Mapping with Drupal

January 18, 2012 - 12:35pm -- Shawn

Mapping means a lot of different things to a lot of different people. You ask The Word Shop, and they just want a navigable map with a single point indiciation their location. You ask Development Seed the same question, and you get a completely different answer. You ask my wife, who is a GIS analyst exceedingly proficient in ArcGIS, and you'll get an entirely different concept of the word "map".

That's what makes this hard.

Over the years, Drupal has become an extremely flexible platform with regard to geographic data. The biggest advancement, in my opinion, was the integration with OpenLayers. Thanks to Alan Palazzolo, et al, for the amazing OpenLayers module, we have a fantastic platform on which to build systems to display our data.

OpenLayers is great, but it's not the be-all, end-all, so maybe I'm getting ahead of myself. Let's start at the beginning:

First of all, if you're using Drupal 7, you want to use the Geofield module. This module adds a field type called Geofield, which, you guessed it, stores geographic information for your entity. Remember, Drupal 7 allows for fields on ANY entity, so you can put this Geofield on a node (obviously), but also a user, a taxonomy term, a comment, etc. etc.

So, Geofield will store "geographic data", so what's that? Basically, there are three main types of geographic data: points, lines, and polygons. Think of points as: "my storefront is located HERE." An example of a line is a Garmin GPS device hiking track. And a polygon is a shape that ends up where it starts, such as the Sacramento City Limits. It could also be a land parcel, or a water feature, like a lake. Geofield can store any and all of these.

Next, we need Views. Because every Drupal site needs Views. Views will let us build the query we need (including all relationships, filters, contextual filters, etc.) in order to get the data we want to display on the map. With Views, you create OpenLayers-compatible layers which can be assembled into a map. This gives you ultimate control of exactly what you want on the map, even to the point where you can have them be toggleable in your map.

There are a few other modules that are in varying states of completeness that I feel I should mention:

  • OpenLayers Proximity lets you search for distance from a point. (Show me all Ikea stores within 30 miles from this address.) [D7 version here]
  • Geocoder lets you take other fields, such as address fields, and generate the longitude/latitude points.
  • Geocoder Autocomplete will auto-fill addresses in text fields using Geocoder API.
  • Address Field is shaping up to be THE way you store address information in Drupal 7

I am making a presentation on this at the Sacramento Drupal Users Group meeting tonight. If all goes according to plan, I'll post a video of it. In the mean time, here are my slides.

UPDATE: I did a screen capture, but unfortunately, the audio didn't get recorded. I have the video, but I don't think it would be all that useful without the audio. Bummer. Sorry folks!

Comments

It is collected by various sources. Geographic data varies.Satellite imagery is collected from satellites and used for remote sensing, GIS, cartography. Demographic (population, income, employment, etc)data is collected from the census as well as other sources and is used by human geographers and economic geographers. Physical data (stream velocity, migration patterns, etc) is collected by people in the field. They physically collect the data using various methods and instruments.

Submitted by IdaWallace on

Many thanks for sharing here educational blog on Mapping with Drupal. Since I am educational experts and would like to suggest your site to finance students who are come to take finance assignment help - http://www.assignmenthelpfolks.com/finance/ from me at Assignment Help Folks and hope it become helpful for them.

Submitted by Kwan on

Well! This article is about the Mapping with Drupal. I think Drupal mapping don't have efficient results like Google Map have. We should use Maps while driving unknow way. Accident is possible in everywhere and we should be careful. We should pray for that 12 years old body who is now in critical conditions and still his life is in risk. Police investigated that case very deeply and 26 years old person who driven by truck arrested by the Police. Any how, I like to get some basic information of a site where i can get analyze http://www.rushmyessay.biz/ for me but after read this news i'm feeling very sorry for the 12 years oldy boy.

Submitted by ErinKelly on

Fantastic post on Mapping with Drupal. And OpenLayers is wonderful module which have a fantastic platform to build structures & show data. Openlayers is a Javascript public library that permits to display maps from several causes. It works with Yahoo Maps, Mapquest, Google Street Map, Stamen, Open Street Map and more. Its useful post and share this module for IT field students, who are come to seek law essay help - http://www.essaywriter.org.uk/law-essay/ at Essay Writer institute because Openlayers' flexibility creates a very valuable decision in mapping with Drupal platform.

Submitted by Ankit on

Drupal always creates some issue and problems but I always adopt your idea to make their clear. Great info. Nice article.

Comments

It is collected by various sources. Geographic data varies.Satellite imagery is collected from satellites and used for remote sensing, GIS, cartography. Demographic (population, income, employment, etc)data is collected from the census as well as other sources and is used by human geographers and economic geographers. Physical data (stream velocity, migration patterns, etc) is collected by people in the field. They physically collect the data using various methods and instruments.

Submitted by IdaWallace on

Many thanks for sharing here educational blog on Mapping with Drupal. Since I am educational experts and would like to suggest your site to finance students who are come to take finance assignment help - http://www.assignmenthelpfolks.com/finance/ from me at Assignment Help Folks and hope it become helpful for them.

Submitted by Kwan on

Well! This article is about the Mapping with Drupal. I think Drupal mapping don't have efficient results like Google Map have. We should use Maps while driving unknow way. Accident is possible in everywhere and we should be careful. We should pray for that 12 years old body who is now in critical conditions and still his life is in risk. Police investigated that case very deeply and 26 years old person who driven by truck arrested by the Police. Any how, I like to get some basic information of a site where i can get analyze http://www.rushmyessay.biz/ for me but after read this news i'm feeling very sorry for the 12 years oldy boy.

Submitted by ErinKelly on

Fantastic post on Mapping with Drupal. And OpenLayers is wonderful module which have a fantastic platform to build structures & show data. Openlayers is a Javascript public library that permits to display maps from several causes. It works with Yahoo Maps, Mapquest, Google Street Map, Stamen, Open Street Map and more. Its useful post and share this module for IT field students, who are come to seek law essay help - http://www.essaywriter.org.uk/law-essay/ at Essay Writer institute because Openlayers' flexibility creates a very valuable decision in mapping with Drupal platform.

Submitted by Ankit on

Drupal always creates some issue and problems but I always adopt your idea to make their clear. Great info. Nice article.