SlideShare uma empresa Scribd logo
1 de 36
Baixar para ler offline
Nokia Series 40

Application Development with
Nokia Maps and Location APIs
for Series 40


Jason Fox
Technical Support Engineer
Maps Platform
1   © Nokia 2012 Intro to Maps on Apps.pptx
Agenda
1. Introduction to Nokia Maps API for
   Java ME
2. Getting Started - Prerequisites
3. Basic Mapping Concepts
4. An Introduction to the Search and
   Routing Services
5. An Introduction to positioning
    (JSR-179)

2   © Nokia 2012 Intro to Maps on Apps.pptx
Nokia Maps API for Java ME




3   © Nokia 2012 Intro to Maps on Apps.pptx
What is Nokia Maps API for Java ME?
•       API aimed at Series 40 Phones. Allows you to
        develop mobile applications based on Nokia
        Maps.

•       Façade Pattern - hides all the “plumbing” code -
        the low level connection calls, image
        manipulation etc.

•       Targets devices supporting MIDP 2.0 or higher.

•       Not currently part of the SDK

•       Single downloadable JAR around 150 kB.

•       Faster App development. Better App performance

Full details at :
http://www.developer.nokia.com/Develop/Maps/Maps_API_for_Java_ME/

    4     © Nokia 2012 Intro to Maps on Apps.pptx
Why use Nokia Maps API for Java ME?
• Multiple map types optimised for mobile
  displays

• Low latency and reduced network traffic
  compared with static map image solutions.

• “Out-of-the box” support for common
  mapping use cases (Markers, Images,
  Polygons, Polylines, Pan and Zoom)

• In-built libraries to access search, routing
  and POI information services.

• Map Components are open to extension -
  ability to customise and override standard
  API functionality.

• Advanced Features as standard, such as KML parsing and the addition
  of custom overlays
 5   © Nokia 2012 Intro to Maps on Apps.pptx
Comparison of Nokia Maps for Java
ME vs. Static Map Image Solutions
Static Map (e.g. RESTful Map API)
•        one single http request per map ->one
          single image returned in response
•        new request for each alteration.

Maps for Java ME
•        multiple http requests for individual map tiles.
•        Map tiles are cached.
•        Map tiles stitched together and objects
         added to display result on screen
•        Additional requests only made if necessary.


        Result
        • Reduced latency and lowered network traffic though built-in intelligent
          map rendering, caching and tiling = Better for Mobile.
    6      © Nokia 2012 Intro to Maps on Apps.pptx
Prerequisites




7   © Nokia 2012 Intro to Maps on Apps.pptx
Prerequisites
1. Install a Java Runtime Environment 6
     http://www.java.com/en/download/index.jsp

2. Install an IDE (e.g. NetBeans)
     Netbeans.org

3. Install a Nokia SDK for Java (free)
     http://www.developer.nokia.com/Develop/Java/Tools/




 8    © Nokia 2012 Intro to Maps on Apps.pptx
Prerequisites
                                                     1.
4. Configure Nokia SDK in NetBeans

 2.




                                                3.
 9    © Nokia 2012 Intro to Maps on Apps.pptx
Prerequisites
5. Download the binary Jar
      http://www.developer.nokia.com/Develop/Maps/Maps_API_for_Java_ME/Getting_started/




 10     © Nokia 2012 Intro to Maps on Apps.pptx
Prerequisites
6. Register as a developer free at www.developer.nokia.com




 11   © Nokia 2012 Intro to Maps on Apps.pptx
Prerequisites
7. Obtain a free set of authentication credentials (App Id
   and Token) from:             https://api.developer.nokia.com/ovi-
      api/ui/registration
      − A unique App ID and Token, are required for each application


8. After creating a new NetBeans project, You must add a
   reference to the Nokia Maps API binary jar itself -
   Maps_API.jar. This reference is added under the
   ”Resources” folder in theNetBeans project.




 12    © Nokia 2012 Intro to Maps on Apps.pptx
Basic Mapping Concepts
• The Minimal Map

• An Introduction to Map Types

