public static WMS narrowToWMS(JSObject wms){ return (wms == null)?null: new WMS(wms); }
public int getNumLoadingTiles(){ return WMSImpl.getNumLoadingTiles(this.getJSObject()); }
public WMS createLayer(JSObject jsObject) { return new WMS(jsObject); } };
public int getNumLoadingTiles() { return WMSImpl.getNumLoadingTiles(getJSObject()); }
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); }
public WMSOptions getOptions() { JSObject options = LayerImpl.getOptions(getJSObject()); return new WMSOptions(options); }
wmsLayerParams.setTransitionEffect(TransitionEffect.RESIZE); layer = new WMS("Basic WMS", "http://labs.metacarta.com/wms/vmap0", wmsParams, wmsLayerParams); this.map.addLayer(layer);
public WMSParams getParams() { JSObject params = HTTPRequestLayerImpl.getParams(getJSObject()); return new WMSParams(params); }
/** * Implements the convenience method OpenLayers.Protocol.WFS.fromWMSLayer(). Since * it's really a constructor we'll call it the proper java constructor name * with a layer object. * * The convenience method uses a WMS Layer to populate a bunch of values under * the assumption that the WFS query will be done to the same layer at the server * * @param layer - WMS Layer to get properties from to configure protocol * @param options - WFSProtocolOptions used to configure this protocol * @return WFSProtocol object */ public WFSProtocol(WMS layer, WFSProtocolOptions options) { super(WFSProtocolImpl.create(layer.getJSObject(), options.getJSObject())); }
/** * Implements the convenience method OpenLayers.Protocol.WFS.fromWMSLayer(). * Since it's really a constructor we'll call it the proper java constructor * name with a layer object. * * The convenience method uses a WMS Layer to populate a bunch of values * under the assumption that the WFS query will be done to the same layer at * the server * * @param layer - WMS Layer to get properties from to configure protocol * @param options - WFSProtocolOptions used to configure this protocol * @return WFSProtocol object */ public WFSProtocol(WMS layer, WFSProtocolOptions options) { super(WFSProtocolImpl.create(layer.getJSObject(), options.getJSObject())); }
/** * The layers to query for feature info. * If omitted, all map WMS layers with a url that matches this <url> or * <layerUrls> will be considered. * * @param layers The layers to query */ public void setLayers(WMS[] layers) { JObjectArray jsArray = JObjectArray.narrowToJObjectArray(JSObject.createJSArray()); for (int i = 0; layers != null && i < layers.length; i++) { jsArray.set(i, layers[i].getJSObject()); } getJSObject().setProperty("layers", jsArray.getJSObject()); }