SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
+


CREATE A LAYAR WITH DRUPAL
Tutorial
 Edward Mac Gillavry
 29th December 2010
CAVEATS
    Layar module for Drupal abstracted from
     homebrewed module
    Only basic Layar GetPOIs-Request:
        Lon,Lat,Radius, layerName
    Only basic Layar GetPOIs-JSON Response:
        1d objects only
        Appears to be on par with Layar API version 2.1
INSTALLATION REQUIREMENTS
     Drupal Core
     Modules:
         CCK (content, content_copy, optionwidgets, text)
         Views (views, views_ui)
         Location (location, location_cck, location_node)
         Gmap (gmap, gmap_location)
         Layar
PREPARE Gmap MODULE
    Supports (deprecated) Google Maps API v.2
    Requires API key
    Log in with Google account at
     http://code.google.com/apis/maps/signup.html
    Fill in website URL
    Click “Generate API key”
    Next page provides the API key, for example:
 ABQIAAAAXL4B_6HzzOGB4k4meSzVJRQAUgWGYxiuj_fVy2Vtau11dGUdwh
 QWbsemrSoWUer_2wFVxZtOeFP6wA
CONFIGURE Gmap MODULE
    Drupal: admin > settings > gmap
    Fill in Google Maps API key in “Google Map
     Initialize”
    Configure:
        Default map settings
        Map type control
    Click “Save configuration”
CONFIGURE Location MODULE
     Drupal: admin > settings > location > main
     Toggle location display:
         Enable the display of locations
     Check “Use a Google Map to set latitude and
      longitude”
     Click “Save configuration”
     Users that are allowed to manually enter
      latitude/longitude coordinates will be able to do so
      with an interactive Google Map!
CREATE Poi CONTENT TYPE
     Drupal: admin > content > types > add
     Identification:
         Name: Poi
         Type: poi
         Description: Point of Interest
     Locative Information
         Number of locations:
              Minimum number of locations: 1
              Maximum number of locations: 1
              Number of locations that can be added at once: 1
     Click “Save content type”.
CREATE Poi CONTENT
     Drupal: node > add > poi
     Fill in:
         Name
         Body
     Click map to add location
     Drag marker to adjust location
     Click “Save”
CREATE Layar VIEW (1)
     Drupal: admin > build > views > add
         View name: Layar
         View description: Combine POIs for Layar
         View tag: layar
         View type: Node
     Click “Next”
CREATE Layar VIEW (2)
     Drupal: admin > build > views > edit > Layar
     Select “Feed” from dropdown box
     Click “Add display”
     Basic settings:
         Name: Feed
         Title: POI layer
         Style: Layar JSON
CREATE Layar VIEW (3)
     Fields:
         Location: Latitude (decimal degrees)
         Location: Longitude (decimal degrees)
         Node: Title
         Node: Nid
         Node: Body
     Filters:
         Node: Published (Yes)
         Node: Type (Poi)
         Layar: Location latitude/longitude is within Layars requested
          Proximity
CREATE Layar VIEW (4)
     Click the gears behind “Style” in Basic settings
     Feed: Style options
         Layar Unique ID *: node: Nid
         Layar Latitude *: node: Latitude
         Layar Longitude *: node: Longitude
         Layar Title *: node: Title
         Layar Line 2: node_revisions: Body
     Feed settings:
         Path: pois
CREATE Layar CONTENT
     Drupal: node > add > layar
         Name: Pois
         Layar Display View: Layar > Feed
     Click “Save”
     Next page provides the POI URL e.g.
          http://www.yourdomain.com/layar/1
TEST POI URL
     Open POI URL in browser
      http://www.yourdomain.com/layar/1?
      lang=NL&countryCode=NL&userId=93527657b34ce7f&L
      on=5.11034&action=refresh&Version=4.0&Lat=52.09
      62453&layerName=pois&Accuracy=252&radius=250000
     For explanation of parameters, check:
      http://layar.pbworks.com/w/page/28473504/GetPOI
      s-Request
     Adjust Lat and Lon parameters to center search
      area around your POI locations
     Browser returns Layar JSON-object!
SUGGESTIONS FOR 2011?
     Add support for latest Layar API (version 4.0)
     Allow content managers to adjust Layer-level
      JSON response elements (e.g. Actions)
     Support for Geo module (to benefit from spatial
      database capabilities)
      http://drupal.org.project/geo/
     Investigate REST Server and Services modules
      as alternatives
      http://drupal.org/project/rest_server
      http://drupal.org/project/services
REFERENCES
    Layar
     http://www.layar.com
    Howto: Create some basic location aware nodes
     http://drupal.org/node/817592
    Layar module
     http://www.drupal.org/project/layar
    Explanation from module maintainer
     http://drupal.org/node/950944#comment-3619706
Edward Mac Gillavry
          edward@webmapper.net

          @emacgillavry
          http://drupal.org/user/682868

CONTACT INFORMATION


        www.webmapper.net

Weitere ähnliche Inhalte

Ähnlich wie Create a Layar with Drupal

Reaching out from ADF Mobile (ODTUG KScope 2014)
Reaching out from ADF Mobile (ODTUG KScope 2014)Reaching out from ADF Mobile (ODTUG KScope 2014)
Reaching out from ADF Mobile (ODTUG KScope 2014)Luc Bors
 
Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In ActionHazem Saleh
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloudwesley chun
 
Director x Backbone = :)
Director x Backbone = :)Director x Backbone = :)
Director x Backbone = :)Janessa Det
 
Ramp Up Your Web Experiences Using Drupal and Apache Solr
Ramp Up Your Web Experiences Using Drupal and Apache SolrRamp Up Your Web Experiences Using Drupal and Apache Solr
Ramp Up Your Web Experiences Using Drupal and Apache Solrlucenerevolution
 
Synapseindia android apps intro to android development
Synapseindia android apps  intro to android developmentSynapseindia android apps  intro to android development
Synapseindia android apps intro to android developmentSynapseindiappsdevelopment
 
Lazy Coder Camp Edition 1
Lazy Coder Camp Edition 1Lazy Coder Camp Edition 1
Lazy Coder Camp Edition 1phpfactory
 
Drupal 7 Release Party - Yogyakarta
Drupal 7 Release Party - YogyakartaDrupal 7 Release Party - Yogyakarta
Drupal 7 Release Party - YogyakartaRoy Gunawan
 
Posscon 2011 Drupal Workshop
Posscon 2011 Drupal WorkshopPosscon 2011 Drupal Workshop
Posscon 2011 Drupal WorkshopOS Solutions
 
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache Cordova
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache Cordova[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache Cordova
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache CordovaHazem Saleh
 
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache CordovaHazem Saleh
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsTroy Miles
 
Web Applications with AngularJS
Web Applications with AngularJSWeb Applications with AngularJS
Web Applications with AngularJSPhilipp Burgmer
 
OrchardCMS module development
OrchardCMS module developmentOrchardCMS module development
OrchardCMS module developmentJay Harris
 
React Native for ReactJS Devs
React Native for ReactJS DevsReact Native for ReactJS Devs
React Native for ReactJS DevsBarak Cohen
 
phonegap with angular js for freshers
phonegap with angular js for freshers    phonegap with angular js for freshers
phonegap with angular js for freshers dssprakash
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsDylan Jay
 

Ähnlich wie Create a Layar with Drupal (20)

Reaching out from ADF Mobile (ODTUG KScope 2014)
Reaching out from ADF Mobile (ODTUG KScope 2014)Reaching out from ADF Mobile (ODTUG KScope 2014)
Reaching out from ADF Mobile (ODTUG KScope 2014)
 
Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In Action
 
Serverless Computing with Google Cloud
Serverless Computing with Google CloudServerless Computing with Google Cloud
Serverless Computing with Google Cloud
 
Director x Backbone = :)
Director x Backbone = :)Director x Backbone = :)
Director x Backbone = :)
 
Overview Of Drupal
Overview Of DrupalOverview Of Drupal
Overview Of Drupal
 
Overview Of Drupal
Overview Of DrupalOverview Of Drupal
Overview Of Drupal
 
Ramp Up Your Web Experiences Using Drupal and Apache Solr
Ramp Up Your Web Experiences Using Drupal and Apache SolrRamp Up Your Web Experiences Using Drupal and Apache Solr
Ramp Up Your Web Experiences Using Drupal and Apache Solr
 
Dashboard
DashboardDashboard
Dashboard
 
Synapseindia android apps intro to android development
Synapseindia android apps  intro to android developmentSynapseindia android apps  intro to android development
Synapseindia android apps intro to android development
 
Lazy Coder Camp Edition 1
Lazy Coder Camp Edition 1Lazy Coder Camp Edition 1
Lazy Coder Camp Edition 1
 
Drupal 7 Release Party - Yogyakarta
Drupal 7 Release Party - YogyakartaDrupal 7 Release Party - Yogyakarta
Drupal 7 Release Party - Yogyakarta
 
Posscon 2011 Drupal Workshop
Posscon 2011 Drupal WorkshopPosscon 2011 Drupal Workshop
Posscon 2011 Drupal Workshop
 
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache Cordova
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache Cordova[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache Cordova
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache Cordova
 
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
 
Web Applications with AngularJS
Web Applications with AngularJSWeb Applications with AngularJS
Web Applications with AngularJS
 
OrchardCMS module development
OrchardCMS module developmentOrchardCMS module development
OrchardCMS module development
 
React Native for ReactJS Devs
React Native for ReactJS DevsReact Native for ReactJS Devs
React Native for ReactJS Devs
 
phonegap with angular js for freshers
phonegap with angular js for freshers    phonegap with angular js for freshers
phonegap with angular js for freshers
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
 

Kürzlich hochgeladen

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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...Drew Madelung
 
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 slidevu2urc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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 WorkerThousandEyes
 
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 2024Rafal Los
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
[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.pdfhans926745
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Kürzlich hochgeladen (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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...
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
[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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Create a Layar with Drupal

  • 1. + CREATE A LAYAR WITH DRUPAL Tutorial Edward Mac Gillavry 29th December 2010
  • 2. CAVEATS  Layar module for Drupal abstracted from homebrewed module  Only basic Layar GetPOIs-Request:  Lon,Lat,Radius, layerName  Only basic Layar GetPOIs-JSON Response:  1d objects only  Appears to be on par with Layar API version 2.1
  • 3. INSTALLATION REQUIREMENTS  Drupal Core  Modules:  CCK (content, content_copy, optionwidgets, text)  Views (views, views_ui)  Location (location, location_cck, location_node)  Gmap (gmap, gmap_location)  Layar
  • 4. PREPARE Gmap MODULE  Supports (deprecated) Google Maps API v.2  Requires API key  Log in with Google account at http://code.google.com/apis/maps/signup.html  Fill in website URL  Click “Generate API key”  Next page provides the API key, for example: ABQIAAAAXL4B_6HzzOGB4k4meSzVJRQAUgWGYxiuj_fVy2Vtau11dGUdwh QWbsemrSoWUer_2wFVxZtOeFP6wA
  • 5. CONFIGURE Gmap MODULE  Drupal: admin > settings > gmap  Fill in Google Maps API key in “Google Map Initialize”  Configure:  Default map settings  Map type control  Click “Save configuration”
  • 6. CONFIGURE Location MODULE  Drupal: admin > settings > location > main  Toggle location display:  Enable the display of locations  Check “Use a Google Map to set latitude and longitude”  Click “Save configuration”  Users that are allowed to manually enter latitude/longitude coordinates will be able to do so with an interactive Google Map!
  • 7. CREATE Poi CONTENT TYPE  Drupal: admin > content > types > add  Identification:  Name: Poi  Type: poi  Description: Point of Interest  Locative Information  Number of locations:  Minimum number of locations: 1  Maximum number of locations: 1  Number of locations that can be added at once: 1  Click “Save content type”.
  • 8. CREATE Poi CONTENT  Drupal: node > add > poi  Fill in:  Name  Body  Click map to add location  Drag marker to adjust location  Click “Save”
  • 9. CREATE Layar VIEW (1)  Drupal: admin > build > views > add  View name: Layar  View description: Combine POIs for Layar  View tag: layar  View type: Node  Click “Next”
  • 10. CREATE Layar VIEW (2)  Drupal: admin > build > views > edit > Layar  Select “Feed” from dropdown box  Click “Add display”  Basic settings:  Name: Feed  Title: POI layer  Style: Layar JSON
  • 11. CREATE Layar VIEW (3)  Fields:  Location: Latitude (decimal degrees)  Location: Longitude (decimal degrees)  Node: Title  Node: Nid  Node: Body  Filters:  Node: Published (Yes)  Node: Type (Poi)  Layar: Location latitude/longitude is within Layars requested Proximity
  • 12. CREATE Layar VIEW (4)  Click the gears behind “Style” in Basic settings  Feed: Style options  Layar Unique ID *: node: Nid  Layar Latitude *: node: Latitude  Layar Longitude *: node: Longitude  Layar Title *: node: Title  Layar Line 2: node_revisions: Body  Feed settings:  Path: pois
  • 13. CREATE Layar CONTENT  Drupal: node > add > layar  Name: Pois  Layar Display View: Layar > Feed  Click “Save”  Next page provides the POI URL e.g. http://www.yourdomain.com/layar/1
  • 14. TEST POI URL  Open POI URL in browser http://www.yourdomain.com/layar/1? lang=NL&countryCode=NL&userId=93527657b34ce7f&L on=5.11034&action=refresh&Version=4.0&Lat=52.09 62453&layerName=pois&Accuracy=252&radius=250000  For explanation of parameters, check: http://layar.pbworks.com/w/page/28473504/GetPOI s-Request  Adjust Lat and Lon parameters to center search area around your POI locations  Browser returns Layar JSON-object!
  • 15. SUGGESTIONS FOR 2011?  Add support for latest Layar API (version 4.0)  Allow content managers to adjust Layer-level JSON response elements (e.g. Actions)  Support for Geo module (to benefit from spatial database capabilities) http://drupal.org.project/geo/  Investigate REST Server and Services modules as alternatives http://drupal.org/project/rest_server http://drupal.org/project/services
  • 16. REFERENCES  Layar http://www.layar.com  Howto: Create some basic location aware nodes http://drupal.org/node/817592  Layar module http://www.drupal.org/project/layar  Explanation from module maintainer http://drupal.org/node/950944#comment-3619706
  • 17. Edward Mac Gillavry edward@webmapper.net @emacgillavry http://drupal.org/user/682868 CONTACT INFORMATION www.webmapper.net