SlideShare a Scribd company logo
7
                                      drupal




Mapping in Drupal
using OpenLayers

Peter Vanhee
1st October 2011 - DrupalCamp Spain
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
What is OpenLayers?
OpenLayers is ...

‣ a framework for building map
  applications
‣ javascript
‣ open source (BSD licensed)
‣ your escape from Google Maps
www.europeancampus.eu
www.managingnews.com
maps.ed.gov
Under Development      7
                    drupal
6  drupal

                             7
                          drupal




‣ OpenLayers CCK         ‣ Geofield
‣ OpenLayers Geocoder    ‣ Geocoder
‣ OpenLayers Filter      ‣ ?
‣ Geo Taxonomy           ‣ ?
‣ OpenLayers Plus        ‣ ?
‣ OpenLayers Proximity   ‣ ?


                          Note that this list is incomplete
Modules
‣ ctools
‣ openlayers
  openlayers_ui, openlayers_views

‣ geofield
  geoPHP

‣ views
Example
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
Adding geo data




                             with lat/lng fields
with OpenLayers Map Widget

      Data is stored in geofield
And our rendered node
Mapping in 3 steps
1. Layer
  Services: Google Maps, MapBox, ...
  Files: KML, XML, ...
  Drupal nodes via Views


2. Map
  Configuration for a single map


3. View
  Displays the map using Views
1. Layer
2. Map
3. View    use Views to select data from CCK
1. Layer
2. Map
3. View    configure data source to pick up the location
1. Layer
2. Map
3. View    pass additional data to the layer
1. Layer
2. Map
3. View    use OpenLayers module to configure map
Mapping in Drupal 7 using OpenLayers
Mapping in Drupal 7 using OpenLayers
Mapping in Drupal 7 using OpenLayers
1. Layer
2. Map
3. View    use Views to display map
1. Layer
2. Map
3. View

           select map to display
Mapping in Drupal 7 using OpenLayers
Step by step

Add geofield (Field)
1. Create data overlay (Views)
2. Create map (OpenLayers)
3. Render map style (Views)
Improvements
Map Behaviors
‣ Pop Up
‣ Zoom to layer
‣ Cluster
‣ Write your own
  (javascript)
Mapping in Drupal 7 using OpenLayers
Change Layers

‣ Google Maps
‣ MapBox
‣ Create your
  own (e.g. via
  TileMill)
Mapping in Drupal 7 using OpenLayers
Geoserver
1. Drupal outputs WFS
   via Views
2. Geoserver reads WFS
   and creates map
3. Openlayers reads
   Geoserver map,
   displays and
   facilitates interaction




         !    6   drupal
                             http://drupal.org/project/wfs
                             http://geoserver.org
Tilemill




      Create your own tiles,
      and render in Drupal
Extending via
Contributed Modules
openlayers_plus
               source: www.europeancampus.eu
                                                  6     drupal




    scale points, add tooltips, ...
               https://github.com/developmentseed/openlayers_plus
geocoder                         7
                                       drupal




‣ From address to location
‣ Use geocoder services (e.g. Google
  Geocoder)
‣ Can take values from Address Field or
  any other text


  !
geocoder      7
           drupal
geocoder      7
           drupal
Would be nice to...

‣ Render live output of geocoding
‣ For Drupal 6, check out the excellent
  Openlayers Geocoder by @nuvoleweb




  !
Extending via Code
‣ 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
Links

‣ http://drupal.org/project/openlayers
‣ OpenLayers for Drupal 6 presentation:
  http://www.slideshare.net/pvhee/introduction-to-
  openlayers-in-drupal
Thanks!


          Peter Vanhee
          @pvhee
Questions?
Drupal + GIS: Convertiendo Drupal en un GeoCMS
Sunday, 4pm, Sala Microsoft plopesc

Importing and syncing content using Feeds        Peter Vanhee
Sunday, 12pm, Sala Cenatic pvhee                 @pvhee

More Related Content

What's hot (20)

PDF
OpenLayers 3
Camptocamp
 
PDF
以 Leaflet 濫用^H^H呈現開放街圖資料
Rex Tsai
 
PPTX
Open layers
Janak Parajuli
 
PDF
Marble Virtual Globe 1.4 Factsheet (English)
Marble Virtual Globe
 
PDF
Marble - ein Schweizer Taschenmesser für Karten
Marble Virtual Globe
 
PDF
Marble Virtual Globe 1.3 Factsheet (English)
Marble Virtual Globe
 
PDF
Answer togoogleearthuniverseandevrythingelse abbreviated
Shashank Singh
 
PDF
Marble Virtual Globe 1.6 Factsheet (English)
Marble Virtual Globe
 
PDF
Using QGIS to create 3D indoor maps
Ross McDonald
 
PDF
Where in the world is Franz Kafka? | Will LaForest, Confluent
HostedbyConfluent
 
