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 ○ 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) Point/cluster styling Load times Geospatial Drupal
Clash of the Titans A comparative overview Module release Leaflet Openlayers July 2011 Sept 2007 version 1.1 version beta7 2k+ sites using 10k+ sites using 13k+ downloads 160k+ downloads Geospatial Drupal
Clash of the Titans A comparative overview Module/Library size Leaflet Openlayers Lib total: 360kB Lib total: 70MB Module total: 20kB Module total: 300kB Minified js: 125kB Minified js: ~800kB Geospatial Drupal
Clash of the Titans A comparative overview Dependencies Leaflet Openlayers ● Libraries ● Libraries ● Geofield (for our purposes) ● Proj4js (+lib) ○ geophp ● Ctools ● Views (for our purposes) ● File ● Image ● Geofield (for our purposes) ○ geophp ● Views (for our purposes) Geospatial Drupal
Clash of the Titans A comparative overview Misc. Leaflet Openlayers 8.x release No 8.x release Single layer (views) Infinite layers No external CDN option External CDN available Geospatial Drupal
Clash of the Titans A comparative overview Module implementation Leaflet Openlayers Plugins through other 2 files per “plugin” modules (.js and .inc) Geospatial Drupal
Module implementation Leaflet ● 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
Module implementation Leaflet Hook configuration Geospatial Drupal
Map Administration Leaflet Views configuration Geospatial Drupal
Geospatial Drupal
Module implementation Openlayers ● 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
Map Administration Openlayers Geospatial Drupal
Map Administration Openlayers Geospatial Drupal
Map Administration Openlayers Geospatial Drupal
Map Administration Openlayers Geospatial Drupal
Module implementation Openlayers Geospatial Drupal
Map Administration Openlayers Geospatial Drupal
Geospatial Drupal
Geospatial Drupal
Case Study - Ministry of Health Provider Regulatory Monitoring System ● Goal of project: provide more information to the public on 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. Geospatial Drupal
Provider Regulatory Monitoring System XML (update/delete) POST Drupal Geospatial Drupal
Provider Regulatory Monitoring System Parse Entity Query Geospatial Drupal
Provider Regulatory Monitoring System ● Integration with ○ Apache Solr ○ Facetapi ○ Page Manager ○ Entity cache ○ Field API ○ Views ○ Pathauto 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 Geospatial Drupal
Recommend
More recommend