SlideShare una empresa de Scribd logo
1 de 44
Descargar para leer sin conexión
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
1. Layer
2. Map
3. View    use Views to display map
1. Layer
2. Map
3. View

           select map to display
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)
Change Layers

‣ Google Maps
‣ MapBox
‣ Create your
  own (e.g. via
  TileMill)
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

Más contenido relacionado

La actualidad más candente

Answer togoogleearthuniverseandevrythingelse abbreviated
Answer togoogleearthuniverseandevrythingelse abbreviatedAnswer togoogleearthuniverseandevrythingelse abbreviated
Answer togoogleearthuniverseandevrythingelse abbreviated
Shashank Singh
 

La actualidad más candente (20)

OpenLayers 3
OpenLayers 3OpenLayers 3
OpenLayers 3
 
以 Leaflet 濫用^H^H呈現開放街圖資料
以 Leaflet 濫用^H^H呈現開放街圖資料以 Leaflet 濫用^H^H呈現開放街圖資料
以 Leaflet 濫用^H^H呈現開放街圖資料
 
Open layers
Open layersOpen layers
Open layers
 
Marble Virtual Globe 1.4 Factsheet (English)
Marble Virtual Globe 1.4 Factsheet (English)Marble Virtual Globe 1.4 Factsheet (English)
Marble Virtual Globe 1.4 Factsheet (English)
 
Marble - ein Schweizer Taschenmesser für Karten
Marble - ein Schweizer Taschenmesser für KartenMarble - ein Schweizer Taschenmesser für Karten
Marble - ein Schweizer Taschenmesser für Karten
 
Marble Virtual Globe 1.3 Factsheet (English)
Marble Virtual Globe 1.3 Factsheet (English)Marble Virtual Globe 1.3 Factsheet (English)
Marble Virtual Globe 1.3 Factsheet (English)
 
Answer togoogleearthuniverseandevrythingelse abbreviated
Answer togoogleearthuniverseandevrythingelse abbreviatedAnswer togoogleearthuniverseandevrythingelse abbreviated
Answer togoogleearthuniverseandevrythingelse abbreviated
 
Marble Virtual Globe 1.6 Factsheet (English)
Marble Virtual Globe 1.6 Factsheet (English)Marble Virtual Globe 1.6 Factsheet (English)
Marble Virtual Globe 1.6 Factsheet (English)
 
Using QGIS to create 3D indoor maps
Using QGIS to create 3D indoor mapsUsing QGIS to create 3D indoor maps
Using QGIS to create 3D indoor maps
 
Where in the world is Franz Kafka? | Will LaForest, Confluent
Where in the world is Franz Kafka? | Will LaForest, ConfluentWhere in the world is Franz Kafka? | Will LaForest, Confluent
Where in the world is Franz Kafka? | Will LaForest, Confluent
 
AGIT 2017: Cesium 1.35, WebGL Virtual Globe and Map Engine
AGIT 2017: Cesium 1.35, WebGL Virtual Globe and Map EngineAGIT 2017: Cesium 1.35, WebGL Virtual Globe and Map Engine
AGIT 2017: Cesium 1.35, WebGL Virtual Globe and Map Engine
 
G3m overview
G3m overviewG3m overview
G3m overview
 
OpenLayers Feature Frenzy
OpenLayers Feature FrenzyOpenLayers Feature Frenzy
OpenLayers Feature Frenzy
 
Glob3 Mobile. Point Cloud Streaming
Glob3 Mobile. Point Cloud StreamingGlob3 Mobile. Point Cloud Streaming
Glob3 Mobile. Point Cloud Streaming
 
Vectorial Streaming. Como FOSS4G Europe 2015
 Vectorial Streaming. Como  FOSS4G Europe 2015 Vectorial Streaming. Como  FOSS4G Europe 2015
Vectorial Streaming. Como FOSS4G Europe 2015
 
