gov.nasa.worldwind.layers.placename
Class PlaceNameService
java.lang.Object
gov.nasa.worldwind.layers.placename.PlaceNameService
public class PlaceNameService
- extends Object
TILING_SECTOR
public static final Sector TILING_SECTOR
PlaceNameService
public PlaceNameService(String service,
String dataset,
String fileCachePath,
Sector sector,
LatLon tileDelta,
Font font,
boolean versionTag)
- PlaceNameService Constructor
- Parameters:
service
- server hostong placename datadataset
- name of the datasetfileCachePath
- location of cachesector
- sets the masking sector for this service.tileDelta
- tile sizefont
- font for rendering nameversionTag
- dictates if the wfs version tag is added to requests
- Throws:
IllegalArgumentException
- if any parameter is null
createFileCachePathFromTile
public String createFileCachePathFromTile(int row,
int column)
- Parameters:
row
- rowcolumn
- column
- Returns:
- path of the tile in the cache
- Throws:
IllegalArgumentException
- if either row
or column
is less than zero
createServiceURLFromSector
public URL createServiceURLFromSector(Sector sector)
throws MalformedURLException
- Parameters:
sector
- request bounding box
- Returns:
- wfs request url
- Throws:
MalformedURLException
- thrown if error creating the url
IllegalArgumentException
- if Sector
is null
deepCopy
public final PlaceNameService deepCopy()
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
getBackgroundColor
public final Color getBackgroundColor()
getColor
public final Color getColor()
getDataset
public final String getDataset()
getExtent
public final Extent getExtent(DrawContext dc)
- Parameters:
dc
- DrawContext
- Returns:
- extent of current drawcontext
- Throws:
IllegalArgumentException
- if DrawContext
is null
getFileCachePath
public final String getFileCachePath()
getFont
public final Font getFont()
getMaskingSector
public final Sector getMaskingSector()
getMaxDisplayDistance
public final double getMaxDisplayDistance()
getMinDisplayDistance
public final double getMinDisplayDistance()
getService
public final String getService()
getTileDelta
public final LatLon getTileDelta()
getTileNumber
public long getTileNumber(int row,
int column)
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
isAddVersionTag
public boolean isAddVersionTag()
isEnabled
public final boolean isEnabled()
isResourceAbsent
public final boolean isResourceAbsent(long resourceNumber)
markResourceAbsent
public final void markResourceAbsent(long tileNumber)
setAddVersionTag
public void setAddVersionTag(boolean addVersionTag)
setBackgroundColor
public final void setBackgroundColor(Color backgroundColor)
setColor
public final void setColor(Color color)
- Parameters:
color
- color of label
- Throws:
IllegalArgumentException
- if Color
is null
setEnabled
public final void setEnabled(boolean enabled)
setMaxDisplayDistance
public final void setMaxDisplayDistance(double maxDisplayDistance)
- Parameters:
maxDisplayDistance
- maximum distance to display labels for this service
- Throws:
IllegalArgumentException
- if maxDisplayDistance
is less than the current minimum display
distance
setMinDisplayDistance
public final void setMinDisplayDistance(double minDisplayDistance)
- Parameters:
minDisplayDistance
- minimum distance to display labels for this service
- Throws:
IllegalArgumentException
- if minDisplayDistance
is less than the current maximum display
distance
unmarkResourceAbsent
public final void unmarkResourceAbsent(long tileNumber)
validate
public final String validate()
- Determines if this
PlaceNameService
constructor arguments are valid.
- Returns:
- null if valid, otherwise a string message containing a description of why it is invalid.