PDF
AGIT 2017: Cesium 1.35, WebGL Virtual Globe and Map Engine
Camptocamp
 
PDF
G3m overview
Manuel De La Calle
 
PDF
OpenLayers Feature Frenzy
Andreas Hocevar
 
PPTX
Glob3 Mobile. Point Cloud Streaming
Manuel De La Calle
 
PPTX
Vectorial Streaming. Como FOSS4G Europe 2015
Manuel De La Calle
 
PDF
OL3-Cesium: 3D for OpenLayers maps
Andreas Hocevar
 
PPTX
Google map and navigation
Shalikram Patel
 
PPT
Google Earth
bananagrl6913
 
PDF
Vector Tiles with GeoServer and OpenLayers
Jody Garnett
 
PDF
Vincent Sarago (Mapbox) | Traitement d’imagerie satellitaires de masse en ut...
ACSG Section Montréal
 
OpenLayers 3
Camptocamp
 
以 Leaflet 濫用^H^H呈現開放街圖資料
Rex Tsai
 
Open layers
Janak Parajuli
 
Marble Virtual Globe 1.4 Factsheet (English)
Marble Virtual Globe
 
Marble - ein Schweizer Taschenmesser für Karten
Marble Virtual Globe
 
Marble Virtual Globe 1.3 Factsheet (English)
Marble Virtual Globe
 
Answer togoogleearthuniverseandevrythingelse abbreviated
Shashank Singh
 
Marble Virtual Globe 1.6 Factsheet (English)
Marble Virtual Globe
 
Using QGIS to create 3D indoor maps
Ross McDonald
 
Where in the world is Franz Kafka? | Will LaForest, Confluent
HostedbyConfluent
 
AGIT 2017: Cesium 1.35, WebGL Virtual Globe and Map Engine
Camptocamp
 
G3m overview
Manuel De La Calle
 
OpenLayers Feature Frenzy
Andreas Hocevar
 
Glob3 Mobile. Point Cloud Streaming
Manuel De La Calle
 
Vectorial Streaming. Como FOSS4G Europe 2015
Manuel De La Calle
 
OL3-Cesium: 3D for OpenLayers maps
Andreas Hocevar
 
Google map and navigation
Shalikram Patel
 
Google Earth
bananagrl6913
 
Vector Tiles with GeoServer and OpenLayers
Jody Garnett
 
Vincent Sarago (Mapbox) | Traitement d’imagerie satellitaires de masse en ut...
ACSG Section Montréal
 

Viewers also liked (9)

ODP
Модуль GetLocations. Google Maps API ver.3 и Drupal. DrupalForum ZP 2012.
Dmytro Olaresko
 
PDF
Building applications-with-drupal
Phase2
 
PDF
Drupal and the GeoSpatial Web
Andrew Turner
 
PDF
Creacion del plugin fototeca historica para el proyecto icvgeo del institut c...
GVAcartografic
 
KEY
Thematic Mapping and Drupal: Building Citizen Engagement with Open Source Tools
whurleyf1
 
PPTX
Build an OSM mapping platform with Drupal
Hoshi Liu
 
PPTX
Poultry Farm Management System
bimoljit
 
PDF
Building mobile applications with DrupalGap
Alex S
 
PPT
Transportation management system
Abhay Korat
 
Модуль GetLocations. Google Maps API ver.3 и Drupal. DrupalForum ZP 2012.
Dmytro Olaresko
 
Building applications-with-drupal
Phase2
 
Drupal and the GeoSpatial Web
Andrew Turner
 
Creacion del plugin fototeca historica para el proyecto icvgeo del institut c...
GVAcartografic
 
Thematic Mapping and Drupal: Building Citizen Engagement with Open Source Tools
whurleyf1
 
Build an OSM mapping platform with Drupal
Hoshi Liu
 
Poultry Farm Management System
bimoljit
 
Building mobile applications with DrupalGap
Alex S
 
Transportation management system
Abhay Korat
 
Ad

Similar to Mapping in Drupal 7 using OpenLayers (20)

PDF
Geodaten & Drupal 7
Michael Milz
 
PPT
Geolocation in Drupal
Mediacurrent
 
ODP
OpenLayers for Drupal: The 10,000 Foot View
Robert Bates
 
PPTX
Mapping with Drupal and OpenLayers
thomasturnbull
 
PDF
Mapping in Drupal
Eric Aitala
 
KEY
Don't let maps cramp your style - Prague
Andrew Larcombe
 
PPT
Server side geo_tools_in_drupal_pnw_2012
Mack Hardy
 
PDF
Mapping with Drupal
leoklein
 
PPSX
Building Community Information Systems with Drupal and Open Layers
Charles Burnett
 
PDF
PyDX Presentation about Python, GeoData and Maps
Hannes Hapke
 
PPTX
Where in the world
Marcus Deglos
 
PDF
FOSS4G2011 Report
Meg Murakami
 
