Rana/Modules

From OpenStreetMap Wiki
Jump to: navigation, search

Functional areas

These modules implement major functionality


nearestRoad

Find the nearest road

mapTiles

displays the base-map

(currently it also displays your position triangle)

stats

Calculate speed etc. for displaying on the overlay

gpsd

Lookup position from GPSD

mapData

Currently nonfunctional. Will allow downloading of map data (e.g. download a certain distance around a point, or around the route)

menu

Handles all the menus

placenames

Allows searching of place names. Uses places.txt as a data source

route

Calculates and displays routes

shareServer

Currently nonfunctional. Will interact with the rana share server

GUI elements

These modules do some minor drawing function


infoOverlay

Display some text at the bottom of the main map screen

buttons

Draws the zoom/menu buttons on top of the map

icons

library for drawing icons (also owns their image objects)

Glue modules

These modules are invisible to the user, but help other modules to get along


clickHandler

Allows you to register areas of the screen as being clickable, and specify a message to send if that area is clicked on

messages

route messages to the appropriate module. (the beginning of each message should be "modulename:" and it will be passed to that module's handleMessage function)

This module also handles some simple messages itself, e.g. requests to set some option/data

mapView

"own" the map projection settings, and interprets any requests to change zoom levels, move the map, etc.

projection

convert screen to map coordinates

Debugging

These are not expected to be used in 'normal' use but assist with testing


posFromFile

Use a text file to specify position (for testing only)

replayGpx

Replay a GPX tracklog as if it were your actual position

Utility classes

Note: these are not rana modules, but they may be used by things which are modules


geo

Geographic calculations, e.g. distance between two points on earth's surface

rect

Just a rectangle

tilenames

Convert between slippy map tilenames and lat/long