public interface ImageCacheHelper
Modifier and Type | Method and Description |
---|---|
void |
clearCache(java.lang.String mapName)
Delete all cached images of the map.
|
void |
clearCache(java.lang.String mapName, java.lang.String cachePath)
Delete all cached images of the map.
|
java.lang.String |
getCacheKey(MapParameter mapParam, ImageOutputOption outputOption)
Get the cache keyword, excluding the range center point and image size and other factors.
|
java.lang.String |
getImageFileName(MapParameter mapParam, ImageOutputOption outputOption)
According to the map parameters and image output settings, get the cache file name.
|
java.lang.String |
getImageURL(MapParameter mapParameter, ImageOutputOption outputOption)
According to the map parameters and image output settings, get the full URL of the cache image.
|
java.lang.String |
getTempImageFileName(MapParameter mapParam, ImageOutputOption outputOption)
According to the map parameters and image output settings, get the cache file name.
|
java.lang.String |
getTempKey(MapParameter mapParam, ImageOutputOption outputOption)
Get the temporary cache keyword, excluding the range center point and image size and other factors.
|
java.lang.String |
pathToUrl(java.lang.String path) |
java.lang.String getImageFileName(MapParameter mapParam, ImageOutputOption outputOption)
According to the map parameters and image output settings, get the cache file name.
Cache file name format: {centerIndex}_{imageCacheKey}.{postfix} (image center point index _ cache picture keyword. Image file format). Default cache image in PNG format.
mapParam
- map parameters.outputOption
- Picture output settings.DefaultUGCCachePolicy#getCenterIndex(MapParameter)
, DefaultUGCCachePolicy#getImageCacheKey(MapParameter,ImageOutputOption)
java.lang.String getTempImageFileName(MapParameter mapParam, ImageOutputOption outputOption)
According to the map parameters and image output settings, get the cache file name.
Note: the method will get different image file name every time it restarts the service; if you want to get a unchanged file name, please use ImageCacheHelperImpl.getCacheKey(MapParameter,ImageOutputOption)
Cache file name format: {centerIndex}_{imageCacheKey}.{postfix} (image center point index _ cache picture keyword. Image file format). Default cache image in PNG format.
mapParam
- map parameters.outputOption
- Picture output settings.DefaultUGCCachePolicy#getCenterIndex(MapParameter)
, DefaultUGCCachePolicy#getImageCacheKey(MapParameter,ImageOutputOption)
java.lang.String getImageURL(MapParameter mapParameter, ImageOutputOption outputOption)
According to the map parameters and image output settings, get the full URL of the cache image.
The full URL format of the cache image is: {outputSite}/{cache}/{mapName}_{picWidth}x{picHeight}/{scaleRatio}/{regionInfo}/{centerIndex}_{imageCacheKey}.{postfix}.
Where:
mapParameter
- map parametersoutputOption
- Picture output settings.java.lang.String getCacheKey(MapParameter mapParam, ImageOutputOption outputOption)
After the service is restarted, the keyword will not change.
mapParam
-outputOption
-java.lang.String getTempKey(MapParameter mapParam, ImageOutputOption outputOption)
After the service is restarted, the keyword will change.
mapParam
-outputOption
-java.lang.String pathToUrl(java.lang.String path)
void clearCache(java.lang.String mapName)
Delete all cached images of the map.
mapName
-void clearCache(java.lang.String mapName, java.lang.String cachePath)
Delete all cached images of the map.
mapName
- Map namecachePath
- Cache directory