com.esri.adf.web.wms.util
Class WMSUtil

java.lang.Object
  extended by com.esri.adf.web.wms.util.WMSUtil

public class WMSUtil
extends Object

This class contains the utility methods that are specific to WMS Resource in ADF.


Method Summary
static com.esri.wms.client.Envelope findEnvelope(String resourceName, com.esri.wms.client.Map map, int wkid)
          Returns the envelope based on the specified spatial reference id.
static String getImageFormat(List<String> availableWMSFormats, String format)
          Deprecated. Please use WMSMapResource.getImageFormat(String) instead.
static com.esri.wms.client.SpatialReference getWMSSpatialReference(List<com.esri.wms.client.SpatialReference> srs, int id)
          Convenient method to return the SpatialReference object based on the specified spatial reference id from the available list spatial reference's.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getImageFormat

@Deprecated
public static String getImageFormat(List<String> availableWMSFormats,
                                               String format)
Deprecated. Please use WMSMapResource.getImageFormat(String) instead.

Convenient method to return the WMS Service specific map image format from the available list of WMS Service supported formats.
 For example,
 if the WMS Service supported formats are,
   image/bmp, image/jpeg, image/tiff, image/png, image/gif and image/svg+xml
 
 then specifying "PNG" will return "image/png"
 Also, unless implicitly declared by server, otherwise "PNG8", "PNG24", "PNG32" will 
 be treated as "image/png"
 
 For example,
 - if the WMS server supports image/png32,
 specifying "PNG32" will return "image/png32"
 
 - if the WMS server supports image/png,
 specifying "PNG32" will return "image/png"
 

Parameters:
availableWMSFormats - the list of supported WMS Service map image formats
format - the user defined format
Returns:
the WMS service specific map image format
See Also:
WMSMapResource.getWmsServerConnection(), ServerConnection.getMapFormats()

getWMSSpatialReference

public static com.esri.wms.client.SpatialReference getWMSSpatialReference(List<com.esri.wms.client.SpatialReference> srs,
                                                                          int id)
Convenient method to return the SpatialReference object based on the specified spatial reference id from the available list spatial reference's.

Parameters:
srs - the list of available spatial reference's
id - the spatial reference id
Returns:
the SpatialReference object

findEnvelope

public static com.esri.wms.client.Envelope findEnvelope(String resourceName,
                                                        com.esri.wms.client.Map map,
                                                        int wkid)
Returns the envelope based on the specified spatial reference id.

Parameters:
resourceName - the resource name
map - the WMS map object
wkid - the spatial reference id
Returns:
the envelope based on the specified spatial reference id