Upgrade Your Drupal Skills
We trained 1,000+ Drupal Developers over the last decade.
See Advanced Courses NAH, I know EnoughPart 3 - adding heatmaps with open layers and views
Mapping in drupal with open layers and views is hella awesome. Add in the heatmaps and you've got some pretty sweet visualizations. using the content type with our geolocation field from our first exercise we first create a view - since we're using points we'll need a vector overlay to start with . For those looking to test on their own site I've added an updated feature with the mapping in it. The settings for the overlay are also pretty straightforward. I use EPSG 4326 for most projections - especially since I'm using google's geocoder that spits it out by default (if we had to use ogr2ogr to transform the data we could , but for this project EPSG 4326 is just fine. I also use WKT (well known text) for most of my mapping... again, this is handy with google, and generally a pretty usable format . Once your view is built hit save - it's time to head over to the open layers side for a bit....
In the open layers interface /admin/structure/openlayers/maps/list/ add a new map - you'll need to center the map where you expect your data to be... in my case the US and then set your projections - EPSG 4326 (aka WGS84) is what I used here again - consistency is what matters.... then scroll down a bit and you'll see your layer that you created from your view . After you're done here go on to the Behaviors tab. there are a huge number of settings in here, but basically the defaults are going to be your friend....Hit save now and go back to the view you just created... it's time to render this sucker. Create a page view in your existing view - you could create a new view, but why bother... it's nice to keep it all in one place in my experience... that said don't forget to use the "override for this view" settings so that when you select openlayer map for your format you won't override any other views.... Under settings select your newly minted map and you're done!
We're almost done with the report - next we're going to look at how to preserve the data by passing it along to an international service aka open spending... again - thanks to all who have helped thus far from the charlottesville gop, @Buddy Weber, Barbara Null, Richard Statman, John Pfaltz et al. As noted in our discussions what we find here is that Charlottesville is not really a big spender when it travels, and that in a given month we don't travel all that much.
About Drupal Sun
Drupal Sun is an Evolving Web project. It allows you to:
- Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
- Facet based on tags, author, or feed
- Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
- View the entire article text inline, or in the context of the site where it was created
See the blog post at Evolving Web