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 sd on

I enjoy, cause I discovered exactly what I was looking for.
You've ended my four day lengthy hunt! God Bless you man. Have
a great day. Bye

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.

I like the valuable information you provide in your articles.

I will bookmark your blog and check again here regularly.
I'm quite certain I'll learn a lot of new stuff right here!
Best of luck for the next!

Submitted by Jack kevin on

Drupal gives you the instruments to make a site that takes care of these requests. Drupal's quality is in making collaborations between mapping information and the various sorts of information. If you want information about Assignment please visit our website http://www.assignmentstar.com/write-my-assignment

Submitted by aba on

I thank you for the information! I was looking for and could not find. You helped me!

Submitted by Micky on

I am also doing development in drupal and i really like to read stuff related to it on the internet. This post is very informative for me which is about Drupal Development Workflow with Git. I think you have a great experience in drupal which you have shared here with us.
Buy heavy duty tarps from http://tarpaulinsco.uk/

Submitted by Kathryn on

I am also sending it to my friend to enjoy your working style. I would like to say that that the article is very good.It is because i love informative blogs and this is one of them. Thanks for sharing and keep it up. Please visit here in the website.
http://www.astickerprinting.com.au/

Submitted by Kathryn on

I’m excited to uncover this page. I need to to thank you for ones time for this particularly fantastic read !! I definitely really liked every part of it and i also have you saved to fav to look at new information in your site.
http://rollstickersco.com.au/

Submitted by Kathryn on

I am reading the whole content of in the post is very informative for me. I am reading the all type and conduction fellow us. I am appreciate in the work. Please share to more than people visited to here. keep it up.
http://rubberflooringsupplier.co.uk/

Wow that was odd. I just wrote an extremely long comment but after I clicked submit my comment didn't appear.

Grrrr... well I'm not writing all that over again.
Anyways, just wanted to say fantastic blog!

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 sd on

I enjoy, cause I discovered exactly what I was looking for.
You've ended my four day lengthy hunt! God Bless you man. Have
a great day. Bye

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.

I like the valuable information you provide in your articles.

I will bookmark your blog and check again here regularly.
I'm quite certain I'll learn a lot of new stuff right here!
Best of luck for the next!

Submitted by Jack kevin on

Drupal gives you the instruments to make a site that takes care of these requests. Drupal's quality is in making collaborations between mapping information and the various sorts of information. If you want information about Assignment please visit our website http://www.assignmentstar.com/write-my-assignment

Submitted by aba on

I thank you for the information! I was looking for and could not find. You helped me!

Submitted by Micky on

I am also doing development in drupal and i really like to read stuff related to it on the internet. This post is very informative for me which is about Drupal Development Workflow with Git. I think you have a great experience in drupal which you have shared here with us.
Buy heavy duty tarps from http://tarpaulinsco.uk/

Submitted by Kathryn on

I am also sending it to my friend to enjoy your working style. I would like to say that that the article is very good.It is because i love informative blogs and this is one of them. Thanks for sharing and keep it up. Please visit here in the website.
http://www.astickerprinting.com.au/

Submitted by Kathryn on

I’m excited to uncover this page. I need to to thank you for ones time for this particularly fantastic read !! I definitely really liked every part of it and i also have you saved to fav to look at new information in your site.
http://rollstickersco.com.au/

Submitted by Kathryn on

I am reading the whole content of in the post is very informative for me. I am reading the all type and conduction fellow us. I am appreciate in the work. Please share to more than people visited to here. keep it up.
http://rubberflooringsupplier.co.uk/

Wow that was odd. I just wrote an extremely long comment but after I clicked submit my comment didn't appear.

Grrrr... well I'm not writing all that over again.
Anyways, just wanted to say fantastic blog!