« Data Turbine Notes - HelloDT Example | Main | Archiving audio files »

July 14, 2011

Set up OpenLayers on Drupal 7

First Drupal 7 How to post!!

Enough celebration.

Goal: Get basic CMS GIS capabilities running on D7 using an opensource approach. I've used GMap on D6 but want to switch - partially because of the source issue but also because OpenLayers can handle bounding boxes, WKT, etc.

Assumptions: I'm past the point of writing for complete newbies. Sorry, because I know what it is like when items are shortchanged but there is only so much time in the day.

Steps:

1) Install Drupal 7 - that's all the help you get. Hint, it's pretty much the same as D6.

2) Install OpenLayers

$ cd sites/all/modules
$ sudo wget http://ftp.drupal.org/files/projects/openlayers-7.x-blah.tar.gz
$ sudo tar -xzf openlayers-7.x-blah.tar.gz

3) Install GeoField and Libraries
- OpenLayers does not support fields (CCK) in D7. It is recommended that you use GeoField.
- As of July 14th, 2011 you need the dev version of GeoField!!
- GeoField should give us the ability to add, well, a geo field to our content types

4) Enable Modules
- Visit admin/modules
- OpenLayers UI, OpenLayers, Geofield, Libraries

- Note: I don't have Views on this install yet but OpenLayers Views will be used at a later date.

5) Configuration Notes
- Openlayers is found at admin/structure/openlayers and admin/people/permissions#module-openlayers_ui
- I didn't immediately find config spots for GeoField and Libraries

6) Add a GeoField to a content type
- Visit Content Type Structure (admin/structure/types)
- Pick a CT and add a new GeoField (Widget = Well Known Text) - I'm not 100% certain on the other Widgets but feel free to experiment.

Notes: I hit these messages:
- "Plot Location has no field settings."
(I saved past this but recommend going back in to check your settings.)

- "Unable to load geoPHP library. Not all values will be computer [sic] correctly"
(Hmmm...this looks potentially troublesome, especially if geoPHP doesn't ship with whatever version of PHP we are using)


Further Notes:
I changed the widget to OpenLayers Map because I need a map interface to input WKT values. I got a map but lost WKT. I also got this error:
Notice: Trying to get property of non-object in geofield_form_latlon_map()

(line 166 of /var/drupal7/sites/all/modules/geofield/geofield.widgets.inc).

7) Create a node with a GeoField field.

Posted by kkwaiser at July 14, 2011 11:17 AM

Trackback Pings

TrackBack URL for this entry:
http://mblog.lib.umich.edu/mt-bin/mt-tb.cgi/2222

Listed below are links to weblogs that reference Set up OpenLayers on Drupal 7:

» click the following document from click the following document
Data Discussions: Set up OpenLayers on Drupal 7 [Read More]

Tracked on February 10, 2014 06:41 AM

» avchatbr.com from avchatbr.com
Data Discussions: Set up OpenLayers on Drupal 7 [Read More]

Tracked on February 12, 2014 09:02 AM

» Canada Goose from Canada Goose
Canada Goose [Read More]

Tracked on February 17, 2014 09:25 PM

» 123abcdef123456.com from 123abcdef123456.com
Data Discussions: Set up OpenLayers on Drupal 7 [Read More]

Tracked on February 17, 2014 10:10 PM

» aubsideree7.livejournal.com from aubsideree7.livejournal.com
Data Discussions: Set up OpenLayers on Drupal 7 [Read More]

Tracked on February 26, 2014 01:07 AM

» http://www.36thclan.com/pandora-bracelets.html from http://www.36thclan.com/pandora-bracelets.html
Data Discussions: Set up OpenLayers on Drupal 7 [Read More]

Tracked on February 27, 2014 06:18 AM

» structured settlement from structured settlement
Data Discussions: Set up OpenLayers on Drupal 7 [Read More]

Tracked on February 28, 2014 07:14 PM

» visit the website from visit the website
Data Discussions: Set up OpenLayers on Drupal 7 [Read More]

Tracked on March 2, 2014 08:40 PM

» massage charlotte from massage charlotte
Data Discussions: Set up OpenLayers on Drupal 7 [Read More]

Tracked on March 2, 2014 09:09 PM

» http://www.cleandecosis.com from http://www.cleandecosis.com
Data Discussions: Set up OpenLayers on Drupal 7 [Read More]

Tracked on March 6, 2014 11:08 AM

» イルビゾンテ バッグ from イルビゾンテ バッグ
Dear friend. I truly just like your posting and your current web page all in all! That write-up is really plainly composed and without difficulty understandable. Your Wordpress style is awesome as well! Would be awesome to discover exactly where My par... [Read More]

Tracked on March 11, 2014 07:51 AM

» http://spotitto.com from http://spotitto.com
Data Discussions: Set up OpenLayers on Drupal 7 [Read More]

Tracked on March 19, 2014 11:50 AM

» web site from web site
Data Discussions: Set up OpenLayers on Drupal 7 [Read More]

Tracked on March 20, 2014 01:55 PM

» Thomas Sabo Schmuck from Thomas Sabo Schmuck
Data Discussions: Set up OpenLayers on Drupal 7 [Read More]

Tracked on March 26, 2014 12:01 AM

» http://www.as30950.net/index.php/9_Incredible_coupon_Codes_Transformations from http://www.as30950.net/index.php/9_Incredible_coupon_Codes_Transformations
Data Discussions: Set up OpenLayers on Drupal 7 [Read More]

Tracked on March 31, 2014 07:04 PM

» http://www.tbmjh.com/ from http://www.tbmjh.com/
Data Discussions: Set up OpenLayers on Drupal 7 [Read More]

Tracked on April 4, 2014 11:53 AM

» Maids Herndon from Maids Herndon
Data Discussions: Set up OpenLayers on Drupal 7 [Read More]

Tracked on April 5, 2014 08:46 AM

» two kohls coupons Work together from two kohls coupons Work together
Data Discussions: Set up OpenLayers on Drupal 7 [Read More]

Tracked on April 14, 2014 01:13 PM

Comments

Login to leave a comment. Create a new account.