com.eightmotions.map
Interface MapOverlay

All Known Implementing Classes:
GenericOverlay

public interface MapOverlay

MapOverlay.java Implement this interface to be able to display custom layers on top of the current map.

A layer is a specific set of tiles, and are different from track. They are images that are displayed on top (or in place) of the current map, and that can be accessed through the internet.

You just have to implement this interface, and use MapCanvas.setOverlay() to set a custom overlay.


Method Summary
 java.lang.String getName()
          Return the name of this overlay.
 java.lang.String getTileURL(int x, int y, int z, int sizeSq)
          Must be implemented to return the URL of a tile
 boolean isTransparent()
          Return true if the layer is transparent, or haves some alpha capacities.
 

Method Detail

getTileURL

java.lang.String getTileURL(int x,
                            int y,
                            int z,
                            int sizeSq)
Must be implemented to return the URL of a tile

Parameters:
x - position of the tile in pixel space...
y - y position in pixel space...
z - zoom factor
sizeSq - size of the tile...usually only 256 and 128 are supported
Returns:
Return the URL of an image of size sizeQxsizeSq that will be downloaded and displayed...

isTransparent

boolean isTransparent()
Return true if the layer is transparent, or haves some alpha capacities. The behavior of the engine is that the overlay IS NOT transparent, then no map will be displayed first, assuming that this layer will contains all the visible informations

Returns:
the URL of the image

getName

java.lang.String getName()
Return the name of this overlay. The name will be displayed on screen