where it s at where it s at
play

WHERE ITS AT WHERE ITS AT Martin Anderson-Clutz Digital Echidna - PowerPoint PPT Presentation

Location and Mapping in Drupal: WHERE ITS AT WHERE ITS AT Martin Anderson-Clutz Digital Echidna What This Presentation IS A primer on mapping and location for websites A comparative look at Drupal solutions An outgrowth of my


  1. Location and Mapping in Drupal: WHERE IT’S AT WHERE IT’S AT Martin Anderson-Clutz Digital Echidna

  2. What This Presentation IS • A primer on mapping and location for websites • A comparative look at Drupal solutions • An outgrowth of my personal experience in in building a location and mapping site – YMMV • A work in progress – Feedback is welcome!

  3. What it IS NOT • Detailed, step-by-step instructions • An exhaustive look at every option available – Chime in if you have a favourite that isn’t mentioned!

  4. CONTEXT CONTEXT

  5. Use Cases • Static Map – “Our Locations” • Dynamic Map – “Users Logged In” • Relative Locations – “Retailers < 10km”

  6. Core Concepts • Mapping – Visualizing location data, often with known landmarks for reference • Geocoding – Enriching the description of a location with geographic coordinates • Description: “103 King St., London, ON” • Coordinates: 42.981860, -81.251414

  7. Let’s look at some OPTIONS OPTIONS

  8. Mapping Options • Google, OpenStreetMaps, Leaflet, Bing, Yahoo, MapQuest, etc. • Considerations: – Customizability – License restrictions • Limits • Use in paid and/or private sites • Offline use

  9. Geocoding Options • Google, OpenStreetMaps, Bing, Yahoo, MapQuest, etc. • Considerations: – Limits – Speed – Uptime – Able to store results

  10. API Limits

  11. Drupal Options • Raw embed • Simple Google Maps • Location Map • Location • Geolocation Field • Get Locations • GeoField

  12. Raw Embed • Put location into Google Maps (or other map site with embed function) • Copy and paste embed code into Drupal (body text, block, bean, etc.) • Ensure text format applied allows necessary tags

  13. Raw Embed • PRO – Simple setup – No API key required • CON – Update requires redo on external site – Allowing editor update may require allowing broader access on rest of site – Doesn’t scale

  14. Simple Google Maps • 100% reliant on Google • No geocoding, output is effectively a single-result Google Maps search • Update the input text to update the address

  15. Simple Google Maps • PRO – Simple to implement – Simple to update – No API key required • CON – No option to manually tweak location or map – Potential for bad (even erroneous) input – Only show one location

  16. Location Map • Similar to Simple Google Maps – relies on Google, map for one node • Allows for fine tuning of location

  17. Location Map • PRO – Simple to implement – Simple to update – No API key required – Option to manually tweak location or map • CON – Only show one location

  18. Location, GMap • Location provides an API, storage, and geocoding – Submodules provide additional data points and integrations • Gmap module provides maps – May be possible to use Get Locations Map instead

  19. Location, GMap • PRO – Proximity search is baked in – Views integration • CON – Limited options for geocoding and mapping – Was late to game with D7, no releases yet for D8 – Fatal error in Location geocoding config. Raised two years ago, no resolution – Non-standard way of managing attachment to content types

  20. Geolocation Field • Provides a field designed to be a simple method for storing coordinates and related data • Options for geocoding, proximity, HTML5 input and maps by Google • Stable D8 release already available, as a complete rewrite

  21. Geolocation Field • PRO – Powerful – Simple setup – Use with all fieldable entities – Sweet HTML5/Google Places input – D8 ready-ish • CON – Current integrations tied to Google – Map input doesn’t allow for storage and display of address

  22. Example Interface

  23. Example Config

  24. Get Locations • By default builds a map per node and per content type • Options to use different libraries to cluster, different markers, etc. • Google Maps API v3, Leaflet, others for mapping, geocoding via Google or OpenStreetMaps • Can be used in conjunction with Views, Geofield, Addressfield, Geolocation, Location, Getdirections, Smart IP, Openlayers, Colourbox, more • Get Locations Fields does a Google Places search on place name and will populate address • Current D8 stance is leaving the work of porting to others

  25. Get Locations • PRO – Views support – Very active development – Loads of options for input, display – Populates address information • CON – No D8 releases yet – Works best with locations already in Google

  26. Budweiser Gardens

  27. Bud Gardens Interface

  28. Budweiser Gardens

  29. GetLocations Config

  30. GetLocations Config

  31. GetLocations Config

  32. GetLocations Config

  33. GeoField • Perhaps the most talked about D8 location solution • By itself is a container for coordinate data – Addressfield and Geocoder to interpret from natural language • Multiple mapping solutions – Openlayers is an amazing but complex toolkit • Proximity search including Solr

  34. GeoField • PRO – Ability to customize virtually any part of the location handling and mapping – Seems to be the solution with the most momentum • CON – You’re about to find out how deep the rabbit hole goes – Some challenges in using different pieces to assemble a solution – No documentation yet for recommended version of OpenLayers (7.x-3.0-beta3)

  35. Lehigh University

  36. Lehigh University

  37. Lehigh University

  38. Lehigh University

  39. Lehigh University • https://memories.lehigh.edu/locations/ 159

  40. Example Interface

  41. Example Interface

  42. Addressfield Config

  43. GeoField, OpenLayers

  44. OpenLayers: Map Settings

  45. OpenLayers: Map Settings

  46. OpenLayers: Layers, Sources

  47. OpenLayers: Controls

  48. OpenLayers: Interactions

  49. OpenLayers: Components

  50. Drupal 8 • Geolocation – stable • GetLocations – asked for assistance • Geofield – alpha • Addressfield – replaced by Address (beta) • Geocoder – beta • Leaflet – beta • OpenLayers – to start after 7.x-3.x branch stable

  51. PIECING THEM PIECING THEM TOGETHER TOGETHER

  52. Location Tools Simple Google Map Simple Google Map Location Map Location Map Geolocation Geolocation Field Field Location Location Get Locations Get Locations GeoField GeoField D7 7.x-1.2 7.x-2.3 7.x-1.6 7.x-3.7 7.x-1.17 7.x-2.3 Released 2014-Jan-03 2014-May-24 2014-Nov-03 2015-Aug-04 2015-Oct-08 2014-Sep-21 D7 Users 26,954 13,355 12,394 47,755 9,099 39328 D8 8.x-1.x-dev 8.x-2.x-dev 8.x-1.4 n/a n/a 8.x-1.0-alpha1 Released 2015-Oct-11 2013-Sep-30 2014-Oct-12 2014-Oct-28 D8 Users 36 14 20 Dependencies GMap Module (for Modules map) Libraries Addressfield Libraries Services Google Google Google Views integration Y Y Y Y N Proximity Y Y Y Y N N Documentatio n N Y Y Y N N Submodules Location, User Locations, Getlocations Search, Compatible Modules: Phone and Location Fax, Getlocations Block, Addressfield, Location Search, Location Getlocations Location OpenLayers, Static Map, CCK, Location Generate, Taxonomize, Getlocations Leafle, Leaflet Widget, Location Add Another, Map, Getlocations Leaflet, Geocoder, Geocoder Location Entity, Search Getlocations Tools, AutoComplete, Address API Getlocations GPS Field, Sync PostGIS, Location Taxonomy, Openlayers Apachesolr, Location Email Openlayers CCK Migrate, RSS Field Formatters, Views GeoJSON, Search API Location, Spatial Tools, Geofield PostGIS, Geofield Proximity Plugin

  53. Mapping Tools Simple Google Simple Google Location Map Location MapGeolocation Geolocation Field Field GMap GMap Get Locations Get Locations Leaflet Leaflet OpenLayers OpenLayers Map Map D7 7.x-1.2 7.x-2.3 7.x-1.6 7.x-2.10 7.x-1.17 7.x-1.3 7.x-3.0-beta3 Released 2014-Jan-03 2014-May-24 2014-Nov-03 2015-Sep-08 2015-Oct-09 2015-Jun-25 2015-Oct-08 D7 Users 26,006 13,477 12027 41,299 9,099 9.839 13,383 8.x-1.4 (2015- n/a D8 n/a 8.x-2.x-dev Oct-14) n/a 8.x-1.x-dev n/a Released 2013-Sep-30 D8 Users 4 Dependencies Geofield, Libraries, Modules Libraries cTools and Entity Libraries Leaflet Services Google Google Google Views integration Y Y Proximity Y Y Documentatio n N Y Submodules GMap Location, GMap Getlocations Search, OpenLayers UI, Taxonomy, Getlocations Block, OpenLayers Views, GMap Macro Builde Getlocations Location OpenLayers Geofield, Taxonomize, OpenLayers Examples, Getlocations Map, OpenLayers Bloc, Getlocations Leaflet, OpenLayers Getlocations Tools, Contextual Links, Getlocations GPS OpenLayers Services

  54. Time to ROCK IT ROCK IT

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend