/** * From the OpenLayers examples: The 'resize' effect * resamples the current tile and displays it stretched * or compressed until the new tile is available. * * @deprecated - use setTransitionEffect(TransitionEffect) instead of this * convenience method. */ public void setTransitionEffectResize(){ setTransitionEffect("resize"); }
/** * Set a non-default projection. Default projection is EPSG:4326. * * @param epsgCode - the EPSG code for the coordinate reference system */ @Override public void setProjection(String epsgCode) { getJSObject().setProperty("projection", epsgCode); }
/** * Sets singleTile option to true. */ public void setUntiled() { setSingleTile(true); }
private WMS initializeWMSLayer(String url) { PropertiesManager properties = getPropertiesManager(); defaultMapOptions.setProjection(DISPLAY_PROJECTION); currentMapProjection = DISPLAY_PROJECTION; String format = properties.getParameterAsString("wmsFormat"); String styles = properties.getParameterAsString("wmsStyles"); String layer = properties.getParameterAsString("wmsLayerName"); String bgColor = properties.getParameterAsString("wmsBGColor"); String isTransparent = properties.getParameterAsString("wmsIsTransparent"); WMSParams wmsParameters = new WMSParams(); wmsParameters.setFormat(format); wmsParameters.setLayers(layer); wmsParameters.setStyles(styles); wmsParameters.setIsTransparent(new Boolean(isTransparent)); wmsParameters.getJSObject().setProperty("BGCOLOR", bgColor); WMSOptions wmsOptions = new WMSOptions(); wmsOptions.setProjection(spatialReference); wmsOptions.setDisplayInLayerSwitcher(true); wmsOptions.setIsBaseLayer(true); return new WMS(layer, url, wmsParameters, wmsOptions); }
wmsParams.setStyles(""); WMSOptions wmsLayerParams = new WMSOptions(); wmsLayerParams.setTransitionEffect(TransitionEffect.RESIZE);
public WMSOptions getOptions() { JSObject options = LayerImpl.getOptions(getJSObject()); return new WMSOptions(options); }
/** * Set whether or not to wrap at the international date line. * * @param wrap - true to wrap, false to not wrap */ public void setWrapDateLine(boolean wrap) { getJSObject().setProperty("wrapDateLine", wrap); }
/** * From the OpenLayers examples: The 'resize' effect resamples the current * tile and displays it stretched or compressed until the new tile is * available. * * @deprecated - use setTransitionEffect(TransitionEffect) instead of this * convenience method. */ public void setTransitionEffectResize() { setTransitionEffect("resize"); }
/** * Sets singleTile option to true. */ public void setUntiled(){ setSingleTile(true); }
/** * e.g. "m", "km", ... */ public void setUnits(String units){ getJSObject().setProperty("units", units); }
/** * Set whether or not to wrap at the international date line. * * @param wrap - true to wrap, false to not wrap */ public void setWrapDateLine(boolean wrap) { getJSObject().setProperty("wrapDateLine", wrap); }
/** * For tiled layers the buffer size can be set. * * The default buffer is 2. */ public void setBuffer(int buffer){ getJSObject().setProperty("buffer", buffer); }
/** * Set a non-default projection. Default projection is EPSG:4326. * * @param epsgCode - the EPSG code for the coordinate reference system */ public void setProjection(String epsgCode){ getJSObject().setProperty("projection", epsgCode); }
/** * For tiled layers the buffer size can be set. * * The default buffer is 2. */ @Override public void setBuffer(int buffer) { getJSObject().setProperty("buffer", buffer); }
/** * e.g. "m", "km", ... */ @Override public void setUnits(String units) { getJSObject().setProperty("units", units); }
public void setRatio(int ratio) { getJSObject().setProperty("ratio", ratio); }
public void setReproject(boolean reproject) { getJSObject().setProperty("reproject", reproject); } }
public void setRatio(int ratio){ getJSObject().setProperty("ratio", ratio); }
/** * Set the singleTile property to be true or false. By default singleTile is * set to false. . If true, the map is served as a single tile instead of * separate tiles. * * Why tile or not tile? At www.bostongis.com some guidelines can be found * * Use untiled in the following scenarios: -fairly lightweight (in file * size) geometries that span huge areas -a process constrained WMS server * -you find it annoying that half of your map paints, while the other half * is loading -high-bandwith servers and high-bandwith clients -map images * with embedded scales * * Use tiled in the following scenarios: -have heavy geometries that (in * file size) that span small areas -super fast WMS server or server with * tile caching (built in) -low band-width clients -relatively long pauses * of a completely blank map area that suddenly loads all at once annoys you * (remark: the blank map problem can be solved by setting a transition * effect) * */ public void setSingleTile(boolean b) { getJSObject().setProperty("singleTile", b); }
/** * Set the singleTile property to be true or false. * By default singleTile is set to false. * . * If true, the map is served as a single tile instead of separate tiles. * * Why tile or not tile? * At www.bostongis.com some guidelines can be found * * Use untiled in the following scenarios: * -fairly lightweight (in file size) geometries that span huge areas * -a process constrained WMS server * -you find it annoying that half of your map paints, while the other half is loading * -high-bandwith servers and high-bandwith clients * -map images with embedded scales * * Use tiled in the following scenarios: * -have heavy geometries that (in file size) that span small areas * -super fast WMS server or server with tile caching (built in) * -low band-width clients * -relatively long pauses of a completely blank map area that suddenly loads all at once annoys you * (remark: the blank map problem can be solved by setting a transition effect) * */ public void setSingleTile(boolean b){ getJSObject().setProperty("singleTile", b); }