PDF
Create a Layar with Drupal
Edward Mac Gillavry
 
PDF
Cartaro Workshop at the Geosharing Conferenc in Bern
Uli Müller
 
PDF
Maps tek11
mayraRojo
 
PDF
MapStore Create, save and share maps and mashups @ GRASS-GFOSS 2013
GeoSolutions
 
ODP
Mapping APIs
Lucas Cotner
 
PDF
GeoNode intro and demo
Paolo Corti
 
PPTX
Going Mobile with HTML5
John Reiser
 
Geodaten & Drupal 7
Michael Milz
 
Geolocation in Drupal
Mediacurrent
 
OpenLayers for Drupal: The 10,000 Foot View
Robert Bates
 
Mapping with Drupal and OpenLayers
thomasturnbull
 
Mapping in Drupal
Eric Aitala
 
Don't let maps cramp your style - Prague
Andrew Larcombe
 
Server side geo_tools_in_drupal_pnw_2012
Mack Hardy
 
Mapping with Drupal
leoklein
 
Building Community Information Systems with Drupal and Open Layers
Charles Burnett
 
PyDX Presentation about Python, GeoData and Maps
Hannes Hapke
 
Where in the world
Marcus Deglos
 
FOSS4G2011 Report
Meg Murakami
 
Create a Layar with Drupal
Edward Mac Gillavry
 
Cartaro Workshop at the Geosharing Conferenc in Bern
Uli Müller
 
Maps tek11
mayraRojo
 
MapStore Create, save and share maps and mashups @ GRASS-GFOSS 2013
GeoSolutions
 
Mapping APIs
Lucas Cotner
 
GeoNode intro and demo
Paolo Corti
 
Going Mobile with HTML5
John Reiser
 
Ad

More from Peter Vanhee (6)

PDF
Going serverless at Comic Relief - July 2019
Peter Vanhee
 
PDF
Predicting peptide interactions using protein building blocks
Peter Vanhee
 
PDF
Going serverless at Comic Relief
Peter Vanhee
 
PDF
Building reusable websites on Drupal 8: lessons learned from transforming red...
Peter Vanhee
 
PDF
Building rednoseday.com on Drupal 8
Peter Vanhee
 
PDF
Importing and synchronizing content using Feeds
Peter Vanhee
 
Going serverless at Comic Relief - July 2019
Peter Vanhee
 
Predicting peptide interactions using protein building blocks
Peter Vanhee
 
Going serverless at Comic Relief
Peter Vanhee
 
Building reusable websites on Drupal 8: lessons learned from transforming red...
Peter Vanhee
 
Building rednoseday.com on Drupal 8
Peter Vanhee
 
Importing and synchronizing content using Feeds
Peter Vanhee
 

Recently uploaded (20)

PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
Bitcoin+ Escalando sin concesiones - Parte 1
Fernando Paredes García
 
PDF
Are there government-backed agri-software initiatives in Limerick.pdf
giselawagner2
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
HydITEx corporation Booklet 2025 English
Георгий Феодориди
 
PPTX
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
PDF
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
PDF
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
PDF
Upgrading to z_OS V2R4 Part 01 of 02.pdf
Flavio787771
 
PDF
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PPTX
UI5Con 2025 - Beyond UI5 Controls with the Rise of Web Components
Wouter Lemaire
 
PDF
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Rethinking Security Operations - Modern SOC.pdf
Haris Chughtai
 
PDF
Novus Safe Lite- What is Novus Safe Lite.pdf
Novus Hi-Tech
 
PPTX
Lifting and Rigging Safety AQG-2025-2.pptx
farrukhkhan658034
 
PPTX
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
PDF
GITLAB-CICD_For_Professionals_KodeKloud.pdf
deepaktyagi0048
 
PDF
"Effect, Fiber & Schema: tactical and technical characteristics of Effect.ts"...
Fwdays
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Bitcoin+ Escalando sin concesiones - Parte 1
Fernando Paredes García
 
Are there government-backed agri-software initiatives in Limerick.pdf
giselawagner2
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
HydITEx corporation Booklet 2025 English
Георгий Феодориди
 
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
Upgrading to z_OS V2R4 Part 01 of 02.pdf
Flavio787771
 
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
UI5Con 2025 - Beyond UI5 Controls with the Rise of Web Components
Wouter Lemaire
 
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Rethinking Security Operations - Modern SOC.pdf
Haris Chughtai
 
Novus Safe Lite- What is Novus Safe Lite.pdf
Novus Hi-Tech
 
Lifting and Rigging Safety AQG-2025-2.pptx
farrukhkhan658034
 
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
GITLAB-CICD_For_Professionals_KodeKloud.pdf
deepaktyagi0048
 
"Effect, Fiber & Schema: tactical and technical characteristics of Effect.ts"...
Fwdays
 

Mapping in Drupal 7 using OpenLayers