• Map Languages

• Markers

• Polylines and Polygons

• Interaction




13   © Nokia 2012 Intro to Maps on Apps.pptx
The Minimal Map
A Pannable Zoomable Map in five lines of code
      1. Set credentials in the ApplicationContext

      2. Create a MapCanvas

      3. Set it as the current Display




 14   © Nokia 2012 Intro to Maps on Apps.pptx
Map Types
Pick the right map type for your app




 15   © Nokia 2012 Intro to Maps on Apps.pptx
Map Types – Simple Method

The Standard Map Schemes




The Code




16   © Nokia 2012 Intro to Maps on Apps.pptx
Map Types – Advanced Method
1)    Implement a MapSchemeListener and call getAvailableMaps()




2)    Handle Success and Failure




3)    Set the BaseMapType from MapProviders received




 17    © Nokia 2012 Intro to Maps on Apps.pptx
Map Languages

• Currently eight map Languages available
      Arabic, Chinese, German, English,
      French, Italian, Russian and Spanish

• Just set the DefaultLanguage in the
  ApplicationContext




• By default Maps are displayed in English


18   © Nokia 2012 Intro to Maps on Apps.pptx
Map Markers
Markers highlight points of interest at a specified location
on the map - two types exist:
• MapStandardMarker
      • Various Geometric Shapes plus Balloon
      • Easy to add text, change color
                                      (and opacity)
• MapMarker
      • Used to add graphical icons.
      • Need to define an anchor point.

•        Use the MapFactory to created instances of
         MapStandardMarkers and MapMarkers


•        Default marker is a ‘Nokia Blue’ Balloon

    19     © Nokia 2012 Intro to Maps on Apps.pptx
Polylines and Polygons
• A MapPolyline is a series of connected points




• A MapPolygon is the area within a closed loop of points




• Every instance of a MapPolygon or MapPolyline is
  created using the MapFactory

• Both objects have an implicit GeoBoundingBox.



 20   © Nokia 2012 Intro to Maps on Apps.pptx
MapCanvas MapDisplay MapObject
• MapCanvas holds a MapFactory
  and a MapDisplay

• Use the MapFactory to create
  MapObjects

• Can also use MapFactory to create
  a MapDisplay directly e.g. for
  automatic caching of Static Maps

• The MapDisplay contains MapObjects but is also a
  MapObject itself.

• MapObjects may be also be contained within a MapContainer


21   © Nokia 2012 Intro to Maps on Apps.pptx
Map Events



     • Create a MapComponent to interact with your MapDisplay


     • Add an EventListener to your MapComponent to receive notifications
       of screen interactions and key presses




22    © Nokia 2012 Intro to Maps on Apps.pptx
An Introduction to Location-Based Services

     • Search (Geocoding and Reverse Geocoding)

     • Places Search

     • Routing

     • Sharing




23   © Nokia 2012 Intro to Maps on Apps.pptx
Geocoding Search
•    Finds a location on the Map from a given
     Address

•    Search can be either synchronous or
     asynchronous.

•    Asynchronous search is preferred.


1. Implement a GeoCodeRequestListener


2. Create a GeoCodeRequest



3. Handle Success or Failure




24    © Nokia 2012 Intro to Maps on Apps.pptx
Reverse Geocoding Search
     •   Finds the Address for a given geographic location.
     •   Search can be either synchronous or asynchronous.
     •   Asynchronous search is preferred.

     1. Implement a ReverseGeocodeRequestListener


     2. Create a ReverseGeoCodeRequest




     3. Handle Success or Failure




25       © Nokia 2012 Intro to Maps on Apps.pptx
Places Search
• Flexible Local Search
             •      General Text Search (e.g. “Pizza”)
             •      Category Search (e.g. restaurant)
             •      Combined Search (e.g. “Italian” + restaurant)




• Drill down to get more details
     •      Contact Details
     •      Opening Times
     •      Description and Reviews
     •      Images etc.


