public class OpenStreetMapProvider extends RemoteTileProviderBase
OpenStreetMap the map service provider.
OpenStreetMapMapProvider provides the ability to get a map service from the OpenStreetMap online service and encapsulates the SuperMap iServer maps .
RemoteTileProviderBase.GetDefaultImageWhenException
TiledMapProviderBase.TileDataConverter, TiledMapProviderBase.TileImageDrawer, TiledMapProviderBase.TileImageParameter
SEND_REQUEST_COUNT
CACHE_DIR, LINK_MARK, lock, logger, message, QUESTION_MARK, REGEX, REPLACEMENT, tilePixHeight, tilePixWidth
Constructor and Description |
---|
OpenStreetMapProvider()
Default constructor
|
OpenStreetMapProvider(OpenStreetMapProviderSetting setting)
Constructors with parameters
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
cacheEnabled() |
protected int |
getLevel(double resolution)
According to the resolution to get the level
|
protected Point2D |
getOrigin(java.lang.String mapName)
Gets the geographic coordinates of the upper left corner of the map.
|
OutputFormat[] |
getSupportImageFormat(java.lang.String mapName)
Gets an array of supported image formats.
|
double[] |
getSupportResolutions(java.lang.String mapName)
Returns the resolution of the current service support.
|
protected java.lang.String |
getTileImageUrl(TiledMapProviderBase.TileImageParameter tileParam) |
protected java.util.Map<java.lang.String,MapParameter> |
initDefaultMapParameter()
Initializes the default map state, the return value is a map, the key is the map name, and the value is the map parameter object.
|
protected boolean |
initLODInfos()
Initializes tile information.
|
protected java.util.List<java.lang.String> |
initSupportedMapNames()
Initialize the list of supported maps.
|
protected boolean |
isResolutionEquals(double resolution1, double resolution2)
Determines if two resolutions are within the tolerance (1.0E-6)
|
dispose, generateBigImage, getContent, getContent, getContent, getImageBySendURL, getImageBySendURL, getTileImage, init, sendRequestByHttpURLConnection, sendRequestByHttpURLConnection, viewEntire
checkSetting, clearCache, fillWatermark, findNearest, getDefaultMapParameter, getDefaultMapParameters, getMapImage, getMapParameter, getMapProviderSetting, getNames, getOverview, getProximalResolution, getProximalResolution, getResolutoinByScale, getResource, getResource, getTileDataConverter, getVectorStyle, measureArea, measureDistance, outputImage, outputImage, outputImageToFile, outputImageToFile, queryByBounds, queryByDistance, queryByGeometry, queryBySQL, rectifyMapParameter, setDefaultMapParameter, setDefaultMapParameters, setMapProviderSetting, setProviderContext, support, updateMap
public OpenStreetMapProvider(OpenStreetMapProviderSetting setting)
Constructors with parameters
setting
- Map service provider configurationpublic OpenStreetMapProvider()
Default constructor
protected java.util.List<java.lang.String> initSupportedMapNames()
initSupportedMapNames
in class TiledMapProviderBase
protected java.util.Map<java.lang.String,MapParameter> initDefaultMapParameter()
Initializes the default map state, the return value is a map, the key is the map name, and the value is the map parameter object.
initDefaultMapParameter
in class TiledMapProviderBase
protected Point2D getOrigin(java.lang.String mapName)
Gets the geographic coordinates of the upper left corner of the map.
getOrigin
in class TiledMapProviderBase
mapName
- Map namepublic double[] getSupportResolutions(java.lang.String mapName)
Returns the resolution of the current service support. If all resolutions are supported, an empty space is returned.
getSupportResolutions
in class TiledMapProviderBase
mapName
- Map nameprotected boolean isResolutionEquals(double resolution1, double resolution2)
TiledMapProviderBase
Determines if two resolutions are within the tolerance (1.0E-6)
isResolutionEquals
in class TiledMapProviderBase
resolution1
- Resolution1resolution1
- Resolution2resolution2
- doubleprotected int getLevel(double resolution)
According to the resolution to get the level
resolution
- Resolutionprotected boolean initLODInfos()
Initializes tile information.
public OutputFormat[] getSupportImageFormat(java.lang.String mapName)
Gets an array of supported image formats.
getSupportImageFormat
in class TiledMapProviderBase
mapName
- Map nameprotected java.lang.String getTileImageUrl(TiledMapProviderBase.TileImageParameter tileParam)
getTileImageUrl
in class RemoteTileProviderBase
protected boolean cacheEnabled()
cacheEnabled
in class TiledMapProviderBase