net.landspurg.map
Interface MapCustomOverlay


public interface MapCustomOverlay

MapCustomOverlay.java Created on 28 novembre 2006, 11:42 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 getTileURL(int x, int y, int z, int sizeSq, boolean isSat)
          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,
                            boolean isSat)
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
isSat - true if current mode is satelitte...Can be ignored by the user class if not needed
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