com.eightmotions.map
Class MapDisplay

java.lang.Object
  extended by com.eightmotions.map.MapDisplay
All Implemented Interfaces:
BaseCanvas, BufferImageListener, ExtendedMenu, MarkerListener, java.lang.Runnable, javax.microedition.lcdui.CommandListener

public class MapDisplay
extends java.lang.Object
implements BaseCanvas, java.lang.Runnable, MarkerListener, BufferImageListener, ExtendedMenu, javax.microedition.lcdui.CommandListener

This is the main interface to display a Map from Google...
The basic usage is quite simple. Just create a mapCanvas and display it...
Extended usage include usage of marker ( element of type Marker)
In the following example, a canvas is created with two markers, and the display is centered around it...
MIDP1.1 version

      mapCanvas c=new mapCanvas();
c.listPlaces.addElement(new Marker(-37.12 , 2.12 )); c.listPlaces.addElement(new Marker(-35.12 , 4.12 )); c.recenterMapAroundSel();

Some info about lon,lat, pixels coordinates: Internally, earthCanvas use mostly "pixels" position. In this coordinate, the world is 65536*256 pixels longs (longitude) and 65536*256 long in latitude.
To convert a pixel coordinates into a screen coordinate, you most apply a zoom factor.
screenX=x/(1<<zoom); screenY=y/(1<<zoom);

Note that upload of images is done in a separate Thread

Other features:
Locations are elements display on hte screen, usually using a pin.

KeyBehavior:

There is a default behavior when user press key. keft, right, top, down, move the map, '5' switch from sateliite to map mode, 1 zoom out, 3 zoom in, etc...
You can change this behavior in two ways: - By extending the component - By implementing the MapCanasListener, and listen to key events...

Customisations:



Field Summary
 Marker currentSel
          This is the currently selected location...
 Track curSavedTrack
           
static javax.microedition.lcdui.Font fontm
           
protected  int height
           
 int id
          User id in server base...Do not use it directly...
static java.util.Vector listOfMaps
           
 javax.microedition.lcdui.List listOfMapsScreen
           
 java.util.Vector listPlaces
          List of places to display //
 boolean m_autoPositionningEnabeld
          True is map follow the last GPS position automatically...
 boolean m_autoTrack
          if true indicate that the map is automatically centered to the last GPS position
 boolean m_displayCenterArrow
          True to display a square in the center of the screen...
 boolean m_displaySize
          true if display the scale size marker when repainting the screen.
 boolean m_drawConsumption
           
 boolean m_drawLon
          True if the latitude and longitude needs to be displayed
 Marker m_gpsMarker
          If not null, this Marker is used to display last gps position.
 int[] m_gpsSegments
          Used by GPS positionning....
 oneGPSPos m_lastLocation
          last
 java.util.Vector m_listMyPlaces
          The list of user places (MyPlaces) draw on top of the screen in green...
 boolean m_modeShortkey
           
 java.lang.String m_moreInfo
           
 boolean m_pause
          true if you want to pause the record, during track recording...
 boolean m_record
          boolean that tell if we are recording (true) or not the current GPS path...
 int[] m_segments
          The segments to be displayed if any.
static int m_state
           
 boolean m_useResampledImages
          This mode enable resampled image when zooming in
This might be CPU costly and can be disabeld.
 boolean m_useUSMetrics
          true is use metric are used, false for meters (default)
static int MAX_ZOOM
           
protected  java.lang.String[] menus
           
protected  int offx
           
protected  int offy
           
protected  int px
           
protected  int py
           
protected static int size
           
protected static int sizeScr
           
static int ST_MOVE_PIN
           
static int ST_NORMAL
          internal states ... for now, do not use them directly
static int ST_ZOOM
           
 javax.microedition.lcdui.Canvas theTarget
           
 Marker wayPoint
          Current waypoint (or null if no way point).
protected  int width
           
 
Constructor Summary
MapDisplay()
          Constructor of the canvas.
MapDisplay(javax.microedition.lcdui.Canvas target)
           
 
Method Summary
 void addCommand(javax.microedition.lcdui.Command inCmd)
           
 void addListener(MapDisplayListener inListener)
          Set the listener to be called when the fire is pressed on a selected item...
static void addMap(MapOverlay ov)
           
protected  void checkMove()
           
 void clear()
          Remove all markers, segments, etc....
 void commandAction(javax.microedition.lcdui.Command a, javax.microedition.lcdui.Displayable d)
           
 java.lang.String convertDisToString(int inDist)
          Convert a distance into a string.
