Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 12:03, 19 June 2008.

Simple Distance Presenter

From Forum Nokia Wiki


ID Creation date March 31, 2008
Platform S60 3rd, S60 3rd FP1 Tested on devices N95 8Gb
Category Symbian C++ Subcategory LBS
Keywords: Simple Distance Presenter

Simple Distance Presenter (SDP).

This program demonstrates:

  • how to select landmarks from the database
  • how to read landmarks data
  • how to display landmarks on the screen
  • how to calculate distance between two landmarks


Image:SDP.PNG


SDP allows user to select landmarks from the database to display them on the screen and to calculate the distance between them. Latitude and longitude - these coordinates are used for defining the location of the point on the sphere surface. For displaying the landmarks on the rectangular screen, we can provide the value of latitude as Y, and longitude as X. This approach allows to display data enough exactly, if the landmarks are located not very far apart.

This program offers You to select one main landmark (shown in red) and many active landmarks (green). The main landmark is displayed on the center of the screen. The displaying of the active landmarks are depended on the location of the main landmark.

For the correct displaying the data, the most distant landmark from main is searched every time, when the list of the active landmarks is selected. The coordinates of that landmark are used for calculation transformation factor (depending on the size of the screen) for displaying all active landmarks. After having displayed current active landmark, the line from this point to the center point is drawn and the distance between these landmarks is printed in the navigation pane. You can change current active point via cursor keys.

Classes description:

  • TSimpleLandmark - is used for storing data that contain landmark position.
  • CLandmarkDistanceCalc - is used for storing data from many landmarks and for distance calculation.
  • CLandmarkDistancePresenter - it is a custom control, it is used for drawing the map.
  • MLandmarkPresenterObserver - is used for notification that new distance line is drawed.

Source code: Image:SimpleDistancePresenter.zip

It contains detailed comments.

Internal Links

Related Discussions
Thread Thread Starter Forum Replies Last Post
Listbox in a simple GUI application alav Symbian User Interface 12 2007-12-05 20:17
J2ME for nokia 7600 bartthomas Mobile Java General 0 2005-03-01 19:26
Nokia 6610 + Windows Hyperterminal santanubiswas PC Suite API and PC Connectivity SDK 7 2006-03-29 00:43
some tutorials required for designing simple bluetooth multiplayer games tango85 Mobile Java General 5 2007-04-13 12:59
How to start? ahsp83 General Symbian C++ 1 2005-11-22 19:13
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX