Map(Element e) { super(MapImpl.create(e)); }
public void destroy(){ MapImpl.destroy(getJSObject()); }
public void addLayers(Layer[] layers) { JSObject[] jsObjects = new JSObject[layers.length]; for (int i = 0; i < layers.length; i++) { jsObjects[i] = layers[i].getJSObject(); } JObjectArray array = new JObjectArray(jsObjects); MapImpl.addLayers(getJSObject(), array.getJSObject()); }
/** * @return LonLat - the coordinates of the center */ public LonLat getCenter(){ return new LonLat(MapImpl.getCenter(getJSObject())); }
/** * Closes all other popups first */ public void addPopupExclusive(Popup popup) { MapImpl.addPopupExclusive(getJSObject(), popup.getJSObject()); }
public void addPopup(Popup popup) { MapImpl.addPopup(getJSObject(), popup.getJSObject()); }
public Bounds getExtent() { return new Bounds(MapImpl.getExtent(getJSObject())); }
public void addControl(Control control) { MapImpl.addControl(getJSObject(), control.getJSObject()); }
public void addLayer(Layer layer) { MapImpl.addLayer(getJSObject(), layer.getJSObject()); }
/** * Get a layer based on the id assigned by OpenLayers. * A {@link org.gwtopenmaps.openlayers.client.layer.Layer} can be asked for it's id. This id can be used * to get at the layer within the application. * * @param id - String identifier assigned by OpenLayers * @return Layer - the layer on the map or null if there is no layer with the given id */ public Layer getLayer(String id) { JSObject jsObject = MapImpl.getLayer(id, getJSObject()); Layer layer = Layer.narrowToLayer(jsObject); return layer; }
public void addLayers(Layer[] layers) { JSObject[] jsObjects = new JSObject[layers.length]; for (int i = 0; i < layers.length; i++) { jsObjects[i] = layers[i].getJSObject(); } JObjectArray array = new JObjectArray(jsObjects); MapImpl.addLayers(getJSObject(), array.getJSObject()); }
/** * @return LonLat - the coordinates of the center */ public LonLat getCenter() { return new LonLat(MapImpl.getCenter(getJSObject())); }
/** Closes all other popups first */ public void addPopupExclusive(Popup popup) { MapImpl.addPopupExclusive(getJSObject(), popup.getJSObject()); }
public void addPopup(Popup popup) { MapImpl.addPopup(getJSObject(), popup.getJSObject()); }
public Bounds getExtent(){ return new Bounds(MapImpl.getExtent(getJSObject())); }
public void addControl(Control control) { MapImpl.addControl(getJSObject(), control.getJSObject()); }
public void addLayer(Layer layer) { MapImpl.addLayer(getJSObject(), layer.getJSObject()); }
/** * Get a layer based on the id assigned by OpenLayers. A * {@link org.gwtopenmaps.openlayers.client.layer.Layer} can be asked for * it's id. This id can be used to get at the layer within the application. * * @param id - String identifier assigned by OpenLayers * * @return Layer - the layer on the map or null if there is no layer with * the given id */ public Layer getLayer(String id) { JSObject jsObject = MapImpl.getLayer(id, getJSObject()); Layer layer = Layer.narrowToLayer(jsObject); return layer; }
Map(Element e) { super(MapImpl.create(e)); }
public void destroy() { MapImpl.destroy(getJSObject()); }