static float convLat(int fromY)
           
static float convLon(int fromX)
          Concert a pixel position into a Latitude
Usfull for on-screen operation...
 void displayTrack(Track track, boolean doRecenter)
          Display a track on the map.
 void drawArrow(javax.microedition.lcdui.Graphics g, oneGPSPos pos, int x, int y, int col)
           
 void drawBottomIndicators(javax.microedition.lcdui.Graphics g, int posy)
           
 void drawDirectiontoWayPoint(javax.microedition.lcdui.Graphics g)
          Draw the arrow who represent the direction to the current waypoint from the current visible area
protected  void drawInfo(javax.microedition.lcdui.Graphics g, java.lang.String s, int px, int py, int col, int bcol)
           
 void drawSegment(javax.microedition.lcdui.Graphics g, int[] segment, int lpx, int lpy, int div, int color)
          Draw a segement on screen...Usually you don't need to use this directly ase ou should set up the variable m_segment, but could be usefull for some experiementations

 void drawString(javax.microedition.lcdui.Graphics g, java.lang.String toDisp, int x, int y)
          Utility function to display a shadowed string....
 void drawTopIndicators(javax.microedition.lcdui.Graphics g, int posy)
           
 float getAlt()
           
 int getBufferSize()
           
 javax.microedition.lcdui.Canvas getCanvas()
           
static java.lang.String getCoordAsString(boolean isLon, float theVal, boolean decimalMode)
          Create a string from a coordinate value (lon/lat) in decimal or degree minut form...
 double getCourseToTarget()
          Return the course from the current position to the current waypoint, -1 if no waypoint is currently selected...
 MapOverlay getCurMap()
          Return the current mapping provider used (google,msn,ask)
 Track getCurrentTrack()
          Return the current Track
 float getDir()
           
 int getDist()
          Give the distance from the current location to the current waypoint...
 int getDist(boolean doConvertInMeters)
           
 int getHeight()
           
 float getLat()
           
 int getLatPy()
          Return the current latitude (px)
 float getLon()
          Provide current Longitude, in Float
 int getLonPx()
          Return the current position, in pixels, of the center of the screen...
static MapOverlay getMap(int idx)
           
 MapOverlay getMapByName(java.lang.String inName)
           
 java.lang.String[] getMenusItem()
           
 boolean getModeProxy()
           
 MapOverlay getOverlay()
           
 int getScreenXFromLon(int inpx)
          Get real screen position from pixel pos
 int getScreenYFromLat(int inpy)
          get real screen position from pixel pos (lat)
 Marker getSelectedItem(javax.microedition.lcdui.Graphics g, int inpx, int inpy, int zoom, int dist, boolean onlyRepaint)
           
 int getSize(int inOff)
          Return the size (in meter) of an element defined in pixel in the current view
 float getSpeed()
           
 int getWidth()
           
 int getZoom()
          Provide current Zoom Factor
0 is the minimum, MAX_ZOOM is the maximum...
 void goTo(Marker place)
          A variant of previous method, with a location.
 void goTo(java.lang.String inPlace)
          Goto a specific location
 void gotoLonLat(float lon, float lat)
           
 void gotoLonLat(float lon, float lat, int zoom)
           
 void gotoLonLat(java.lang.Float lon, java.lang.Float lat, int zoom)
          Move the map to a specific location
 void iconDownloaded(Marker theLoc)
           
 void imageLoaded(BufferImage ima)
           
 void init()
          Initialise the map ...
 boolean isTrackDisplayed(Track track)
          Return true if the track given as a parameter is currently displayed on screen
 void keyPressed(int keyCode)
           
 void keyPressedImpl(int keyCode)
          Provide default behavior of the canvas:
up,down,right,left move the canvas fire switch from map to zoom if no location is selected fire generate an event to the external listener if a location is selected GAME_A and GAME_B increase/decrease zoom factor GAME_C and GAME_D go to next marker
 void keyRepeated(int keyCode)
           
 java.lang.String locateURL(java.lang.String theUrl)
          Transform an URL in a "located" URL, by checking the following carcharcter, and replacing then with the specific value: !
 boolean onMenuSelected(int idx)
           
 void paint(javax.microedition.lcdui.Graphics g)
          * * Repaint the screen....The repaint process use the buffer thread
