public Layer[] getLayers() { JSObject jsObjects = MapImpl.getLayers(getJSObject()); JObjectArray jObjectArray = JObjectArray.narrowToJObjectArray(jsObjects); Layer[] layers = new Layer[jObjectArray.length()]; for (int i = 0; i < jObjectArray.length(); i++) { layers[i] = Layer.narrowToLayer(jObjectArray.get(i)); } return layers; }
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()); }
public void setCenter(LonLat lonlat) { MapImpl.setCenter(getJSObject(), lonlat.getJSObject()); }
/** * Set the min and max zoomlevel of the map. This blocks zooming further out or in than the given * levels. * * @param minZoomLevel The minlevel to zoom * @param maxZoomLevel The maxlevel to zoom */ public void setMinMaxZoomLevel(int minZoomLevel, int maxZoomLevel) { MapImpl.setMinMaxZoomLevel(getJSObject(), minZoomLevel, maxZoomLevel); }
/** zoom in with one step. */ public void zoomIn() { MapImpl.zoomIn(getJSObject()); }
public void disableBrowserContextMenu(BrowserMenuListener listener) { MapImpl.disableBrowserContextMenu(getJSObject(), listener); }
Map(Element e) { super(MapImpl.create(e)); }
/** * This function should be called by any external code which dynamically changes the size of the * map div. It can also be called when experiencing the problem of the single small tile in the * upper left corner (doesn't work in all situations thought) */ public void updateSize() { MapImpl.updateSize(getJSObject()); }
public void zoomTo(int zoomLevel) { MapImpl.zoomTo(getJSObject(), zoomLevel); }
public void raiseLayer(Layer layer, int delta) { MapImpl.raiseLayer(getJSObject(), layer.getJSObject(), delta); }
public double getScale() { return MapImpl.getScale(getJSObject()); }
public Bounds getMaxExtent() { return new Bounds(MapImpl.getMaxExtent(getJSObject())); }
/** * See also {@link MapUnits}. * * @return String - the units used by the projection */ public String getUnits() { return MapImpl.getUnits(getJSObject()); }
public String getProjection() { return MapImpl.getProjection(getJSObject()); }
/** * Method: getLonLatFromLayerPx * * <p>Parameters: * * @param px - {<OpenLayers.Pixel>} * @return {<OpenLayers.LonLat>} */ public LonLat getLonLatFromLayerPx(Pixel px) { return new LonLat(MapImpl.getLonLatFromLayerPx(getJSObject(), px.getJSObject())); }
public double getZoomForResolution(double resolution, boolean closest) { return MapImpl.getZoomForResolution(getJSObject(), resolution, closest); }
public void setBaseLayer(Layer newBaseLayer) { MapImpl.setBaseLayer(getJSObject(), newBaseLayer.getJSObject()); }
public void zoomToScale(float scale, boolean closest) { MapImpl.zoomToScale(getJSObject(), scale, closest); }
public void destroy() { MapImpl.destroy(getJSObject()); }
public void zoomToMaxExtent() { MapImpl.zoomToMaxExtent(getJSObject()); }
Map(Element e, MapOptions options) { super(MapImpl.create(e, options.getJSObject())); }
public void setOptions(MapOptions mapOptions) { MapImpl.setOptions(getJSObject(), mapOptions.getJSObject()); }
/** * returns the DOM node of the viewport. * * @return */ public Element getViewport() { return MapImpl.getViewport(getJSObject()); }
public void panTo(LonLat lonlat) { MapImpl.panTo(getJSObject(), lonlat.getJSObject()); }
/** zoom out with one step. */ public void zoomOut() { MapImpl.zoomOut(getJSObject()); }
public void pan(int dx, int dy) { MapImpl.pan(getJSObject(), dx, dy); }
/** @return LonLat - the coordinates of the center */ public LonLat getCenter() { return new LonLat(MapImpl.getCenter(getJSObject())); }
public Size getSize() { return new Size(MapImpl.getSize(getJSObject())); }
public void setCenter(LonLat lonlat, int zoom) { MapImpl.setCenter(getJSObject(), lonlat.getJSObject(), zoom); }
public double getMaxResolution() { return MapImpl.getMaxResolution(getJSObject()); }