com.eightmotions.map
Class GenericOverlay

java.lang.Object
  extended by com.eightmotions.map.GenericOverlay
All Implemented Interfaces:
MapOverlay

public class GenericOverlay
extends java.lang.Object
implements MapOverlay

This is a "generif overlay", that could be easily used with GoogleEarth overlay....
The url can be modified and can contain some special field, that are modified dynamically by the application For instance: http://myServer.com/maps/bbox=!minLat!minLon!maxLat!maxLon! These specific fields are: !minLat! !minLon !maxLat! !maxLon! !x! !y! !z! !zoom! !quad!

See Also:
MapCustomOverlay

Field Summary
 boolean isTransparent
           
 char[] m_quad
           
 java.lang.String m_url
           
 java.lang.String name
           
 
Constructor Summary
GenericOverlay()
          Do not forget to initialize m_url, and name
GenericOverlay(java.lang.String inUrl)
           
GenericOverlay(java.lang.String inName, java.lang.String inUrl)
           
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_url

public java.lang.String m_url

m_quad

public char[] m_quad

isTransparent

public boolean isTransparent

name

public java.lang.String name
Constructor Detail

GenericOverlay

public GenericOverlay(java.lang.String inUrl)

GenericOverlay

public GenericOverlay()
Do not forget to initialize m_url, and name


GenericOverlay

public GenericOverlay(java.lang.String inName,
                      java.lang.String inUrl)
Method Detail

getTileURL

public java.lang.String getTileURL(int x,
                                   int y,
                                   int z,
                                   int sizeSq)
Description copied from interface: MapOverlay
Must be implemented to return the URL of a tile

Specified by:
getTileURL in interface MapOverlay
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

public boolean isTransparent()
Description copied from interface: MapOverlay
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

Specified by:
isTransparent in interface MapOverlay
Returns:
the URL of the image

getName

public java.lang.String getName()
Description copied from interface: MapOverlay
Return the name of this overlay. The name will be displayed on screen

Specified by:
getName in interface MapOverlay