Note that various adaptation to screen size are made....
 void paintGPSPos(javax.microedition.lcdui.Graphics g, oneGPSPos pos, int inpx, int inpy, int w, int h, int zoom)
           
 void paintIcons(javax.microedition.lcdui.Graphics g)
          Function calld on touchScreen handsets to disraw icons
protected  void paintMenu(javax.microedition.lcdui.Graphics g, java.lang.String[] menu)
           
 void pointerDragged(int x, int y)
           
 void pointerPressed(int x, int y)
           
static double realDist(float inLat, float inLon, Marker toMark)
           
 void recenterMapAroundSel()
          Recenter and rescale the map, in a way that all places are visibles...Usefull to set initial setting
 void recenterMapAroundSel(int percentage)
          Equivalent to recenterMapAroundSel but with a user defined percentage of visibility
For instanve, 80 means that there is 20 percent of margin of visibility.
 void removeCommand(javax.microedition.lcdui.Command inCmd)
           
 void removeListener(MapDisplayListener inListener)
           
static void removeMap(MapOverlay ov)
           
 void removeTrack(Track track)
          Remove the track given as a paramter from the list of currently displayed track
 void repaint()
           
 void run()
           
 void saveRecords()
           
 void selNewMap()
           
 boolean selNext(int dir)
           
 void setBufferSize(int inSize)
           
 void setClipRect(int inMinx, int inMiny, int inWidth, int inHeight)
           
 void setCommandListener(javax.microedition.lcdui.CommandListener inListener)
           
 void setCurMap(MapOverlay inCurrent)
           
 void setExtendedMenu(ExtendedMenu m)
          The "extended menu" is the one displayed when you press the * key.
 void setInfoOnScreen(java.lang.String inInfo)
           
 void setLoc(oneGPSPos newLoc)
           
 void setMapProvider(int idx, MapOverlay provider)
           
 void setMode(int inMode)
           
 void setModeProxy(boolean useProxy)
           
 void setOverlay(MapOverlay inOverlay)
           
protected  void setSelectedLoc(Marker loc)
           
 void setTileSize(int inSize)
          Set the size of the tiles.
 void setZoom(int inZoom)
          Change the zoom factor...
 void sizeChanged(int w, int h)
           
 void stop()
           
 void stopZooming()
           
static int xFromLon(float inLon)
          Convert a Float in longitude to the full pixel number in "google map" coordinate, at the maximum zoom factor level (to get the equivalent at any zoom level, divide by (1<
static int yFromLat(float inLat)
          Same for latitude
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offx

protected int offx

offy

protected int offy

width

protected int width

height

protected int height

m_segments

public int[] m_segments
The segments to be displayed if any.
This is a pair of lat/lon IN pixels...
So if segment is 3 lines longs, their are 6 elements in the array.
lat=segment[2*i]
lon=segment[2*i+1]
Note: it's better to go through a "track" object to display a segment


m_gpsSegments

public int[] m_gpsSegments
Used by GPS positionning....


currentSel

public Marker currentSel
This is the currently selected location... could be used externally....


listPlaces

public java.util.Vector listPlaces
List of places to display //


m_listMyPlaces

public java.util.Vector m_listMyPlaces
The list of user places (MyPlaces) draw on top of the screen in green...


px

protected int px

py

protected int py

size

protected static final int size
See Also:
Constant Field Values

sizeScr

protected static int sizeScr

m_drawLon

public boolean m_drawLon
True if the latitude and longitude needs to be displayed


m_displayCenterArrow

public boolean m_displayCenterArrow
True to display a square in the center of the screen...


m_displaySize

public boolean m_displaySize
true if display the scale size marker when repainting the screen.


m_useUSMetrics

public boolean m_useUSMetrics
true is use metric are used, false for meters (default)


m_lastLocation

public oneGPSPos m_lastLocation
last


m_gpsMarker

public Marker m_gpsMarker
If not null, this Marker is used to display last gps position. If null the default "arrow" is used


m_autoPositionningEnabeld

public boolean m_autoPositionningEnabeld
True is map follow the last GPS position automatically...


m_useResampledImages

public boolean m_useResampledImages
This mode enable resampled image when zooming in
This might be CPU costly and can be disabeld.


wayPoint

public Marker wayPoint
Current waypoint (or null if no way point). By setting a waypoint, you display the "arrow" to this waypoint. Note that this variable is also set up by the user when using navigation keys if there are some element displayed.


m_modeShortkey

public boolean m_modeShortkey

m_autoTrack

public boolean m_autoTrack
if true indicate that the map is automatically centered to the last GPS position


m_record

public boolean m_record
boolean that tell if we are recording (true) or not the current GPS path...


m_pause

public boolean m_pause
true if you want to pause the record, during track recording...


fontm

public static javax.microedition.lcdui.Font fontm

ST_NORMAL

public static final int ST_NORMAL
internal states ... for now, do not use them directly

See Also:
Constant Field Values

ST_ZOOM

public static final int ST_ZOOM
See Also:
Constant Field Values

ST_MOVE_PIN

public static final int ST_MOVE_PIN
See Also:
Constant Field Values

m_state

public static int m_state

curSavedTrack

public Track curSavedTrack

m_moreInfo

public java.lang.String m_moreInfo

m_drawConsumption

public boolean m_drawConsumption

id

public int id
User id in server base...Do not use it directly...


theTarget

public javax.microedition.lcdui.Canvas theTarget

MAX_ZOOM

public static final int MAX_ZOOM
See Also:
Constant Field Values

menus

protected java.lang.String[] menus

listOfMapsScreen

public javax.microedition.lcdui.List listOfMapsScreen

listOfMaps

public static java.util.Vector listOfMaps
Constructor Detail

MapDisplay

public MapDisplay()
Constructor of the canvas. The canvas is then put into full screen mode. Note that init() must be call before using the map.


MapDisplay

public MapDisplay(javax.microedition.lcdui.Canvas target)
Method Detail

getWidth

public int getWidth()

getHeight

public int getHeight()

getCanvas

public javax.microedition.lcdui.Canvas getCanvas()

repaint

public void repaint()

addCommand

public void addCommand(javax.microedition.lcdui.Command inCmd)

removeCommand

public void removeCommand(javax.microedition.lcdui.Command inCmd)

setCommandListener

public void setCommandListener(javax.microedition.lcdui.CommandListener inListener)

setExtendedMenu

public void setExtendedMenu(ExtendedMenu m)
The "extended menu" is the one displayed when you press the * key. You can change it by implementing your own extended menu and giving it to the canvas. To remove it completely, set it to null...


init

public void init()
Initialise the map ... Called internally...


getLonPx

public int getLonPx()
Return the current position, in pixels, of the center of the screen...

Returns:
the current position (of the center of the screen) in pixel at the maximum resolution

getLatPy

public int getLatPy()
Return the current latitude (px)

Returns:
See Also:
getLonPx

getScreenXFromLon

public int getScreenXFromLon(int inpx)
Get real screen position from pixel pos

Parameters:
px -
Returns:

getScreenYFromLat

public int getScreenYFromLat(int inpy)
get real screen position from pixel pos (lat)

Parameters:
py -
Returns:

setClipRect

public void setClipRect(int inMinx,
                        int inMiny,
                        int inWidth,
                        int inHeight)

getZoom

public int getZoom()
Provide current Zoom Factor
0 is the minimum, MAX_ZOOM is the maximum...

Returns:
zoom factor

setZoom

public void setZoom(int inZoom)
Change the zoom factor...

Note: if there was some pending image download, these are cancelled as they are probably not anymore needed...

0 is the minimum zoom level, and currently MAX_ZOOM is the maximum one...

Parameters:
inZoom - : the new zoom factor, between 0 and MAX_ZOOM included.

getBufferSize

public int getBufferSize()

setTileSize

public void setTileSize(int inSize)
Set the size of the tiles. Changing this will move into the "proxyMode" if it was not yet the case. If you want to go back to the normal mode (256 px tiles), use setProxyMode(false);


setMode

public void setMode(int inMode)

setModeProxy

public void setModeProxy(boolean useProxy)

getModeProxy

public boolean getModeProxy()

setBufferSize

public void setBufferSize(int inSize)

setOverlay

public void setOverlay(MapOverlay inOverlay)

getOverlay

public MapOverlay getOverlay()

run

public void run()
Specified by:
run in interface java.lang.Runnable

stop

public void stop()

clear

public void clear()
Remove all markers, segments, etc....


getSelectedItem

public Marker getSelectedItem(javax.microedition.lcdui.Graphics g,
                              int inpx,
                              int inpy,
                              int zoom,
                              int dist,
                              boolean onlyRepaint)

sizeChanged

public void sizeChanged(int w,
                        int h)

paint

public void paint(javax.microedition.lcdui.Graphics g)
* * Repaint the screen....The repaint process use the buffer thread
Note that various adaptation to screen size are made....

Specified by:
paint in interface BaseCanvas

drawTopIndicators

public void drawTopIndicators(javax.microedition.lcdui.Graphics g,
                              int posy)

drawBottomIndicators

public void drawBottomIndicators(javax.microedition.lcdui.Graphics g,
                                 int posy)

getSize

public int getSize(int inOff)
Return the size (in meter) of an element defined in pixel in the current view

Parameters:
inPixelWidth -
Returns:
the size!

realDist

public static double realDist(float inLat,
                              float inLon,
                              Marker toMark)

drawSegment

public void drawSegment(javax.microedition.lcdui.Graphics g,
                        int[] segment,
                        int lpx,
                        int lpy,
                        int div,
                        int color)
Draw a segement on screen...Usually you don't need to use this directly ase ou should set up the variable m_segment, but could be usefull for some experiementations

Parameters:
g -
segment -
lpx -
lpy -
div -
color -

drawInfo

protected void drawInfo(javax.microedition.lcdui.Graphics g,
                        java.lang.String s,
                        int px,
                        int py,
                        int col,
                        int bcol)

getCoordAsString

public static java.lang.String getCoordAsString(boolean isLon,
                                                float theVal,
                                                boolean decimalMode)
Create a string from a coordinate value (lon/lat) in decimal or degree minut form...

Parameters:
isLon -
theVal -
decimalMode -
Returns:

getDist

public int getDist()
Give the distance from the current location to the current waypoint...
return -1 if there is no waypoint selected...
if location is not used, then it's the distance to the current visible position.

Returns:
distance in pixels at the maximum level of zoom

getDist

public int getDist(boolean doConvertInMeters)

getCourseToTarget

public double getCourseToTarget()
Return the course from the current position to the current waypoint, -1 if no waypoint is currently selected...

Returns:
angle in radian

convertDisToString

public java.lang.String convertDisToString(int inDist)
Convert a distance into a string.
Distance is in meters! Resulting string will be in meters or kilometers...

Parameters:
inDist -
Returns:

drawDirectiontoWayPoint

public void drawDirectiontoWayPoint(javax.microedition.lcdui.Graphics g)
Draw the arrow who represent the direction to the current waypoint from the current visible area

Parameters:
g -

paintMenu

protected void paintMenu(javax.microedition.lcdui.Graphics g,
                         java.lang.String[] menu)

getMenusItem

public java.lang.String[] getMenusItem()
Specified by:
getMenusItem in interface ExtendedMenu

onMenuSelected

public boolean onMenuSelected(int idx)
Specified by:
onMenuSelected in interface ExtendedMenu

recenterMapAroundSel

public void recenterMapAroundSel()
Recenter and rescale the map, in a way that all places are visibles...Usefull to set initial setting


recenterMapAroundSel

public void recenterMapAroundSel(int percentage)
Equivalent to recenterMapAroundSel but with a user defined percentage of visibility
For instanve, 80 means that there is 20 percent of margin of visibility.
More than 100 means that some elements might not be visible...

Parameters:
percentage - Define margins (100=no margin, 80 means 20% of margin)

drawString

public void drawString(javax.microedition.lcdui.Graphics g,
                       java.lang.String toDisp,
                       int x,
                       int y)
Utility function to display a shadowed string....

Parameters:
g - Graphics display
toDisp - String to be displayed
x - Location on screen
y -

goTo

public void goTo(java.lang.String inPlace)
Goto a specific location

Parameters:
inPlace - contains the location in the form longitute latitude zoom_factor satmode Example:
  goTo("-122.2 37.1 10 true");
  
will display the satellite map of -122.2,37.1 with a zoom factor of 10 and in statellite mode (false for street mode)

goTo

public void goTo(Marker place)
A variant of previous method, with a location.
This location does not to be part of the current visible location
(for example, could be used with saved location)

Parameters:
place -

xFromLon

public static int xFromLon(float inLon)
Convert a Float in longitude to the full pixel number in "google map" coordinate, at the maximum zoom factor level (to get the equivalent at any zoom level, divide by (1<
Parameters:
inLon - the longitude in Float
Returns:

yFromLat

public static int yFromLat(float inLat)
Same for latitude

Parameters:
inLat -
Returns:

gotoLonLat

public void gotoLonLat(java.lang.Float lon,
                       java.lang.Float lat,
                       int zoom)
Move the map to a specific location

Parameters:
lon -
lat -
zoom - 0 is maximum factor, 16 is minimum
isSatellite - true if display satellite maps, false for stree map

gotoLonLat

public void gotoLonLat(float lon,
                       float lat)

gotoLonLat

public void gotoLonLat(float lon,
                       float lat,
                       int zoom)

getLon

public float getLon()
Provide current Longitude, in Float

Returns:

convLon

public static float convLon(int fromX)
Concert a pixel position into a Latitude
Usfull for on-screen operation...
Note: This static function can be called by any other classe, the only link variable in mapCanvas is the satellite mode.

Parameters:
fromX - pixel position (maximum zoom factor)
Returns:
computed longitude from this pixel position

getLat

public float getLat()
Returns:
current Latitude in Float

getSpeed

public float getSpeed()
Returns:
current speed in Float

getDir

public float getDir()
Returns:
current dir

getAlt

public float getAlt()
Returns:
current speed in Float

convLat

public static float convLat(int fromY)
Parameters:
fromY - pixel
Returns:
computed lagitude from this pixel position

selNext

public boolean selNext(int dir)

setInfoOnScreen

public void setInfoOnScreen(java.lang.String inInfo)

paintIcons

public void paintIcons(javax.microedition.lcdui.Graphics g)
Function calld on touchScreen handsets to disraw icons


pointerPressed

public void pointerPressed(int x,
                           int y)
Specified by:
pointerPressed in interface BaseCanvas

checkMove

protected void checkMove()

setSelectedLoc

protected void setSelectedLoc(Marker loc)

pointerDragged

public void pointerDragged(int x,
                           int y)
Specified by:
pointerDragged in interface BaseCanvas

keyRepeated

public void keyRepeated(int keyCode)
Specified by:
keyRepeated in interface BaseCanvas

keyPressed

public void keyPressed(int keyCode)
Specified by:
keyPressed in interface BaseCanvas

keyPressedImpl

public void keyPressedImpl(int keyCode)
Provide default behavior of the canvas:

See Also:
Canvas.keyPressed(int)

stopZooming

public void stopZooming()

getCurMap

public MapOverlay getCurMap()
Return the current mapping provider used (google,msn,ask)

Returns:
the currently used Map

setCurMap

public void setCurMap(MapOverlay inCurrent)

addListener

public void addListener(MapDisplayListener inListener)
Set the listener to be called when the fire is pressed on a selected item...

Parameters:
inListener -

removeListener

public void removeListener(MapDisplayListener inListener)

iconDownloaded

public void iconDownloaded(Marker theLoc)
Specified by:
iconDownloaded in interface MarkerListener

drawArrow

public void drawArrow(javax.microedition.lcdui.Graphics g,
                      oneGPSPos pos,
                      int x,
                      int y,
                      int col)

paintGPSPos

public void paintGPSPos(javax.microedition.lcdui.Graphics g,
                        oneGPSPos pos,
                        int inpx,
                        int inpy,
                        int w,
                        int h,
                        int zoom)

setLoc

public void setLoc(oneGPSPos newLoc)

saveRecords

public void saveRecords()

imageLoaded

public void imageLoaded(BufferImage ima)
Specified by:
imageLoaded in interface BufferImageListener

displayTrack

public void displayTrack(Track track,
                         boolean doRecenter)
Display a track on the map.

Parameters:
track: - th track to be displayed
doRecenter - true if we need to recenter the view around the content of the track

isTrackDisplayed

public boolean isTrackDisplayed(Track track)
Return true if the track given as a parameter is currently displayed on screen


getCurrentTrack

public Track getCurrentTrack()
Return the current Track


removeTrack

public void removeTrack(Track track)
Remove the track given as a paramter from the list of currently displayed track


locateURL

public java.lang.String locateURL(java.lang.String theUrl)
Transform an URL in a "located" URL, by checking the following carcharcter, and replacing then with the specific value: !minlat! !minlon! !maxlat! !maxlon! !lat! !lon!


getMapByName

public MapOverlay getMapByName(java.lang.String inName)

selNewMap

public void selNewMap()

setMapProvider

public void setMapProvider(int idx,
                           MapOverlay provider)
Parameters:
idx - : index in the list of map provider
provider - : a MapOverlay object

commandAction

public void commandAction(javax.microedition.lcdui.Command a,
                          javax.microedition.lcdui.Displayable d)
Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener

addMap

public static void addMap(MapOverlay ov)

removeMap

public static void removeMap(MapOverlay ov)

getMap

public static MapOverlay getMap(int idx)