Your SlideShare is downloading. ×
Mapping in Drupal 7 using OpenLayers
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Mapping in Drupal 7 using OpenLayers

25,082
views

Published on

Presentation from DrupalCamp Spain 2011 about OpenLayers in Drupal 7.

Presentation from DrupalCamp Spain 2011 about OpenLayers in Drupal 7.

Published in: Technology

4 Comments
21 Likes
Statistics
Notes
  • kakaokakao
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Excellent module
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Hi,

    Great slide! Better than reading about it. One question, did you populate the lat lon fields with the marker on the map? If so, is this custom code or it it easy to do with the modules?

    Thanks!
    Brian
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • read http://www.interworks.com/blogs/mmueggenborg/2012/01/03/setting-drupal-7-locations-map instead.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
25,082
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
404
Comments
4
Likes
21
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. 7 drupalMapping in Drupalusing OpenLayersPeter Vanhee1st October 2011 - DrupalCamp Spain
  • 2. Who am I?‣ Consumer and contributor to Drupal for over 5 years‣ Co-founder Youth Agora @youthagora and Nuvole @nuvoleweb‣ Web consultant in Barcelona @pvhee
  • 3. What is OpenLayers?
  • 4. OpenLayers is ...‣ a framework for building map applications‣ javascript‣ open source (BSD licensed)‣ your escape from Google Maps
  • 5. www.europeancampus.eu
  • 6. www.managingnews.com
  • 7. maps.ed.gov
  • 8. Under Development 7 drupal
  • 9. 6 drupal 7 drupal‣ OpenLayers CCK ‣ Geofield‣ OpenLayers Geocoder ‣ Geocoder‣ OpenLayers Filter ‣ ?‣ Geo Taxonomy ‣ ?‣ OpenLayers Plus ‣ ?‣ OpenLayers Proximity ‣ ? Note that this list is incomplete
  • 10. Modules‣ ctools‣ openlayers openlayers_ui, openlayers_views‣ geofield geoPHP‣ views
  • 11. Example
  • 12. Geo Data‣ CCK Field: ‣ Data with ‣ Can be geofield latitude/ anything that is supports points, longitude available in lines & polygons (e.g. integers) Views! field storage input field type
  • 13. Adding geo data with lat/lng fieldswith OpenLayers Map Widget Data is stored in geofield
  • 14. And our rendered node
  • 15. Mapping in 3 steps1. Layer Services: Google Maps, MapBox, ... Files: KML, XML, ... Drupal nodes via Views2. Map Configuration for a single map3. View Displays the map using Views
  • 16. 1. Layer2. Map3. View use Views to select data from CCK
  • 17. 1. Layer2. Map3. View configure data source to pick up the location
  • 18. 1. Layer2. Map3. View pass additional data to the layer
  • 19. 1. Layer2. Map3. View use OpenLayers module to configure map
  • 20. 1. Layer2. Map3. View use Views to display map
  • 21. 1. Layer2. Map3. View select map to display
  • 22. Step by stepAdd geofield (Field)1. Create data overlay (Views)2. Create map (OpenLayers)3. Render map style (Views)
  • 23. Improvements
  • 24. Map Behaviors‣ Pop Up‣ Zoom to layer‣ Cluster‣ Write your own (javascript)
  • 25. Change Layers‣ Google Maps‣ MapBox‣ Create your own (e.g. via TileMill)
  • 26. Geoserver1. Drupal outputs WFS via Views2. Geoserver reads WFS and creates map3. Openlayers reads Geoserver map, displays and facilitates interaction ! 6 drupal http://drupal.org/project/wfs http://geoserver.org
  • 27. Tilemill Create your own tiles, and render in Drupal
  • 28. Extending viaContributed Modules
  • 29. openlayers_plus source: www.europeancampus.eu 6 drupal scale points, add tooltips, ... https://github.com/developmentseed/openlayers_plus
  • 30. geocoder 7 drupal‣ From address to location‣ Use geocoder services (e.g. Google Geocoder)‣ Can take values from Address Field or any other text !
  • 31. geocoder 7 drupal
  • 32. geocoder 7 drupal
  • 33. Would be nice to...‣ Render live output of geocoding‣ For Drupal 6, check out the excellent Openlayers Geocoder by @nuvoleweb !
  • 34. Extending via Code
  • 35. ‣ hook_openlayers_map_preprocess_alter() hook_openlayers_map_alter()‣ hook_openlayers_layer_types() hook_openlayers_layers()‣ hook_openlayers_behaviors()‣ hook_openlayers_styles()‣ hook_openlayers_maps() see openlayers.api.php
  • 36. Links‣ http://drupal.org/project/openlayers‣ OpenLayers for Drupal 6 presentation: http://www.slideshare.net/pvhee/introduction-to- openlayers-in-drupal
  • 37. Thanks! Peter Vanhee @pvhee
  • 38. Questions?Drupal + GIS: Convertiendo Drupal en un GeoCMSSunday, 4pm, Sala Microsoft plopescImporting and syncing content using Feeds Peter VanheeSunday, 12pm, Sala Cenatic pvhee @pvhee