org.gwtopenmaps.openlayers.client
Class MapWidget

java.lang.Object
  extended by Widget
      extended by org.gwtopenmaps.openlayers.client.MapWidget

public class MapWidget
extends Widget

See Map.


Constructor Summary
MapWidget(java.lang.String width, java.lang.String height)
          Programmatically creates the element that will contain the map, with the given width and height.
MapWidget(java.lang.String width, java.lang.String height, MapOptions options)
          Programmatically creates the element that will contain the map, with the given width and height.
 
Method Summary
 Map getMap()
          Gets the map associated with a MapWidget instance.
protected  void onAttach()
           
protected  void onLoad()
           
 void setHeight(java.lang.String height)
           
 void setWidth(java.lang.String width)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapWidget

public MapWidget(java.lang.String width,
                 java.lang.String height)
Programmatically creates the element that will contain the map, with the given width and height. The map itself is instantiated upon calling getMap().

Parameters:
width - - a String with the width of the element that will contain the map in CSS units.
height - - a String with the height of the element that will contain the map in CSS units.
Since:
GWT-OL 0.2

MapWidget

public MapWidget(java.lang.String width,
                 java.lang.String height,
                 MapOptions options)
Programmatically creates the element that will contain the map, with the given width and height. The map itself is instantiated upon calling getMap().

Parameters:
width - - a String with the width of the element that will contain the map in CSS units.
height - - a String with the height of the element that will contain the map in CSS units.
options - - null if no options should be set upon map instantiation or a MapOptions object that is passed to the map upon instantiation.
Since:
GWT-OL 0.2
Method Detail

getMap

public Map getMap()
Gets the map associated with a MapWidget instance. The map is instantiated when this method is called for the first time.

Returns:
Map - see Map.

setHeight

public void setHeight(java.lang.String height)

setWidth

public void setWidth(java.lang.String width)

onAttach

protected void onAttach()

onLoad

protected void onLoad()