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

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 

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