How can I implement this in Drupal? (Display WMS from Geoserver on Map, based on node)

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
JHarahush's picture

Hi,

I'm looking to update and refine my agency's GIS data catalog website. The URL is http://gis.drcog.org/datacatalog. Basically, I'd like to redesign this site and use Drupal as the CMS so that the content is easier to manage and also so that we can take advantage of modules like Fivestar to rate the datasets and allow users to submit feedback, etc. I have the table part of it figured out as far as using views, linking to Geoserver's KML output, etc. etc., but the mapping part has me stumped. I have the OpenLayers module installed and I have the basic base map showing, but how I can get the map to display a WMS layer (from our existing Geoserver) based on which node I'm looking at?

We already have Geoserver, which is linked to an existing PostgreSQL/PostGIS database, so solutions that involve attaching shapefiles to nodes aren't the greatest for us, because we don't want to have duplicate data sets. It seems like a lot of the GIS information I've come across has more to do with plotting points (using GMap, etc.), or uploading shapefiles into my Drupal database. I would like to find a solution that involves using our existing WMS services or something that allows us to link directly to our PostGIS database.

Thanks in advance for any help. I would love if someone could point me in the right direction!

Jonathan

Comments

To have the map display a WMS

tmcw's picture

To have the map display a WMS layer, you'll need to add the layer in the layers tab and add it to the map preset in the presets tab. You generally shouldn't import shapefiles into Drupal, and GeoServer's support for external resources in different systems is nearly nonexistent. You might want to write something that parses the GetCapabilities document, but obviously this would entail learning the OpenLayers module a bit and writing some serious code. There is nothing that does what you want to do out of the box.

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: