SlideShare una empresa de Scribd logo
1 de 14
Descargar para leer sin conexión
Architecture and Design of Event Driven Map
Components

Jason Fox
Technical Support Engineer
Maps Platform




         © Nokia 2013 Event-driven map components for Series 40.pptx
Agenda
1. API Architectural review
    •       Basic Architectural Design
    •       Event Driven Map Components
2. Deep-Dive Code Examples
    •       Touch driven - Dragging a Marker
    •       Timer driven - Adding Animation
    •       Gesture driven - Pinch Zoom Control
    •       Key press driven - Key Logging
    •       Map State driven - Server-side Marker Clustering

        © Nokia 2013 Event-driven map components for Series 40.pptx
Nokia Maps API for Java ME
Architectural Review



© Nokia 2013 Event-driven map components for Series 40.pptx
Basic Architectural Design
•   MapCanvas - a concrete instantiation of the
    javax.microedition.lcdui.Canvas class.
    Handles the low-level graphics painting the map
    and the delivery of events .
•   MapDisplay – defines the part of the World to be
    displayed, and encapsulates the details of any
    custom points of interest. That is it contains
    MapObjects
•   MapObjects may be also be placed within a
    MapContainer
•   Use the MapFactory to create MapObjects and add them to the MapDisplay.

•   Both the MapDisplay and MapContainers are themselves MapObjects
         © Nokia 2013 Event-driven map components for Series 40.pptx
Event Driven                                          Map Components




  © Nokia 2013 Event-driven map components for Series 40.pptx
Deep-Dive Code Examples



  © Nokia 2013 Event-driven map components for Series 40.pptx
Touch-Driven Component
e.g. Marker Dragger Component
Used for Marker location correction
How does it work?
Interaction between Canvas Touch and Canvas Paint
          EventListener                        pointerPressed()    Hide Marker
          EventListener                        pointerDragged()    Drag Mask location
          EventListener                        pointerReleased()   Move Marker
          MapComponent                         paint()             Draw/Redraw Mask



Key Points
•   Updating Markers is slow.
•   Never update a MapMarker on a MapCanvas unless you are forced
    to do so.
    © Nokia 2013 Event-driven map components for Series 40.pptx
Timer-Driven Component
e.g. Marker Bouncer Component
Used for drawing attention to a marker
 How does it work?
 Interaction between Canvas repaint()requests and painting the
 MapComponent
          MapListener                         onContentUpdated()   Request Repaint
          MapComponent                        paint()              Draw the markers


 Key Points
 Understand the correct usage of Point and GeoCoordinate
 • Hold/Calculate locations using Geocoordinates
 • Draw using pixel Points.
 • Never update a MapMarker on a MapCanvas unless you are forced
    to do so.
    © Nokia 2013 Event-driven map components for Series 40.pptx
Gesture-Driven Component
e.g. Pinch Zoom Component




    © Nokia 2013 Event-driven map components for Series 40.pptx
Pinch Zoom Component
 How does it work?
 Reacts to the pinch()event of the Gesture Framework
    ExtendedEvent                         pinch()                 Alter Zoom Level
    Listener
    EventListener                         pointerReleased()       Fix zoom focus point




 Key Points
 • Separate your MapComponents from your MIDlets for backward
   compatibility and re-use
 • Even though you may think you don’t need a MapComponent, you
   probably do.



    © Nokia 2013 Event-driven map components for Series 40.pptx
Key Press-Driven Component
e.g. Key Logger Component
Used for adding/amending data associated with a MapMarker
How does it work?
Interaction between Canvas Key Press and Canvas Paint.
           EventListener                        keyPressed()       Update FocalObserver Data
           FocalEvent                           onFocusChanged()   Update Tooltip text
           Listener
           Tooltip                              paint()            Display updated text



Key Points
• A well designed MapComponent does just one job
• Use Interfaces to ensure MapComponents are loosely coupled


     © Nokia 2013 Event-driven map components for Series 40.pptx
Map State-Driven Component
e.g. Marker Clustering Component
Used for displaying large datasets on screen
How does it work?
Interaction between Canvas Completed and Canvas Paint.
     MarkerClusterer                          mapUpdated()             Decide if clustering required

     MapCanvas                                onMapContentComplete()   Start Clustering – request XML
                                                                       data
     MarkerClusterer                          onParseComplete()        Update MapMarkers

     FocalEvent                               onFocusChanged()         Update Tooltip text
     Listener
     Tooltip                                  paint()                  Display updated text




     © Nokia 2013 Event-driven map components for Series 40.pptx
Conclusion
•   Complex interactions can be
    achieved through passing
    events between a series of
    simple MapComponents


•   Application of Hoare's law for
    big problems

    “Inside every big problem there is a small problem
    struggling to get out.”

      © Nokia 2013 Event-driven map components for Series 40.pptx
For More Information
 Download the latest Nokia SDK for Java
 http://developer.nokia.com/Develop/Series_40


 Consult the Nokia Developer Library
 http://library.developer.nokia.com


 HERE Developer Site
 http://developer.here.com


 Download the Map Components
 https://projects.developer.nokia.com/mapcomponentdemos


    © Nokia 2013 Event-driven map components for Series 40.pptx

Más contenido relacionado

Similar a Event-driven map components for Series 40 apps

Developing Spatial Applications with Google Maps and CARTO
Developing Spatial Applications with Google Maps and CARTODeveloping Spatial Applications with Google Maps and CARTO
Developing Spatial Applications with Google Maps and CARTOCARTO
 
Field Activity Planner - A cloud based digital energy platform
Field Activity Planner - A cloud based digital energy platformField Activity Planner - A cloud based digital energy platform
Field Activity Planner - A cloud based digital energy platformFutureOn
 
5 Ways to Optimize Your LiDAR Data
5 Ways to Optimize Your LiDAR Data5 Ways to Optimize Your LiDAR Data
5 Ways to Optimize Your LiDAR DataSafe Software
 
FME = Features Made Easy
FME = Features Made EasyFME = Features Made Easy
FME = Features Made EasySafe Software
 
nanoCAD Platform - a professional-grade DWG CAD software
nanoCAD Platform - a professional-grade DWG CAD softwarenanoCAD Platform - a professional-grade DWG CAD software
nanoCAD Platform - a professional-grade DWG CAD softwarenanoCAD India
 
THE OGC STANDARDS AND GEO-PLATFORM BASED WEB APPLICATION FOR SEISMIC EVENTS M...
THE OGC STANDARDS AND GEO-PLATFORM BASED WEB APPLICATION FOR SEISMIC EVENTS M...THE OGC STANDARDS AND GEO-PLATFORM BASED WEB APPLICATION FOR SEISMIC EVENTS M...
THE OGC STANDARDS AND GEO-PLATFORM BASED WEB APPLICATION FOR SEISMIC EVENTS M...Lorenzo Amato
 
Remote Sensing Field Camp 2016
Remote Sensing Field Camp 2016 Remote Sensing Field Camp 2016
Remote Sensing Field Camp 2016 COGS Presentations
 
From 2D Map to Mobile 3D Mirror World
From 2D Map to Mobile 3D Mirror WorldFrom 2D Map to Mobile 3D Mirror World
From 2D Map to Mobile 3D Mirror WorldYu You
 
IRJET- Proposed Design for 3D Map Generation using UAV
IRJET- Proposed Design for 3D Map Generation using UAVIRJET- Proposed Design for 3D Map Generation using UAV
IRJET- Proposed Design for 3D Map Generation using UAVIRJET Journal
 
An Authoring Solution for a Façade-Based AR Platform: Infrastructure, Annota...
An Authoring Solution for  a Façade-Based AR Platform: Infrastructure, Annota...An Authoring Solution for  a Façade-Based AR Platform: Infrastructure, Annota...
An Authoring Solution for a Façade-Based AR Platform: Infrastructure, Annota...Guillaume Gales
 
5 Ways to Improve Your LiDAR Workflows
5 Ways to Improve Your LiDAR Workflows5 Ways to Improve Your LiDAR Workflows
5 Ways to Improve Your LiDAR WorkflowsSafe Software
 
FME World Tour 2015 - Around the World - Ken Bragg
FME World Tour 2015 - Around the World - Ken BraggFME World Tour 2015 - Around the World - Ken Bragg
FME World Tour 2015 - Around the World - Ken BraggIMGS
 
Location and API Maps in Windows Phone 8
Location and API Maps in Windows Phone 8Location and API Maps in Windows Phone 8
Location and API Maps in Windows Phone 8Antonio Pelleriti
 
Dynamic Graph Plotting with WPF
Dynamic Graph Plotting with WPFDynamic Graph Plotting with WPF
Dynamic Graph Plotting with WPFIJERD Editor
 
3D Visualization in ArcGIS Pro
3D Visualization in ArcGIS Pro3D Visualization in ArcGIS Pro
3D Visualization in ArcGIS Prothangqd
 

Similar a Event-driven map components for Series 40 apps (20)

Developing Spatial Applications with Google Maps and CARTO
Developing Spatial Applications with Google Maps and CARTODeveloping Spatial Applications with Google Maps and CARTO
Developing Spatial Applications with Google Maps and CARTO
 
Field Activity Planner - A cloud based digital energy platform
Field Activity Planner - A cloud based digital energy platformField Activity Planner - A cloud based digital energy platform
Field Activity Planner - A cloud based digital energy platform
 
5 Ways to Optimize Your LiDAR Data
5 Ways to Optimize Your LiDAR Data5 Ways to Optimize Your LiDAR Data
5 Ways to Optimize Your LiDAR Data
 
FME = Features Made Easy
FME = Features Made EasyFME = Features Made Easy
FME = Features Made Easy
 
CV-RAKESH KUMAR
CV-RAKESH KUMARCV-RAKESH KUMAR
CV-RAKESH KUMAR
 
Geospatial Product Watch 2015
Geospatial Product Watch 2015Geospatial Product Watch 2015
Geospatial Product Watch 2015
 
Azlina5 imagery
Azlina5  imageryAzlina5  imagery
Azlina5 imagery
 
HERE Maps for the Nokia X platform
HERE Maps for the Nokia X platformHERE Maps for the Nokia X platform
HERE Maps for the Nokia X platform
 
nanoCAD Platform - a professional-grade DWG CAD software
nanoCAD Platform - a professional-grade DWG CAD softwarenanoCAD Platform - a professional-grade DWG CAD software
nanoCAD Platform - a professional-grade DWG CAD software
 
THE OGC STANDARDS AND GEO-PLATFORM BASED WEB APPLICATION FOR SEISMIC EVENTS M...
THE OGC STANDARDS AND GEO-PLATFORM BASED WEB APPLICATION FOR SEISMIC EVENTS M...THE OGC STANDARDS AND GEO-PLATFORM BASED WEB APPLICATION FOR SEISMIC EVENTS M...
THE OGC STANDARDS AND GEO-PLATFORM BASED WEB APPLICATION FOR SEISMIC EVENTS M...
 
Remote Sensing Field Camp 2016
Remote Sensing Field Camp 2016 Remote Sensing Field Camp 2016
Remote Sensing Field Camp 2016
 
From 2D Map to Mobile 3D Mirror World
From 2D Map to Mobile 3D Mirror WorldFrom 2D Map to Mobile 3D Mirror World
From 2D Map to Mobile 3D Mirror World
 
IRJET- Proposed Design for 3D Map Generation using UAV
IRJET- Proposed Design for 3D Map Generation using UAVIRJET- Proposed Design for 3D Map Generation using UAV
IRJET- Proposed Design for 3D Map Generation using UAV
 
An Authoring Solution for a Façade-Based AR Platform: Infrastructure, Annota...
An Authoring Solution for  a Façade-Based AR Platform: Infrastructure, Annota...An Authoring Solution for  a Façade-Based AR Platform: Infrastructure, Annota...
An Authoring Solution for a Façade-Based AR Platform: Infrastructure, Annota...
 
5 Ways to Improve Your LiDAR Workflows
5 Ways to Improve Your LiDAR Workflows5 Ways to Improve Your LiDAR Workflows
5 Ways to Improve Your LiDAR Workflows
 
FME World Tour 2015 - Around the World - Ken Bragg
FME World Tour 2015 - Around the World - Ken BraggFME World Tour 2015 - Around the World - Ken Bragg
FME World Tour 2015 - Around the World - Ken Bragg
 
Location and API Maps in Windows Phone 8
Location and API Maps in Windows Phone 8Location and API Maps in Windows Phone 8
Location and API Maps in Windows Phone 8
 
Dynamic Graph Plotting with WPF
Dynamic Graph Plotting with WPFDynamic Graph Plotting with WPF
Dynamic Graph Plotting with WPF
 
Advanced Maps on Apps for Series 40
Advanced Maps on Apps for Series 40Advanced Maps on Apps for Series 40
Advanced Maps on Apps for Series 40
 
3D Visualization in ArcGIS Pro
3D Visualization in ArcGIS Pro3D Visualization in ArcGIS Pro
3D Visualization in ArcGIS Pro
 

Más de Microsoft Mobile Developer

Intro to Nokia X software platform 2.0 and tools
Intro to Nokia X software platform 2.0 and toolsIntro to Nokia X software platform 2.0 and tools
Intro to Nokia X software platform 2.0 and toolsMicrosoft Mobile Developer
 
Location based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagLocation based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagMicrosoft Mobile Developer
 
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultationsLumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultationsMicrosoft Mobile Developer
 
Windows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra appWindows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra appMicrosoft Mobile Developer
 
La pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo storeLa pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo storeMicrosoft Mobile Developer
 
Il pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progettoIl pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progettoMicrosoft Mobile Developer
 
Lens app trasformare il telefono in una fotocamera
Lens app trasformare il telefono in una fotocameraLens app trasformare il telefono in una fotocamera
Lens app trasformare il telefono in una fotocameraMicrosoft Mobile Developer
 

Más de Microsoft Mobile Developer (20)

Intro to Nokia X software platform 2.0 and tools
Intro to Nokia X software platform 2.0 and toolsIntro to Nokia X software platform 2.0 and tools
Intro to Nokia X software platform 2.0 and tools
 
Lumia App Labs: Lumia SensorCore SDK beta
Lumia App Labs: Lumia SensorCore SDK betaLumia App Labs: Lumia SensorCore SDK beta
Lumia App Labs: Lumia SensorCore SDK beta
 
Nokia Asha from idea to app - Imaging
Nokia Asha from idea to app - ImagingNokia Asha from idea to app - Imaging
Nokia Asha from idea to app - Imaging
 
Healthcare apps for Nokia X and Nokia Asha
Healthcare apps for Nokia X and Nokia AshaHealthcare apps for Nokia X and Nokia Asha
Healthcare apps for Nokia X and Nokia Asha
 
Push notifications on Nokia X
Push notifications on Nokia XPush notifications on Nokia X
Push notifications on Nokia X
 
DIY Nokia Asha app usability studies
DIY Nokia Asha app usability studiesDIY Nokia Asha app usability studies
DIY Nokia Asha app usability studies
 
Lessons learned from Nokia X UI reviews
Lessons learned from Nokia X UI reviewsLessons learned from Nokia X UI reviews
Lessons learned from Nokia X UI reviews
 
Location based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagLocation based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tag
 
Nokia In-App Payment - UX considerations
Nokia In-App Payment - UX considerationsNokia In-App Payment - UX considerations
Nokia In-App Payment - UX considerations
 
Introduction to Nokia Asha SDK 1.2 (beta)
Introduction to Nokia Asha SDK 1.2 (beta)Introduction to Nokia Asha SDK 1.2 (beta)
Introduction to Nokia Asha SDK 1.2 (beta)
 
UX considerations when porting to Nokia X
UX considerations when porting to Nokia XUX considerations when porting to Nokia X
UX considerations when porting to Nokia X
 
Kids' games and educational app design
Kids' games and educational app designKids' games and educational app design
Kids' games and educational app design
 
Nokia X: opportunities for developers
Nokia X: opportunities for developersNokia X: opportunities for developers
Nokia X: opportunities for developers
 
Lumia App Labs: Nokia Imaging SDK 1.1
Lumia App Labs: Nokia Imaging SDK 1.1Lumia App Labs: Nokia Imaging SDK 1.1
Lumia App Labs: Nokia Imaging SDK 1.1
 
Intro to Nokia X software platform and tools
Intro to Nokia X software platform and toolsIntro to Nokia X software platform and tools
Intro to Nokia X software platform and tools
 
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultationsLumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultations
 
Windows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra appWindows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra app
 
La pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo storeLa pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo store
 
Il pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progettoIl pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progetto
 
Lens app trasformare il telefono in una fotocamera
Lens app trasformare il telefono in una fotocameraLens app trasformare il telefono in una fotocamera
Lens app trasformare il telefono in una fotocamera
 

Último

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 

Último (20)

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 

