Geospatial Drupal Adam Bramley Introduction Catalyst IT - 3+ - - PowerPoint PPT Presentation
Geospatial Drupal Adam Bramley Introduction Catalyst IT - 3+ - - PowerPoint PPT Presentation
Geospatial Drupal Adam Bramley Introduction Catalyst IT - 3+ years Senior Drupal Developer Live public projects www.health.govt.nz www.transpower.co.nz www.scmp.com www.systemoperator.co.nz
Geospatial Drupal
Introduction
- Catalyst IT - 3+ years
- Senior Drupal Developer
- Live public projects
○ www.health.govt.nz ○ www.transpower.co.nz ○ www.scmp.com ○ www.systemoperator.co.nz ○ www.elections.org.nz
- Twitter - @theacbramley
- Drupal - @acbramley
- NB: I’m not an Openlayers or Leaflet expert
Geospatial Drupal
Why are you here?
- Help you decide which mapping library is for you.
○ Comparing a popular library to a new/upcoming library.
- Show you how easy it is to build something powerful without
coding.
- Inspire you to build something epic with a glimpse at a more
complex system using a map frontend.
Geospatial Drupal
Background
- Worked with Openlayers when implementing a mapping
solution for transpower.co.nz
- It was a love hate relationship.
- Upgrades broke things.
- When another project required a clever mapping
solution we used our experience with Openlayers.
Geospatial Drupal
Background
- Part of the way through, it was clear that Openlayers
was not going to meet all of our requirements.
- We installed and configured Leaflet and, through black
magic, all of our issues disappeared.
Geospatial Drupal
IE Compatibility Accessibility (keyboard) Load times Point/cluster styling
Geospatial Drupal
Clash of the Titans
A comparative overview
July 2011 version 1.1 2k+ sites using 13k+ downloads Sept 2007 version beta7 10k+ sites using 160k+ downloads
Leaflet Openlayers Module release
Geospatial Drupal
Clash of the Titans
A comparative overview
Lib total: 360kB Module total: 20kB Minified js: 125kB Lib total: 70MB Module total: 300kB Minified js: ~800kB
Leaflet Openlayers Module/Library size
Geospatial Drupal
Clash of the Titans
A comparative overview
- Libraries
- Geofield (for our purposes)
○ geophp
- Views (for our purposes)
- Libraries
- Proj4js (+lib)
- Ctools
- File
- Image
- Geofield (for our purposes)
○ geophp
- Views (for our purposes)
Leaflet Openlayers Dependencies
Geospatial Drupal
Clash of the Titans
A comparative overview
8.x release Single layer (views) No external CDN option No 8.x release Infinite layers External CDN available
Leaflet Openlayers Misc.
Geospatial Drupal
Clash of the Titans
A comparative overview
Plugins through other modules 2 files per “plugin” (.js and .inc)
Leaflet Openlayers Module implementation
Geospatial Drupal
Leaflet Module implementation
- Extend functionality with other modules (clustering, url hashing
etc). ○ http://drupal.org/project/leaflet_markercluster ○ http://drupal.org/project/leaflet_more_maps
- Admin interface = views interface
- Settings controlled via a hook.
- Some configuration moving into views.
Geospatial Drupal
Leaflet Module implementation Hook configuration
Geospatial Drupal
Leaflet Map Administration Views configuration
Geospatial Drupal
Geospatial Drupal
Openlayers Module implementation
- Extend functionality with ctools plugins (a lot exist in the main
module) ○ 1 js file, 1 .inc file ○ These can be behaviours (cluster, zoom to layer) or other things like layer types.
- Admin interface overload.
- Settings entirely through admin interfaces.
Geospatial Drupal
Openlayers Map Administration
Geospatial Drupal
Openlayers Map Administration
Geospatial Drupal
Openlayers Map Administration
Geospatial Drupal
Openlayers Map Administration
Geospatial Drupal
Openlayers Module implementation
Geospatial Drupal
Openlayers Map Administration
Geospatial Drupal
Geospatial Drupal
Geospatial Drupal
Case Study - Ministry of Health
- Goal of project: provide more information to the public
- n certified providers for health care (public hospitals,
rest homes, fertility clinics etc)
- Display certified providers on a filterable, searchable
map with links to more details.
Provider Regulatory Monitoring System
Geospatial Drupal
Provider Regulatory Monitoring System
XML (update/delete) Drupal
POST
Geospatial Drupal
Provider Regulatory Monitoring System
Entity Parse Query
Geospatial Drupal
- Integration with
○ Apache Solr ○ Facetapi ○ Page Manager ○ Entity cache ○ Field API ○ Views ○ Pathauto
Provider Regulatory Monitoring System
Geospatial Drupal
Provider Regulatory Monitoring System
DEMO
http://www.health.govt.nz/resthomes
Geospatial Drupal
Conclusions
- Leaflet’s slim and modern approach makes it easy for site builders to use
and easy for developers to maintain and extend.
- Openlayers is good for complex, multi-layered maps without having to write
any code. ○ Advanced layer types ○ External layer data
- Openlayers has a much steeper learning curve.
Geospatial Drupal
Geospatial Drupal
Geospatial Drupal
Geospatial Drupal
Questions?
adam@catalyst.net.nz Slides: http://bit.ly/1bU3s2V