surfaceImage.setTileFactory(tileFactory); surfaceImage.setLevelSet(levelSet);
surfaceImage.setTileFactory(new WmsTileFactory(wmsLayerConfig)); surfaceImage.setLevelSet(new LevelSet(levelSetConfig));
/** * Specifies this Web Map Service (WMS) layer's configuration. The configuration must specify the following values: * service address, WMS protocol version, layer names, coordinate reference system, sector and resolution. All other * WMS configuration values may be unspecified, in which case a default value is used. * * @param sector the geographic region in which to display the WMS layer * @param metersPerPixel the desired resolution in meters on Earth * @param config the WMS layer configuration values */ public void setConfiguration(Sector sector, double metersPerPixel, WmsLayerConfig config) { if (sector == null) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "WmsLayer", "setConfiguration", "missingSector")); } if (metersPerPixel <= 0) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "WmsLayer", "setConfiguration", "invalidResolution")); } if (config == null) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "WmsLayer", "setConfiguration", "missingConfig")); } double radiansPerPixel = metersPerPixel / WorldWind.WGS84_SEMI_MAJOR_AXIS; LevelSetConfig levelsConfig = new LevelSetConfig(); levelsConfig.sector.set(sector); levelsConfig.numLevels = levelsConfig.numLevelsForResolution(radiansPerPixel); TiledSurfaceImage surfaceImage = (TiledSurfaceImage) this.getRenderable(0); surfaceImage.setLevelSet(new LevelSet(levelsConfig)); surfaceImage.setTileFactory(new WmsTileFactory(config)); }
surfaceImage.setTileFactory(new WmsTileFactory(config));
surfaceImage.setTileFactory(this); surfaceImage.setImageOptions(new ImageOptions(WorldWind.RGB_565)); // reduce memory usage by using a 16-bit configuration with no alpha this.addRenderable(surfaceImage);
surfaceImage.setTileFactory(new GpkgTileFactory(content)); gpkgRenderables.addRenderable(surfaceImage);