Event-driven map components for Series 40 apps

  • 1. Architecture and Design of Event Driven Map Components Jason Fox Technical Support Engineer Maps Platform © Nokia 2013 Event-driven map components for Series 40.pptx
  • 2. Agenda 1. API Architectural review • Basic Architectural Design • Event Driven Map Components 2. Deep-Dive Code Examples • Touch driven - Dragging a Marker • Timer driven - Adding Animation • Gesture driven - Pinch Zoom Control • Key press driven - Key Logging • Map State driven - Server-side Marker Clustering © Nokia 2013 Event-driven map components for Series 40.pptx
  • 3. Nokia Maps API for Java ME Architectural Review © Nokia 2013 Event-driven map components for Series 40.pptx
  • 4. Basic Architectural Design • MapCanvas - a concrete instantiation of the javax.microedition.lcdui.Canvas class. Handles the low-level graphics painting the map and the delivery of events . • MapDisplay – defines the part of the World to be displayed, and encapsulates the details of any custom points of interest. That is it contains MapObjects • MapObjects may be also be placed within a MapContainer • Use the MapFactory to create MapObjects and add them to the MapDisplay. • Both the MapDisplay and MapContainers are themselves MapObjects © Nokia 2013 Event-driven map components for Series 40.pptx
  • 5. Event Driven Map Components © Nokia 2013 Event-driven map components for Series 40.pptx
  • 6. Deep-Dive Code Examples © Nokia 2013 Event-driven map components for Series 40.pptx
  • 7. Touch-Driven Component e.g. Marker Dragger Component Used for Marker location correction How does it work? Interaction between Canvas Touch and Canvas Paint EventListener pointerPressed() Hide Marker EventListener pointerDragged() Drag Mask location EventListener pointerReleased() Move Marker MapComponent paint() Draw/Redraw Mask Key Points • Updating Markers is slow. • Never update a MapMarker on a MapCanvas unless you are forced to do so. © Nokia 2013 Event-driven map components for Series 40.pptx
  • 8. Timer-Driven Component e.g. Marker Bouncer Component Used for drawing attention to a marker How does it work? Interaction between Canvas repaint()requests and painting the MapComponent MapListener onContentUpdated() Request Repaint MapComponent paint() Draw the markers Key Points Understand the correct usage of Point and GeoCoordinate • Hold/Calculate locations using Geocoordinates • Draw using pixel Points. • Never update a MapMarker on a MapCanvas unless you are forced to do so. © Nokia 2013 Event-driven map components for Series 40.pptx
  • 9. Gesture-Driven Component e.g. Pinch Zoom Component © Nokia 2013 Event-driven map components for Series 40.pptx
  • 10. Pinch Zoom Component How does it work? Reacts to the pinch()event of the Gesture Framework ExtendedEvent pinch() Alter Zoom Level Listener EventListener pointerReleased() Fix zoom focus point Key Points • Separate your MapComponents from your MIDlets for backward compatibility and re-use • Even though you may think you don’t need a MapComponent, you probably do. © Nokia 2013 Event-driven map components for Series 40.pptx
  • 11. Key Press-Driven Component e.g. Key Logger Component Used for adding/amending data associated with a MapMarker How does it work? Interaction between Canvas Key Press and Canvas Paint. EventListener keyPressed() Update FocalObserver Data FocalEvent onFocusChanged() Update Tooltip text Listener Tooltip paint() Display updated text Key Points • A well designed MapComponent does just one job • Use Interfaces to ensure MapComponents are loosely coupled © Nokia 2013 Event-driven map components for Series 40.pptx
  • 12. Map State-Driven Component e.g. Marker Clustering Component Used for displaying large datasets on screen How does it work? Interaction between Canvas Completed and Canvas Paint. MarkerClusterer mapUpdated() Decide if clustering required MapCanvas onMapContentComplete() Start Clustering – request XML data MarkerClusterer onParseComplete() Update MapMarkers FocalEvent onFocusChanged() Update Tooltip text Listener Tooltip paint() Display updated text © Nokia 2013 Event-driven map components for Series 40.pptx
  • 13. Conclusion • Complex interactions can be achieved through passing events between a series of simple MapComponents • Application of Hoare's law for big problems “Inside every big problem there is a small problem struggling to get out.” © Nokia 2013 Event-driven map components for Series 40.pptx
  • 14. For More Information Download the latest Nokia SDK for Java http://developer.nokia.com/Develop/Series_40 Consult the Nokia Developer Library http://library.developer.nokia.com HERE Developer Site http://developer.here.com Download the Map Components https://projects.developer.nokia.com/mapcomponentdemos © Nokia 2013 Event-driven map components for Series 40.pptx