GetCapabilities
, GetMap
,
and GetFeatureInfo
) in support of the creation
and display of registered and superimposed map-like views of information
that come simultaneously from multiple remote and heterogeneous sources.
For more information about the OpenGIS standard, see http://www.opengeospatial.org/.IlvWMSReader
instance
from a server URL. A WMS server URL can be the full http WMS request
for capabilities, or at least the WMS request URL for this server.
This information is dependent on the server itself and is usually
available in the server's documentation. For instance :URL url = new URL("http://wms.jpl.nasa.gov/wms.cgi?request=GetCapabilities"); // "http://wms.jpl.nasa.gov/wms.cgi" will work as well IlvWMSReader reader = new IlvWMSReader(url);
String[] layers = reader.getAvailableLayers(); reader.setLayerNames(new String[]{layers[0]});
IlvCoordinateSystem cs = IlvCoordinateSystemProperty. GetCoordinateSystem(manager); reader.setTransformation(IlvCoordinateTransformation.CreateTransformation (cs, IlvGeographicCoordinateSystem.KERNEL));
IlvMapFeature feature = reader.getNextFeature(); IlvFeatureRenderer renderer = reader.getDefaultFeatureRenderer(); while(feature != null) { // Render the map feature into a graphic object. IlvGraphic graphic = renderer.makeGraphic(feature,null); // Add this object to the first layer of the manager. manager.addObject(graphic, 0, false); feature = reader.getNextFeature(); }
IlvWMSDataSource
instance
from a server URL. A WMS server URL can be the full http WMS request
for capabilities, or at least the WMS request URL for this server.
This information is dependent on the server itself and is usually
available in the server's documentation. For instance:URL url = new URL("http://wms.jpl.nasa.gov/wms.cgi?request=GetCapabilities"); // "http://wms.jpl.nasa.gov/wms.cgi" will work as well IlvWMSDataSource source = new IlvWMSDataSource(url);
IlvWMSReader reader = source.getReader(); String[] layers = reader.getAvailableLayers(); source.setLayers(new String[]{layers[0]});
source.setTilingParameters(true,5,5);
source.setManager(manager);
source.start();