SlideShare una empresa de Scribd logo
1 de 21
Descargar para leer sin conexión
Easily Create Maps in Drupal
with Leaflet
May 1, 2014 - Amber Matz - @amberhimes
!
http://lb.cm/acquia-leaflet
!
Hi! I’m Amber.
Lullabot / Drupalize.Me 	

@amberhimes
Easily Create Maps in Drupal
with Leaflet
http://lb.cm/acquia-leaflet
Drupalize.Me Series:
Mapping with Leaflet
Mapping in Drupal
‣ Location Storage
‣ Mapping library
‣ See comparison chart at:
• https://drupal.org/node/1704948
Geofield
‣ Location storage module
‣ Provides a new field type called Geofield
‣ Provides widgets for entering many types of
geospatial data
Leaflet
‣ A lightweight mobile-friendly javascript mapping
library
‣ A Drupal contrib module
‣ Developer API available
Installing Geofield
‣ Download Geofield, GeoPHP, CTools from drupal.org
‣ Enable GeoPHP, CTools, and Geofield
‣ Use drush!
• drush en geofield
• This downloads the module and its dependencies
then enables them!
Add a Geofield
‣ Manage fields on a new or existing content type
‣ Add a new field using Field Type “Geofield”
Create new location content
‣ Add content using the Location content type
‣ Grab the latitude and longitude of a location
• Tip: Go to maps.google.com and click near a marker
to find the lat/long
‣ Enter in the lat/long and submit!
Installing Leaflet
‣ Instructions at https://drupal.org/node/1645460
‣ Install Leaflet JS to sites/all/libraries
• http://leafletjs.com/download.html
‣ Download and Enable Leaflet Drupal Module
• https://drupal.org/project/leaflet
Your First Leaflet Map
‣ Manage display of Geofield on content type
‣ Update Format to Leaflet
‣ Click gear
‣ Choose Leaflet Map: OSM Mapnik
‣ Click Update
‣ Click Save
Leaflet Map Didn’t Display! :(
‣ Check the status report page to make sure Leaflet is
installed correctly. If there is an error:
• Check permissions of sites/all/libraries/leaflet
• Check the Leaflet Issue Queue
‣ OSM Mapnik tiles are externally hosted.
• Make sure you are connected to the Internet.
Create a Leaflet Map with Views
‣ Enable Leaflet Views (leaflet_views) & Views UI
modules
• Download dependencies (Views, Entity), if necessary
‣ Create a new view using display format: Leaflet Map
‣ Add Geofield to Fields and “Exclude from display”
Leaflet Map Settings in Views
‣ Title => Title Field
‣ Description => <node entity>
• View mode: Teaser (or custom view mode)
Other things you can do…
Custom icons
‣ Save marker image to a good place in /sites/default/
files
‣ Make sure it’s appropriately sized
‣ Update Point Icon in Leaflet Map settings
Add more map options
‣ Leaflet More Maps
• https://drupal.org/project/leaflet_more_maps
!
‣ Provides more maps for Leaflet!
Change zoom settings
‣ Each map has a min/max zoom range
‣ Zoom range is indicated next to map name
Use tokens in popup
‣ Enable token module
‣ Enable popup
‣ Copy/paste token into popup text field
Mapping with Leaflet Series
‣ Video series available on Drupalize.Me
‣ An extended and more in-depth version of this
presentation.
Easily Create Maps in Drupal
with Leaflet
!
http://lb.cm/acquia-leaflet
!

Más contenido relacionado

La actualidad más candente

Deploy Golang WebApp dengan AWS App Runner
Deploy Golang WebApp dengan AWS App RunnerDeploy Golang WebApp dengan AWS App Runner
Deploy Golang WebApp dengan AWS App Runner
Rio Astamal
 

La actualidad más candente (12)

Deploy Golang WebApp dengan AWS App Runner
Deploy Golang WebApp dengan AWS App RunnerDeploy Golang WebApp dengan AWS App Runner
Deploy Golang WebApp dengan AWS App Runner
 
Oracle VM - the Heart of Oracle Cloud
Oracle VM - the Heart of Oracle CloudOracle VM - the Heart of Oracle Cloud
Oracle VM - the Heart of Oracle Cloud
 
Azure AD B2C – integration in a bank
Azure AD B2C – integration in a bankAzure AD B2C – integration in a bank
Azure AD B2C – integration in a bank
 
Introduction to DDD
Introduction to DDDIntroduction to DDD
Introduction to DDD
 
Validate your entities with symfony validator and entity validation api
Validate your entities with symfony validator and entity validation apiValidate your entities with symfony validator and entity validation api
Validate your entities with symfony validator and entity validation api
 
1시간으로 끝내는 클라우드 개념_김민형 클라우드 솔루션 아키텍트
1시간으로 끝내는 클라우드 개념_김민형 클라우드 솔루션 아키텍트1시간으로 끝내는 클라우드 개념_김민형 클라우드 솔루션 아키텍트
1시간으로 끝내는 클라우드 개념_김민형 클라우드 솔루션 아키텍트
 
MySQL NDB Cluster 101
MySQL NDB Cluster 101MySQL NDB Cluster 101
MySQL NDB Cluster 101
 
Oracle EPM - Life cycle management
Oracle EPM - Life cycle managementOracle EPM - Life cycle management
Oracle EPM - Life cycle management
 
KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...
KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...
KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...
 
Présentation IBM InfoSphere MDM 11.3
Présentation IBM InfoSphere MDM 11.3Présentation IBM InfoSphere MDM 11.3
Présentation IBM InfoSphere MDM 11.3
 
클라이드 네이티브 기반 Twelve Factor 앱 개발 - 윤석찬, AWS 테크에반젤리스트 :: AWS Summit Online Kore...
클라이드 네이티브 기반 Twelve Factor 앱 개발 - 윤석찬, AWS 테크에반젤리스트 :: AWS Summit Online Kore...클라이드 네이티브 기반 Twelve Factor 앱 개발 - 윤석찬, AWS 테크에반젤리스트 :: AWS Summit Online Kore...
클라이드 네이티브 기반 Twelve Factor 앱 개발 - 윤석찬, AWS 테크에반젤리스트 :: AWS Summit Online Kore...
 
Development and Test on AWS
Development and Test on AWSDevelopment and Test on AWS
Development and Test on AWS
 

Similar a 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
Amber Matz
 
PPPA D8 presentation Drupal For Gov_0
PPPA D8 presentation Drupal For Gov_0PPPA D8 presentation Drupal For Gov_0
PPPA D8 presentation Drupal For Gov_0
Stan Ascher
 

Similar a Easily Create Maps in Drupal with Leaflet (20)

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
 
Leaflet
LeafletLeaflet
Leaflet
 
Mapping in Drupal 7 using OpenLayers
Mapping in Drupal 7 using OpenLayersMapping in Drupal 7 using OpenLayers
Mapping in Drupal 7 using OpenLayers
 
CKEditor Widgets with Drupal
CKEditor Widgets with DrupalCKEditor Widgets with Drupal
CKEditor Widgets with Drupal
 
Of Nodes and Maps (Web Mapping with Drupal - Part II)
Of Nodes and Maps (Web Mapping with Drupal - Part II)Of Nodes and Maps (Web Mapping with Drupal - Part II)
Of Nodes and Maps (Web Mapping with Drupal - Part II)
 
Mapping in Drupal using OpenLayers
Mapping in Drupal using OpenLayersMapping in Drupal using OpenLayers
Mapping in Drupal using OpenLayers
 
PPPA D8 presentation Drupal For Gov_0
PPPA D8 presentation Drupal For Gov_0PPPA D8 presentation Drupal For Gov_0
PPPA D8 presentation Drupal For Gov_0
 
Global mapperhelp
Global mapperhelpGlobal mapperhelp
Global mapperhelp
 
Leveraging Helm to manage Deployments on Kubernetes
Leveraging Helm to manage Deployments on KubernetesLeveraging Helm to manage Deployments on Kubernetes
Leveraging Helm to manage Deployments on Kubernetes
 
ITB2016 Converting Legacy Apps into Modern MVC
ITB2016 Converting Legacy Apps into Modern MVCITB2016 Converting Legacy Apps into Modern MVC
ITB2016 Converting Legacy Apps into Modern MVC
 
Global mapperhelp
Global mapperhelpGlobal mapperhelp
Global mapperhelp
 
Drupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentDrupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven Development
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8
 
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
 
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)
 
