/** * Sets all resolutions for the layer. * @param resolutions A list of map resolutions (map units per pixel) in descending order. */ public void setResolutions(double[] resolutions) { LayerImpl.setResolutions(this.getJSObject(), resolutions); }
/** * Indicates if the Layer should be displayed in the LayerSwitcher Control. * * @return true if the layer should be displayed in the LayerSwitcher Control, * false if the layer should be hidden */ public boolean displayInLayerSwitcher(){ return LayerImpl.displayInLayerSwitcher(getJSObject()); }
/** * @return The name of the Layer, or an empty string if no name was found. */ public String getName(){ return LayerImpl.getName(getJSObject()); }
/** * Method: getZIndex * * Returns: {Integer} the z-index of this layer */ public Object getZIndex() { return LayerImpl.getZIndex(getJSObject()); }
/** * Indicates if Layer is a BaseLayer. * * @return true if the layer is a BaseLayer false if the layer is not a * BaseLayer */ public boolean isBaseLayer() { return LayerImpl.isBaseLayer(getJSObject()); }
/** * @return The name of the Layer, or an empty string if no name was found. */ public String getName() { return LayerImpl.getName(getJSObject()); }
/** * Property: inRange {Boolean} The current map resolution is within the * layer's min/max range. This is set in <OpenLayers.Map.setCenter> whenever * the zoom changes. */ public boolean isInRange() { return LayerImpl.isInRange(getJSObject()); }
/** * Indicates if Layer is a BaseLayer. * * @return true if the layer is a BaseLayer * false if the layer is not a BaseLayer */ public boolean isBaseLayer() { return LayerImpl.isBaseLayer(getJSObject()); }
/** * @param name - the new name for the layer. */ public void setName(String name){ getJSObject().setProperty("name", name); }
/** * Indicates if the Layer should be displayed in the LayerSwitcher Control. * * @return true if the layer should be displayed in the LayerSwitcher * Control, false if the layer should be hidden */ public boolean displayInLayerSwitcher() { return LayerImpl.displayInLayerSwitcher(getJSObject()); }
/** * APIMethod: calculateInRange * * Returns: {Boolean} The layer is displayable at the current map's current * resolution. Note that if 'alwaysInRange' is true for the layer, this * function will always return true. */ public boolean calculateInRange() { return LayerImpl.calculateInRange(getJSObject()); }
/** * Get the minimum zoomlevel for this layer. * * @return minimum zoomlevel */ public int getMinZoomLevel() { return (int) this.getJSObject().getPropertyAsDouble("zoomOffset"); }
/** * Get all scales for the layer. * * @return scales */ public double[] getScales() { return getDoubleArray(LayerImpl.getScales(this.getJSObject())); }
public void addLayer(Layer layer) { MapImpl.addLayer(getJSObject(), layer.getJSObject()); }
/** * Method: setLayerZIndex * * Parameters: layer - {<OpenLayers.Layer>} zIdx - {int} */ public void setLayerZIndex(Layer layer, int zIdx) { MapImpl.setLayerZIndex(getJSObject(), layer.getJSObject(), zIdx); }
public double getResolutionForZoom(double zoom) { double result = -1; if (this.isBaseLayer()) { result = LayerImpl.getResolutionForZoom(getJSObject(), zoom); } return result; }
/** * Get all resolutions for the layer. * @return resolutions A list of map resolutions (map units per pixel) in descending order. If this is not set in the * layer constructor, it will be set based on other resolution related properties (maxExtent, maxResolution, * maxScale, etc.). */ public double[] getResolutions() { return getDoubleArray(LayerImpl.getResolutions(this.getJSObject())); }
/** * Get the maximum zoomlevel for this layer. * * @return maximum zoomlevel */ public int getMaxZoomLevel() { return getMinZoomLevel() + LayerImpl.getResolutions(this.getJSObject()).length() - 1; }
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 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()); }