SlideShare a Scribd company logo
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

More Related Content

Similar to 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 CARTO
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
FutureOn
 
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
Safe Software
 
FME = Features Made Easy
FME = Features Made EasyFME = Features Made Easy
FME = Features Made Easy
Safe Software
 
Geospatial Product Watch 2015
Geospatial Product Watch 2015Geospatial Product Watch 2015
Geospatial Product Watch 2015
Geospatial Media & Communications
 
Azlina5 imagery
Azlina5  imageryAzlina5  imagery
Azlina5 imagery
Azlina Mahad
 
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
Microsoft Mobile Developer
 
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
nanoCAD 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 World
Yu 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 UAV
IRJET 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 Workflows
Safe 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 Bragg
IMGS
 
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
Antonio Pelleriti
 
Dynamic Graph Plotting with WPF
Dynamic Graph Plotting with WPFDynamic Graph Plotting with WPF
Dynamic Graph Plotting with WPF
IJERD Editor
 
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
Microsoft Mobile Developer
 
3D Visualization in ArcGIS Pro
3D Visualization in ArcGIS Pro3D Visualization in ArcGIS Pro
3D Visualization in ArcGIS Pro
thangqd
 

Similar to 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
 

More from 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 tools
Microsoft Mobile Developer
 
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
Microsoft Mobile Developer
 
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
Microsoft Mobile Developer
 
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
Microsoft Mobile Developer
 
Push notifications on Nokia X
Push notifications on Nokia XPush notifications on Nokia X
Push notifications on Nokia X
Microsoft Mobile Developer
 
DIY Nokia Asha app usability studies
DIY Nokia Asha app usability studiesDIY Nokia Asha app usability studies
DIY Nokia Asha app usability studies
Microsoft Mobile Developer
 
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
Microsoft 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 Geo2tag
Microsoft Mobile Developer
 
Nokia In-App Payment - UX considerations
Nokia In-App Payment - UX considerationsNokia In-App Payment - UX considerations
Nokia In-App Payment - UX considerations
Microsoft Mobile Developer
 
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)
Microsoft Mobile Developer
 
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
Microsoft Mobile Developer
 
Kids' games and educational app design
Kids' games and educational app designKids' games and educational app design
Kids' games and educational app design
Microsoft Mobile Developer
 
Nokia X: opportunities for developers
Nokia X: opportunities for developersNokia X: opportunities for developers
Nokia X: opportunities for developers
Microsoft Mobile Developer
 
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
Microsoft Mobile Developer
 
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
Microsoft 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 consultations
Microsoft 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 app
Microsoft 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 store
Microsoft 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 progetto
Microsoft 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 fotocamera
Microsoft Mobile Developer
 

More from 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
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 

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