Qgis walkthrough
Qgis walkthroughQgis walkthrough
Qgis walkthrough
 
Siebel Open UI Presentation
Siebel Open UI PresentationSiebel Open UI Presentation
Siebel Open UI Presentation
 
Android - Android Application Configuration
Android - Android Application ConfigurationAndroid - Android Application Configuration
Android - Android Application Configuration
 
Drupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDrupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 version
 
The Synergy of Drupal Hooks/APIs (Custom Module Development with ChartJS)
The Synergy of Drupal Hooks/APIs (Custom Module Development with ChartJS)The Synergy of Drupal Hooks/APIs (Custom Module Development with ChartJS)
The Synergy of Drupal Hooks/APIs (Custom Module Development with ChartJS)
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Easily Create Maps in Drupal with Leaflet

  • 1. Easily Create Maps in Drupal with Leaflet May 1, 2014 - Amber Matz - @amberhimes ! http://lb.cm/acquia-leaflet !
  • 2. Hi! I’m Amber. Lullabot / Drupalize.Me @amberhimes
  • 3. Easily Create Maps in Drupal with Leaflet http://lb.cm/acquia-leaflet Drupalize.Me Series: Mapping with Leaflet
  • 4. Mapping in Drupal ‣ Location Storage ‣ Mapping library ‣ See comparison chart at: • https://drupal.org/node/1704948
  • 5. Geofield ‣ Location storage module ‣ Provides a new field type called Geofield ‣ Provides widgets for entering many types of geospatial data
  • 6. Leaflet ‣ A lightweight mobile-friendly javascript mapping library ‣ A Drupal contrib module ‣ Developer API available
  • 7. Installing Geofield ‣ Download Geofield, GeoPHP, CTools from drupal.org ‣ Enable GeoPHP, CTools, and Geofield ‣ Use drush! • drush en geofield • This downloads the module and its dependencies then enables them!
  • 8. Add a Geofield ‣ Manage fields on a new or existing content type ‣ Add a new field using Field Type “Geofield”
  • 9. Create new location content ‣ Add content using the Location content type ‣ Grab the latitude and longitude of a location • Tip: Go to maps.google.com and click near a marker to find the lat/long ‣ Enter in the lat/long and submit!
  • 10. Installing Leaflet ‣ Instructions at https://drupal.org/node/1645460 ‣ Install Leaflet JS to sites/all/libraries • http://leafletjs.com/download.html ‣ Download and Enable Leaflet Drupal Module • https://drupal.org/project/leaflet
  • 11. Your First Leaflet Map ‣ Manage display of Geofield on content type ‣ Update Format to Leaflet ‣ Click gear ‣ Choose Leaflet Map: OSM Mapnik ‣ Click Update ‣ Click Save
  • 12. Leaflet Map Didn’t Display! :( ‣ Check the status report page to make sure Leaflet is installed correctly. If there is an error: • Check permissions of sites/all/libraries/leaflet • Check the Leaflet Issue Queue ‣ OSM Mapnik tiles are externally hosted. • Make sure you are connected to the Internet.
  • 13. Create a Leaflet Map with Views ‣ Enable Leaflet Views (leaflet_views) & Views UI modules • Download dependencies (Views, Entity), if necessary ‣ Create a new view using display format: Leaflet Map ‣ Add Geofield to Fields and “Exclude from display”
  • 14. Leaflet Map Settings in Views ‣ Title => Title Field ‣ Description => <node entity> • View mode: Teaser (or custom view mode)
  • 15. Other things you can do…
  • 16. Custom icons ‣ Save marker image to a good place in /sites/default/ files ‣ Make sure it’s appropriately sized ‣ Update Point Icon in Leaflet Map settings
  • 17. Add more map options ‣ Leaflet More Maps • https://drupal.org/project/leaflet_more_maps ! ‣ Provides more maps for Leaflet!
  • 18. Change zoom settings ‣ Each map has a min/max zoom range ‣ Zoom range is indicated next to map name
  • 19. Use tokens in popup ‣ Enable token module ‣ Enable popup ‣ Copy/paste token into popup text field
  • 20. Mapping with Leaflet Series ‣ Video series available on Drupalize.Me ‣ An extended and more in-depth version of this presentation.
  • 21. Easily Create Maps in Drupal with Leaflet ! http://lb.cm/acquia-leaflet !