Tabnine Logo
MapWidget
Code IndexAdd Tabnine to your IDE (free)

How to use
MapWidget
in
org.gwtopenmaps.openlayers.client

Best Java code snippets using org.gwtopenmaps.openlayers.client.MapWidget (Showing top 11 results out of 315)

origin: geosdi/GWT-OpenLayers

  public void execute() {
    getMap().updateSize();
  }
});
origin: org.gwtopenmaps.openlayers/openlayers_gwt

/**
 * Programmatically creates the element that will contain the map,
 * with the given width and height.
 *
 * The map itself is instantiated upon calling {@link #getMap()}.
 *
 * @param width - a String with the width of the element that will contain the map in CSS units.
 * @param height - a String with the height of the element that will contain the map in CSS units.
 * @param 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
 */
public MapWidget(String width, String height, MapOptions options) {
  Element e = DOM.createDiv();
  this.options = options;
  setElement(e);
  setWidth(width);
  setHeight(height);
}
origin: org.n52.sensorweb/sensorwebclient-ui

private void initializeMapWidget(String cssHeight) {
  initializeDefaultMapOptions();
  mapWidget = new MapWidget("100%", cssHeight, defaultMapOptions);
  map = mapWidget.getMap();
  addMapControls(defaultMapOptions);
}
origin: org.n52.sensorweb/sensorwebclient-ui

public void resizeTo(int width, int height) {
  mapWidget.setHeight(height + "px");
  mapWidget.setWidth(width + "px");
  this.width = width;
  this.height = height;
}
origin: geosdi/GWT-OpenLayers

/**
 * Gets the map associated with a MapWidget instance.
 *
 * The map is instantiated when this method is called for the first time.
 *
 * @return Map - see {@link Map}.
 */
public Map getMap() {
  //The preference here is lazy initalization
  if (map == null) {
    if (options == null) {
      map = new Map(getElement());
    } else {
      map = new Map(getElement(), options);
    }
  }
  return map;
}
origin: org.gwtopenmaps.openlayers/openlayers_gwt

/**
 * Gets the map associated with a MapWidget instance.
 *
 * The map is instantiated when this method is called for the first time.
 *
 * @return Map - see {@link Map}.
 */
public Map getMap()
{
  //The preference here is lazy initalization
  if (map == null)
  {
    if (options == null)
      map = new Map(getElement());
    else
      map = new Map(getElement(), options);
  }
  return map;
}
origin: geosdi/GWT-OpenLayers

/**
 * Programmatically creates the element that will contain the map, with the
 * given width and height.
 *
 * The map itself is instantiated upon calling {@link #getMap()}.
 *
 * @param width - a String with the width of the element that will contain
 * the map in CSS units.
 * @param height - a String with the height of the element that will contain
 * the map in CSS units.
 * @param 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
 */
public MapWidget(String width, String height, MapOptions options) {
  Element e = DOM.createDiv();
  this.options = options;
  setElement(e);
  setWidth(width);
  setHeight(height);
}
origin: geosdi/GWT-OpenLayers

  public void onResize() {
    getMap().updateSize();
  }
}
origin: geoserver/geofence

mapWidget = new MapWidget("100%", "100%", defaultMapOptions);
this.map = mapWidget.getMap();
origin: org.gwtopenmaps.openlayers/openlayers_gwt

  public void execute() {
    getMap().updateSize();
  }
});
origin: stackoverflow.com

public void onModuleLoad()
 {
   MapOptions mapOptions = new MapOptions();
   MapWidget mapWidget = new MapWidget( "400px", "300px", mapOptions );
   OSM osm_1 = OSM.Mapnik( "Mapnik" );
   OSM osm_2 = OSM.CycleMap( "CycleMap" );
   osm_1.setIsBaseLayer( true );
   osm_2.setIsBaseLayer( true );
   LonLat lonLat = new LonLat( 6.95, 50.94 );
   lonLat.transform( "EPSG:4326", "EPSG:900913" );
   Map map = mapWidget.getMap();
   map.addLayer( osm_1 );
   map.addLayer( osm_2 );
   map.addControl( new LayerSwitcher() );
   map.addControl( new MousePosition() );
   map.setCenter( lonLat, 12 );
   RootPanel.get().add( mapWidget );
 }
org.gwtopenmaps.openlayers.clientMapWidget

Javadoc

See Map.

Most used methods

  • getMap
    Gets the map associated with a MapWidget instance. The map is instantiated when this method is calle
  • setHeight
  • setWidth
  • <init>
    Programmatically creates the element that will contain the map, with the given width and height. The
  • getElement
  • setElement
  • setStylePrimaryName

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSystemService (Context)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JComboBox (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now