26       © Nokia 2012 Intro to Maps on Apps.pptx
Places Search
     1. Implement a PlaceSearchRequestListener


     2. Create a PlaceSearchRequest




     3. Handle Success or Failure



     4. More details can be obtained by interrogating the Result




27     © Nokia 2012 Intro to Maps on Apps.pptx
Routing Service
     • Routing Service consists of creating a route between two or
       more Waypoints.

     • Responses from the Routing service can take time. Make
       your RouteRequests asynchronously.

     1. Implement a RouteListener

     2. Create a RouteRequest




     3. Handle Success or Failure




28    © Nokia 2012 Intro to Maps on Apps.pptx
Routing Service
 • The preferred route calculation can be optimized by altering the
   parameters of the RoutingMode

     •       Routing Type – default is RoutingType.Shortest




     •     Mode of Transport – default is TransportMode.CAR




     •     Additional Restrictions – None are selected by default




29   © Nokia 2012 Intro to Maps on Apps.pptx
Sharing Manager
      • Creates short encrypted URLs for the RESTful Maps API


      • Send URL as an SMS for a client to receive a static map.

      • Service forwards to maps.nokia.com or m.maps.nokia.com on
        capable browsers




30   © Nokia 2012 Intro to Maps on Apps.pptx
Positioning

• Separate Optional Package for Positioning (JSR-179)

• Frequently combined with the Nokia Maps API for Java ME, though not
  part of the API itself

• Two location methods maybe available
  • Cell ID positioning
  • GPS




31   © Nokia 2012 Intro to Maps on Apps.pptx
Cell-ID Location
• A MIDlet can obtain an approximate position using the Cell-ID location
  method.

• The method consists of passing the ID of the cell the device is currently
  connected to, on to a look-up service. The service will then return the
  well-known position of the given cell-ID.

• This Cell ID location provides a method of positioning mobile devices
  which do not contain a GPS unit.


Note: the degree of uncertainty can vary of a few meters to hundreds of
kilometers, depending upon the infrastructure of the local network and the
data available to the look-up service for that region



 32   © Nokia 2012 Intro to Maps on Apps.pptx
Cell-ID Example

1) Create a Cell-ID LocationProvider using LocationUtils


      Note: The second parameter of getLocationProvider() is currently
      always null. This leaves the library open for future extension

2) Make a call to getLocation() and process the result




The attributes of the QualifiedCoordinate class map directly onto the
GeoCoordinate class.

Set up a loop and poll to obtain location updates.

 33      © Nokia 2012 Intro to Maps on Apps.pptx
LocationUtil
• The preferred Location method(s) can
  be any combination of the methods
  defined in JSR-179:

Useful Combinations
• Offline Cell ID

• Standalone GPS

• Assisted GPS

• Online Cell ID an/or WLAN


34    © Nokia 2012 Intro to Maps on Apps.pptx
GPS Example

1. Create a GPS LocationProvider




2. Set the provider to start polling

3. Retrieve and process the result




 35    © Nokia 2012 Intro to Maps on Apps.pptx
For More Information

 Download the latest Nokia SDK for Java
 http://developer.nokia.com

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

 Nokia Maps API
 http://developer.nokia.com/Maps




36   © Nokia 2012 Intro to Maps on Apps.pptx

Mais conteúdo relacionado

Semelhante a Intro to apps with maps for series 40

Esri Scotland Conf 2016 Glasgow City Council
Esri Scotland Conf 2016   Glasgow City CouncilEsri Scotland Conf 2016   Glasgow City Council
Esri Scotland Conf 2016 Glasgow City CouncilEsri UK
 
GIS Standards and Interoperability
GIS Standards and InteroperabilityGIS Standards and Interoperability
GIS Standards and InteroperabilityNasr Khashoggi
 
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
 
Offline maps for mobile developers (Android/iOS)
Offline maps for mobile developers (Android/iOS)Offline maps for mobile developers (Android/iOS)
Offline maps for mobile developers (Android/iOS)Vadim Nikolaev
 
Knowledge graph layer for Telco portal, (Topic Maps 2008)
Knowledge graph layer for Telco portal, (Topic Maps 2008) Knowledge graph layer for Telco portal, (Topic Maps 2008)
Knowledge graph layer for Telco portal, (Topic Maps 2008) Heimo Hänninen
 
NGMAST 2012
NGMAST 2012NGMAST 2012
NGMAST 2012Yu You
 
FME = Features Made Easy
FME = Features Made EasyFME = Features Made Easy
FME = Features Made EasySafe Software
 
Publishing on ArcGIS Mobile
Publishing on ArcGIS MobilePublishing on ArcGIS Mobile
Publishing on ArcGIS MobileEsri
 
iMap 4.0 Effective Management of Spatial Information
iMap 4.0 Effective Management of Spatial InformationiMap 4.0 Effective Management of Spatial Information
iMap 4.0 Effective Management of Spatial InformationEsri
 
March 2014 Meetup - Nokia X Tech Session
March 2014 Meetup - Nokia X Tech SessionMarch 2014 Meetup - Nokia X Tech Session
March 2014 Meetup - Nokia X Tech SessionBlrDroid
 
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud EnvironmentsTools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud EnvironmentsVMware Tanzu
 
Be Location Intelligent with MapInfo Pro v2019
Be Location Intelligent with MapInfo Pro v2019Be Location Intelligent with MapInfo Pro v2019
Be Location Intelligent with MapInfo Pro v2019Peter Horsbøll Møller
 

Semelhante a Intro to apps with maps for series 40 (20)

LUMIA APP LAB #16: HERE APPLICATION LAUNCHERS
LUMIA APP LAB #16: HERE APPLICATION LAUNCHERSLUMIA APP LAB #16: HERE APPLICATION LAUNCHERS
LUMIA APP LAB #16: HERE APPLICATION LAUNCHERS
 
Esri Scotland Conf 2016 Glasgow City Council
Esri Scotland Conf 2016   Glasgow City CouncilEsri Scotland Conf 2016   Glasgow City Council
Esri Scotland Conf 2016 Glasgow City Council
 
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
 
GIS Standards and Interoperability
GIS Standards and InteroperabilityGIS Standards and Interoperability
GIS Standards and Interoperability
 
Let's Program The Cloud
Let's Program The CloudLet's Program The Cloud
Let's Program The Cloud
 
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
 
Offline maps for mobile developers (Android/iOS)
Offline maps for mobile developers (Android/iOS)Offline maps for mobile developers (Android/iOS)
Offline maps for mobile developers (Android/iOS)
 
Knowledge graph layer for Telco portal, (Topic Maps 2008)
Knowledge graph layer for Telco portal, (Topic Maps 2008) Knowledge graph layer for Telco portal, (Topic Maps 2008)
Knowledge graph layer for Telco portal, (Topic Maps 2008)
 
NGMAST 2012
NGMAST 2012NGMAST 2012
NGMAST 2012
 
Project
ProjectProject
Project
 
FME = Features Made Easy
FME = Features Made EasyFME = Features Made Easy
FME = Features Made Easy
 
Publishing on ArcGIS Mobile
Publishing on ArcGIS MobilePublishing on ArcGIS Mobile
Publishing on ArcGIS Mobile
 
AMIS OOW 2012 Review - Deel 4 ADF - Paco van der Linden
AMIS OOW 2012 Review - Deel 4 ADF - Paco van der LindenAMIS OOW 2012 Review - Deel 4 ADF - Paco van der Linden
AMIS OOW 2012 Review - Deel 4 ADF - Paco van der Linden
 
ITCV
ITCVITCV
ITCV
 
iMap 4.0 Effective Management of Spatial Information
iMap 4.0 Effective Management of Spatial InformationiMap 4.0 Effective Management of Spatial Information
iMap 4.0 Effective Management of Spatial Information
 
March 2014 Meetup - Nokia X Tech Session
March 2014 Meetup - Nokia X Tech SessionMarch 2014 Meetup - Nokia X Tech Session
March 2014 Meetup - Nokia X Tech Session
 
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud EnvironmentsTools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
 
Osgis sept2012 cartogrammar
Osgis sept2012  cartogrammarOsgis sept2012  cartogrammar
Osgis sept2012 cartogrammar
 
Geospatial Product Watch 2015
Geospatial Product Watch 2015Geospatial Product Watch 2015
Geospatial Product Watch 2015
 
Be Location Intelligent with MapInfo Pro v2019
Be Location Intelligent with MapInfo Pro v2019Be Location Intelligent with MapInfo Pro v2019
Be Location Intelligent with MapInfo Pro v2019
 

Mais 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
 
Nokia Asha webinar: Developing health-care applications for Nokia Asha phones
Nokia Asha webinar: Developing health-care applications for Nokia Asha phonesNokia Asha webinar: Developing health-care applications for Nokia Asha phones
Nokia Asha webinar: Developing health-care applications for Nokia Asha phonesMicrosoft Mobile Developer
 

Mais 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
 
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
 
NFC, Bluetooth e comunicazione tra app
NFC, Bluetooth e comunicazione tra appNFC, Bluetooth e comunicazione tra app
NFC, Bluetooth e comunicazione tra app
 
Nokia Asha webinar: Developing health-care applications for Nokia Asha phones
Nokia Asha webinar: Developing health-care applications for Nokia Asha phonesNokia Asha webinar: Developing health-care applications for Nokia Asha phones
Nokia Asha webinar: Developing health-care applications for Nokia Asha phones
 
Connettersi al Cloud Azure Mobile Services
Connettersi al Cloud Azure Mobile ServicesConnettersi al Cloud Azure Mobile Services
Connettersi al Cloud Azure Mobile Services
 

Último

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Último (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Intro to apps with maps for series 40

  • 1. Nokia Series 40 Application Development with Nokia Maps and Location APIs for Series 40 Jason Fox Technical Support Engineer Maps Platform 1 © Nokia 2012 Intro to Maps on Apps.pptx
  • 2. Agenda 1. Introduction to Nokia Maps API for Java ME 2. Getting Started - Prerequisites 3. Basic Mapping Concepts 4. An Introduction to the Search and Routing Services 5. An Introduction to positioning (JSR-179) 2 © Nokia 2012 Intro to Maps on Apps.pptx
  • 3. Nokia Maps API for Java ME 3 © Nokia 2012 Intro to Maps on Apps.pptx
  • 4. What is Nokia Maps API for Java ME? • API aimed at Series 40 Phones. Allows you to develop mobile applications based on Nokia Maps. • Façade Pattern - hides all the “plumbing” code - the low level connection calls, image manipulation etc. • Targets devices supporting MIDP 2.0 or higher. • Not currently part of the SDK • Single downloadable JAR around 150 kB. • Faster App development. Better App performance Full details at : http://www.developer.nokia.com/Develop/Maps/Maps_API_for_Java_ME/ 4 © Nokia 2012 Intro to Maps on Apps.pptx
  • 5. Why use Nokia Maps API for Java ME? • Multiple map types optimised for mobile displays • Low latency and reduced network traffic compared with static map image solutions. • “Out-of-the box” support for common mapping use cases (Markers, Images, Polygons, Polylines, Pan and Zoom) • In-built libraries to access search, routing and POI information services. • Map Components are open to extension - ability to customise and override standard API functionality. • Advanced Features as standard, such as KML parsing and the addition of custom overlays 5 © Nokia 2012 Intro to Maps on Apps.pptx
  • 6. Comparison of Nokia Maps for Java ME vs. Static Map Image Solutions Static Map (e.g. RESTful Map API) • one single http request per map ->one single image returned in response • new request for each alteration. Maps for Java ME • multiple http requests for individual map tiles. • Map tiles are cached. • Map tiles stitched together and objects added to display result on screen • Additional requests only made if necessary. Result • Reduced latency and lowered network traffic though built-in intelligent map rendering, caching and tiling = Better for Mobile. 6 © Nokia 2012 Intro to Maps on Apps.pptx
  • 7. Prerequisites 7 © Nokia 2012 Intro to Maps on Apps.pptx
  • 8. Prerequisites 1. Install a Java Runtime Environment 6 http://www.java.com/en/download/index.jsp 2. Install an IDE (e.g. NetBeans) Netbeans.org 3. Install a Nokia SDK for Java (free) http://www.developer.nokia.com/Develop/Java/Tools/ 8 © Nokia 2012 Intro to Maps on Apps.pptx
  • 9. Prerequisites 1. 4. Configure Nokia SDK in NetBeans 2. 3. 9 © Nokia 2012 Intro to Maps on Apps.pptx
  • 10. Prerequisites 5. Download the binary Jar http://www.developer.nokia.com/Develop/Maps/Maps_API_for_Java_ME/Getting_started/ 10 © Nokia 2012 Intro to Maps on Apps.pptx
  • 11. Prerequisites 6. Register as a developer free at www.developer.nokia.com 11 © Nokia 2012 Intro to Maps on Apps.pptx
  • 12. Prerequisites 7. Obtain a free set of authentication credentials (App Id and Token) from: https://api.developer.nokia.com/ovi- api/ui/registration − A unique App ID and Token, are required for each application 8. After creating a new NetBeans project, You must add a reference to the Nokia Maps API binary jar itself - Maps_API.jar. This reference is added under the ”Resources” folder in theNetBeans project. 12 © Nokia 2012 Intro to Maps on Apps.pptx
  • 13. Basic Mapping Concepts • The Minimal Map • An Introduction to Map Types • Map Languages • Markers • Polylines and Polygons • Interaction 13 © Nokia 2012 Intro to Maps on Apps.pptx
  • 14. The Minimal Map A Pannable Zoomable Map in five lines of code 1. Set credentials in the ApplicationContext 2. Create a MapCanvas 3. Set it as the current Display 14 © Nokia 2012 Intro to Maps on Apps.pptx
  • 15. Map Types Pick the right map type for your app 15 © Nokia 2012 Intro to Maps on Apps.pptx
  • 16. Map Types – Simple Method The Standard Map Schemes The Code 16 © Nokia 2012 Intro to Maps on Apps.pptx
  • 17. Map Types – Advanced Method 1) Implement a MapSchemeListener and call getAvailableMaps() 2) Handle Success and Failure 3) Set the BaseMapType from MapProviders received 17 © Nokia 2012 Intro to Maps on Apps.pptx
  • 18. Map Languages • Currently eight map Languages available Arabic, Chinese, German, English, French, Italian, Russian and Spanish • Just set the DefaultLanguage in the ApplicationContext • By default Maps are displayed in English 18 © Nokia 2012 Intro to Maps on Apps.pptx
  • 19. Map Markers Markers highlight points of interest at a specified location on the map - two types exist: • MapStandardMarker • Various Geometric Shapes plus Balloon • Easy to add text, change color (and opacity) • MapMarker • Used to add graphical icons. • Need to define an anchor point. • Use the MapFactory to created instances of MapStandardMarkers and MapMarkers • Default marker is a ‘Nokia Blue’ Balloon 19 © Nokia 2012 Intro to Maps on Apps.pptx
  • 20. Polylines and Polygons • A MapPolyline is a series of connected points • A MapPolygon is the area within a closed loop of points • Every instance of a MapPolygon or MapPolyline is created using the MapFactory • Both objects have an implicit GeoBoundingBox. 20 © Nokia 2012 Intro to Maps on Apps.pptx
  • 21. MapCanvas MapDisplay MapObject • MapCanvas holds a MapFactory and a MapDisplay • Use the MapFactory to create MapObjects • Can also use MapFactory to create a MapDisplay directly e.g. for automatic caching of Static Maps • The MapDisplay contains MapObjects but is also a MapObject itself. • MapObjects may be also be contained within a MapContainer 21 © Nokia 2012 Intro to Maps on Apps.pptx
  • 22. Map Events • Create a MapComponent to interact with your MapDisplay • Add an EventListener to your MapComponent to receive notifications of screen interactions and key presses 22 © Nokia 2012 Intro to Maps on Apps.pptx
  • 23. An Introduction to Location-Based Services • Search (Geocoding and Reverse Geocoding) • Places Search • Routing • Sharing 23 © Nokia 2012 Intro to Maps on Apps.pptx
  • 24. Geocoding Search • Finds a location on the Map from a given Address • Search can be either synchronous or asynchronous. • Asynchronous search is preferred. 1. Implement a GeoCodeRequestListener 2. Create a GeoCodeRequest 3. Handle Success or Failure 24 © Nokia 2012 Intro to Maps on Apps.pptx
  • 25. Reverse Geocoding Search • Finds the Address for a given geographic location. • Search can be either synchronous or asynchronous. • Asynchronous search is preferred. 1. Implement a ReverseGeocodeRequestListener 2. Create a ReverseGeoCodeRequest 3. Handle Success or Failure 25 © Nokia 2012 Intro to Maps on Apps.pptx
  • 26. Places Search • Flexible Local Search • General Text Search (e.g. “Pizza”) • Category Search (e.g. restaurant) • Combined Search (e.g. “Italian” + restaurant) • Drill down to get more details • Contact Details • Opening Times • Description and Reviews • Images etc. 26 © Nokia 2012 Intro to Maps on Apps.pptx
  • 27. Places Search 1. Implement a PlaceSearchRequestListener 2. Create a PlaceSearchRequest 3. Handle Success or Failure 4. More details can be obtained by interrogating the Result 27 © Nokia 2012 Intro to Maps on Apps.pptx
  • 28. Routing Service • Routing Service consists of creating a route between two or more Waypoints. • Responses from the Routing service can take time. Make your RouteRequests asynchronously. 1. Implement a RouteListener 2. Create a RouteRequest 3. Handle Success or Failure 28 © Nokia 2012 Intro to Maps on Apps.pptx
  • 29. Routing Service • The preferred route calculation can be optimized by altering the parameters of the RoutingMode • Routing Type – default is RoutingType.Shortest • Mode of Transport – default is TransportMode.CAR • Additional Restrictions – None are selected by default 29 © Nokia 2012 Intro to Maps on Apps.pptx
  • 30. Sharing Manager • Creates short encrypted URLs for the RESTful Maps API • Send URL as an SMS for a client to receive a static map. • Service forwards to maps.nokia.com or m.maps.nokia.com on capable browsers 30 © Nokia 2012 Intro to Maps on Apps.pptx
  • 31. Positioning • Separate Optional Package for Positioning (JSR-179) • Frequently combined with the Nokia Maps API for Java ME, though not part of the API itself • Two location methods maybe available • Cell ID positioning • GPS 31 © Nokia 2012 Intro to Maps on Apps.pptx
  • 32. Cell-ID Location • A MIDlet can obtain an approximate position using the Cell-ID location method. • The method consists of passing the ID of the cell the device is currently connected to, on to a look-up service. The service will then return the well-known position of the given cell-ID. • This Cell ID location provides a method of positioning mobile devices which do not contain a GPS unit. Note: the degree of uncertainty can vary of a few meters to hundreds of kilometers, depending upon the infrastructure of the local network and the data available to the look-up service for that region 32 © Nokia 2012 Intro to Maps on Apps.pptx
  • 33. Cell-ID Example 1) Create a Cell-ID LocationProvider using LocationUtils Note: The second parameter of getLocationProvider() is currently always null. This leaves the library open for future extension 2) Make a call to getLocation() and process the result The attributes of the QualifiedCoordinate class map directly onto the GeoCoordinate class. Set up a loop and poll to obtain location updates. 33 © Nokia 2012 Intro to Maps on Apps.pptx
  • 34. LocationUtil • The preferred Location method(s) can be any combination of the methods defined in JSR-179: Useful Combinations • Offline Cell ID • Standalone GPS • Assisted GPS • Online Cell ID an/or WLAN 34 © Nokia 2012 Intro to Maps on Apps.pptx
  • 35. GPS Example 1. Create a GPS LocationProvider 2. Set the provider to start polling 3. Retrieve and process the result 35 © Nokia 2012 Intro to Maps on Apps.pptx
  • 36. For More Information Download the latest Nokia SDK for Java http://developer.nokia.com Consult the Nokia Developer Library http://library.developer.nokia.com Nokia Maps API http://developer.nokia.com/Maps 36 © Nokia 2012 Intro to Maps on Apps.pptx