OL3-Cesium: 3D for OpenLayers maps
OL3-Cesium: 3D for OpenLayers mapsOL3-Cesium: 3D for OpenLayers maps
OL3-Cesium: 3D for OpenLayers maps
 
Google map and navigation
Google map and navigation Google map and navigation
Google map and navigation
 
Google Earth
Google EarthGoogle Earth
Google Earth
 
Vector Tiles with GeoServer and OpenLayers
Vector Tiles with GeoServer and OpenLayersVector Tiles with GeoServer and OpenLayers
Vector Tiles with GeoServer and OpenLayers
 
Vincent Sarago (Mapbox) | Traitement d’imagerie satellitaires de masse en ut...
Vincent Sarago (Mapbox)  | Traitement d’imagerie satellitaires de masse en ut...Vincent Sarago (Mapbox)  | Traitement d’imagerie satellitaires de masse en ut...
Vincent Sarago (Mapbox) | Traitement d’imagerie satellitaires de masse en ut...
 

Destacado

Drupal and the GeoSpatial Web
Drupal and the GeoSpatial WebDrupal and the GeoSpatial Web
Drupal and the GeoSpatial Web
Andrew Turner
 
Thematic Mapping and Drupal: Building Citizen Engagement with Open Source Tools
Thematic Mapping and Drupal: Building Citizen Engagement with Open Source ToolsThematic Mapping and Drupal: Building Citizen Engagement with Open Source Tools
Thematic Mapping and Drupal: Building Citizen Engagement with Open Source Tools
whurleyf1
 

Destacado (9)

Модуль GetLocations. Google Maps API ver.3 и Drupal. DrupalForum ZP 2012.
Модуль GetLocations. Google Maps API ver.3 и Drupal. DrupalForum ZP 2012.Модуль GetLocations. Google Maps API ver.3 и Drupal. DrupalForum ZP 2012.
Модуль GetLocations. Google Maps API ver.3 и Drupal. DrupalForum ZP 2012.
 
Building applications-with-drupal
Building applications-with-drupalBuilding applications-with-drupal
Building applications-with-drupal
 
Drupal and the GeoSpatial Web
Drupal and the GeoSpatial WebDrupal and the GeoSpatial Web
Drupal and the GeoSpatial Web
 
Creacion del plugin fototeca historica para el proyecto icvgeo del institut c...
Creacion del plugin fototeca historica para el proyecto icvgeo del institut c...Creacion del plugin fototeca historica para el proyecto icvgeo del institut c...
Creacion del plugin fototeca historica para el proyecto icvgeo del institut c...
 
Thematic Mapping and Drupal: Building Citizen Engagement with Open Source Tools
Thematic Mapping and Drupal: Building Citizen Engagement with Open Source ToolsThematic Mapping and Drupal: Building Citizen Engagement with Open Source Tools
Thematic Mapping and Drupal: Building Citizen Engagement with Open Source Tools
 
Build an OSM mapping platform with Drupal
Build an OSM mapping platform with DrupalBuild an OSM mapping platform with Drupal
Build an OSM mapping platform with Drupal
 
Poultry Farm Management System
Poultry Farm Management SystemPoultry Farm Management System
Poultry Farm Management System
 
Building mobile applications with DrupalGap
Building mobile applications with DrupalGapBuilding mobile applications with DrupalGap
Building mobile applications with DrupalGap
 
Transportation management system
Transportation management systemTransportation management system
Transportation management system
 

Similar a Mapping in Drupal 7 using OpenLayers

Easily Create Maps in Drupal with Leaflet
Easily Create Maps in Drupal with LeafletEasily Create Maps in Drupal with Leaflet
Easily Create Maps in Drupal with Leaflet
Amber Matz
 
Geopaparazzi workshop on FOSS4G2015 Seoul
Geopaparazzi workshop on FOSS4G2015 SeoulGeopaparazzi workshop on FOSS4G2015 Seoul
Geopaparazzi workshop on FOSS4G2015 Seoul
Hirofumi Hayashi
 
Open Source GeoSpatial
Open Source GeoSpatialOpen Source GeoSpatial
Open Source GeoSpatial
arno974
 

Similar a Mapping in Drupal 7 using OpenLayers (20)

Geodaten & Drupal 7
Geodaten & Drupal 7Geodaten & Drupal 7
Geodaten & Drupal 7
 
Mapping with Drupal and OpenLayers
Mapping with Drupal and OpenLayersMapping with Drupal and OpenLayers
Mapping with Drupal and OpenLayers
 
Easily Create Maps in Drupal with Leaflet
Easily Create Maps in Drupal with LeafletEasily Create Maps in Drupal with Leaflet
Easily Create Maps in Drupal with Leaflet
 
Easily Create Maps in Drupal with Leaflet
Easily Create Maps in Drupal with LeafletEasily Create Maps in Drupal with Leaflet
Easily Create Maps in Drupal with Leaflet
 
Open@EDINA
Open@EDINAOpen@EDINA
Open@EDINA
 
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
 
Sharing the Openness of the Maps via FOSS4G and the Web
Sharing the Openness of the Maps via FOSS4G and the WebSharing the Openness of the Maps via FOSS4G and the Web
Sharing the Openness of the Maps via FOSS4G and the Web
 
Map Styling Tools and Interactive maps on the web with OpenLayers - Addy Pope...
Map Styling Tools and Interactive maps on the web with OpenLayers - Addy Pope...Map Styling Tools and Interactive maps on the web with OpenLayers - Addy Pope...
Map Styling Tools and Interactive maps on the web with OpenLayers - Addy Pope...
 
OpenLayers for Drupal: The 10,000 Foot View
OpenLayers for Drupal: The 10,000 Foot ViewOpenLayers for Drupal: The 10,000 Foot View
OpenLayers for Drupal: The 10,000 Foot View
 
When Drupal met CARTO
When Drupal met CARTOWhen Drupal met CARTO
When Drupal met CARTO
 
FOSS4G-NA 2012 : ReadyMap - OpenLayers in 3D
FOSS4G-NA 2012 : ReadyMap - OpenLayers in 3DFOSS4G-NA 2012 : ReadyMap - OpenLayers in 3D
FOSS4G-NA 2012 : ReadyMap - OpenLayers in 3D
 
Processing Landsat 8 Multi-Spectral Images with GRASS Tools & the potential o...
Processing Landsat 8 Multi-Spectral Images with GRASS Tools & the potential o...Processing Landsat 8 Multi-Spectral Images with GRASS Tools & the potential o...
Processing Landsat 8 Multi-Spectral Images with GRASS Tools & the potential o...
 
Geopaparazzi workshop on FOSS4G2015 Seoul
Geopaparazzi workshop on FOSS4G2015 SeoulGeopaparazzi workshop on FOSS4G2015 Seoul
Geopaparazzi workshop on FOSS4G2015 Seoul
 
Building Maps with Leaflet
Building Maps with LeafletBuilding Maps with Leaflet
Building Maps with Leaflet
 
Open Source GeoSpatial
Open Source GeoSpatialOpen Source GeoSpatial
Open Source GeoSpatial
 
Dmytro Safonov "Open-Source Map Viewers"
Dmytro Safonov  "Open-Source Map Viewers"Dmytro Safonov  "Open-Source Map Viewers"
Dmytro Safonov "Open-Source Map Viewers"
 
EDINA's Open Geo-Services
EDINA's Open Geo-ServicesEDINA's Open Geo-Services
EDINA's Open Geo-Services
 
GeoServer Orientation
GeoServer OrientationGeoServer Orientation
GeoServer Orientation
 
Qgis walkthrough
Qgis walkthroughQgis walkthrough
Qgis walkthrough
 
Grails beginners workshop
Grails beginners workshopGrails beginners workshop
Grails beginners workshop
 

Más de Peter Vanhee (6)

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

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Mapping in Drupal 7 using OpenLayers