Notas do Editor

  1. Intro – Why bother?Prereqs - What you need to get started how to get a basic map up on screen.Basic– blobs on the map - this is where the code will get started.Routing, search are included in the API
  2. http://www.developer.nokia.com/info/sw.nokia.com/id/6bdf62e2-c739-4c29-bd9f-ddf8455f563e/JavaME.htmlFaçade Pattern - hides all the “plumbing” code - the low level connection calls, image manipulation etc. leaving a simple and consistent interface so you don’t need to reinvent the wheel.
  3. Does all the hard bits so you don’t have to bother.
  4. The Examples were built using Nokia SDK 1.0.The API will be integrated into Nokia SDK 2.0
  5. If phone supports landscape, map will display as landscape.Nokia-MIDlet-App-Orientation: landscape JAD file.You will want http permission javax.microedition.io.Connector.http
  6. Why bother? – could use alternate maps – e.g. small text “Standard Web” versions.Easter Egg maps – e.g. Low Glare “Night Mode”. Recommendation – have a fallback.
  7. All map objects are created through the MapFactoryBalloon is the classic blob on the map. The right size for a thumb.Probably want to retain a reference to the marker. (When I Click on X do Y) getObjectsAt()Don’t make icons too small. Png for transparency.Readability of text – wouldn’t recommend it. Less is more . Use tooltip to get feedback.
  8. All map objects are created through the MapFactoryDefault width of a line.zoomTo
  9. Cust
  10. All map objects are created through the MapFactoryDefault width of a line.zoomTo
  11. Search/Places Routing make requests to online REST services, an interpret the result.Sharing is a URL minfying service for nokia maps – allows the return of an image.
  12. Geocoding is Address to Location.Can supply hint – The Toledo problem ( two cities similar size same name) = other example Hamilton. HENCE THE NULL above!
  13. How to get the central point of the map.
  14. A general places search - What is there to see and do around here?   A category-based places search - What restaurants are there within walking distance of here?A text based search – Is there a Chinese restaurant within walking distance?An in depth search – Is that Chinese restaurant within walking distance, open at this time of night, and is it any good?
  15. Synchronous (obviously)
  16. -1 is the timeout parameter
  17. -1 is the timeout parameterThe major difference between these two methods, is that the values of the interval update and time out parameters are set in a different way. In the first example both parameters are passed as arguments to the setLocationListener() method, while in the second example, the interval value is indirectly set by forcing the running thread to sleep for the given time, and the time out parameter is passed as argument when calling the getLocation() method. When frequent location queries are needed, setting a Location Listener should be preferred compared to repeatedly calling the getLocation() method for the following reasons: a) The call to getLocation() generates screen prompts because it requires the user's permission to query the location information. The same applies for the setLocationListener() method. The difference is, that the former is called continuously within the loop, thus making it impractical to use, unless the application is signed, while the latter is called only once. Note that whether the getLocation() method requires signing, in order not to prompt for the location retrieval, depends on the permission level needed per device. Using the setLocationListener() method, ensures that there are minimal prompts without the need to sign the application among the largest set of devices possible. b) By using the setLocationListener() method, it is possible for the implementation to reuse location results if it already has a recent location result when the update is due to be delivered. This is done by passing an additional argument, the maxAge parameter that defines how old the location result is allowed to be, when the update is made. However when the application needs to retrieve the device's location only once, the getLocation() method should be preferred. This is due to simplicity in the implementation. If the setLocationListener() method was preferred in this case, some additional logic would be needed so that the location listener was replaced by another one that does not listen for location updates, as soon as a valid location has been retrieved once. Otherwise, even if the application ignored the location updates provided by the locationUpdated() method, those would still run in the background, causing increased usage of battery power.