public class MapImpl extends java.lang.Object implements Map, Tileable, Disposable, ComponentContextAware
地图服务组件接口的实现类。
地图服务组件是一类 GIS 服务组件,封装了与地图相关的 GIS 功能,该类实现了该接口。
地图服务组件所使用的服务提供者类型必须是地图服务提供者(MapProvider
)。
使用 SuperMap 数据构建地图服务组件的示例代码如下:
public MapImpl getMapComponent() { // 初始化SuperMap 地图服务提供者设置。 UGCMapProviderSetting ugcPSetting = new UGCMapProviderSetting(); // SuperMap 工作空间路径。 ugcPSetting.setWorkspacePath("C:\\SuperMap\\World\\World.sxwu"); // 地图服务提供者的地图图片的输出路径。 ugcPSetting.setOutputPath(".\\output1"); // 地图服务提供者的地图图片发布站点。 ugcPSetting.setOutputSite("http://localhost"); ugcPSetting.setName("default"); // 地图服务提供者集合,用于初始化地图服务组件上下文。 List<MapProviderSetting> ugcPSettings = new ArrayList<MapProviderSetting>(); ugcPSettings.add(ugcPSetting); // 地图服务组件的配置信息,用于初始化地图服务组件上下文。 MapConfig config = new MapConfig(); // 地图服务组件的地图图片的输出路径。 config.setOutputPath(".\\output"); // 地图服务组件的地图图片发布站点。 config.setOutputSite("http://localhost/output"); // 初始化地图服务组件上下文。 MapContext mapContext = new MapContext(); mapContext.setMapProviderSettings(ugcPSettings); mapContext.setConfig(config); // 创建地图服务组件。 MapImpl mapc = new MapImpl(mapContext); return mapc; }
Component
限定符和类型 | 字段和说明 |
---|---|
protected static java.lang.String |
PROVIDER_FACTORY
提供者(Provider)工厂对象关键字。
|
构造器和说明 |
---|
MapImpl()
默认构造函数。
|
MapImpl(MapContext mapContext)
构造一个带指定的地图服务组件上下文信息的 MapImpl 对象。
|
限定符和类型 | 方法和说明 |
---|---|
void |
clearCache(Rectangle2D bounds)
清除指定地图范围内的缓存。
|
void |
clearCache(Rectangle2D bounds, MapParameter mapParameter, ImageOutputOption outputOption)
根据指定地图范围、地图参数和图片输出设置清除对应范围的缓存。
|
void |
dispose()
释放该地图服务组件所占用的资源。
|
void |
dispose(boolean disposeProvidersInContext) |
QueryResult |
findNearest(Geometry geometry, double maxDistance, QueryParameterSet queryParameterSet, java.lang.String mapName)
在指定地图上,查找距离指定几何对象一定容限内的几何对象。
|
java.util.List<ChartFeatureInfoSpec> |
getChartFeatureInfoSpecs(java.lang.String mapName)
海图功能用,获取海图所有物标类型。
|
MapParameter |
getDefaultMapParameter(java.lang.String mapName)
获取默认地图参数。
|
MapParameter |
getDefaultMapParameterNoCache(MapProvider mapProvider, java.lang.String mapName) |
java.util.List<PrjCoordSys> |
getDynamicPrjCoordsyses(java.lang.String mapName) |
MapImage |
getMapImage(MapParameter mapParameter, ImageOutputOption outputOption)
根据地图参数、图片输出设置获取地图图片。
|
java.util.List<java.lang.String> |
getMapNames()
获取地图名称列表。
|
MapParameter |
getMapParameter(java.lang.String mapName)
获取指定地图的参数。
|
Overview |
getOverview(MapParameter mapParameter, ImageOutputOption outputOption)
根据地图参数以及图片输出设置获取鹰眼。
|
protected MapProvider |
getProvider(java.lang.String name)
获取指定地图对应的地图服务提供者(MapProvider)。
|
protected MapProvider |
getQueryProvider(java.lang.String name)
获取查询功能需要的地图服务提供者。
|
java.lang.String |
getResource(ResourceParameter resourceParameter)
根据资源图片参数获取资源图片。
|
byte[] |
getResource(ResourceParameter resourceParameter, Point2D[] points)
根据资源图片参数获取资源图片。
|
byte[] |
getResource(java.lang.String mapName, java.lang.String symbolId, OutputFormat format)
根据资源图片参数获取资源图片。
|
TilesetInfo[] |
getTilesetInfos(java.lang.String mapName)
返回指定地图对应的所有切片集
|
MapImage |
getTrackingLayerImage(MapParameter mapParameter, ImageOutputOption outputOption)
根据地图参数、图片输出设置获取 TrackingLayer 的图片。
|
UTFGridResult |
getUTFGrid(UTFGridParameter gridParameter)
根据地理范围从指定图层中提取UTFGrid对象。
|
VectorStyle |
getVectorStyle(java.lang.String mapName, java.lang.String[] layerNames, VectorStyleType type)
获取指定地图中,指定矢量图层的样式
|
VectorTileData |
getVectorTile(VectorTileParameter vectorTileParameter)
获取矢量地图切片。
|
MeasureResult |
measureArea(java.lang.String mapName, Point2D[] points, MeasureParameter measureParameter)
根据地图名称、二维地理坐标点、量算参数进行面积量算。
|
MeasureResult |
measureDistance(java.lang.String mapName, Point2D[] points, MeasureParameter measureParameter)
根据地图名称、二维地理坐标点、量算参数进行距离量算。
|
MapImage |
pan(double offsetX, double offsetY, MapParameter mapParameter, ImageOutputOption outputOption)
地图平移。
|
QueryResult |
queryByBounds(java.lang.String mapName, Rectangle2D bounds, QueryParameterSet queryParameterSet)
在指定的地图上,查询指定范围内的几何对象。
|
QueryResult |
queryByDistance(java.lang.String mapName, Geometry geometry, double distance, QueryParameterSet queryParameterSet)
在指定的地图上,查询距离指定几何对象一定范围内的所有几何对象。
|
QueryResult |
queryByGeometry(java.lang.String mapName, Geometry geometry, SpatialQueryMode spatialQueryMode, QueryParameterSet queryParameterSet)
在指定的地图上,查询与指定的几何对象符合某种空间关系和查询条件的几何对象。
|
QueryResult |
queryByKeywords(java.lang.String mapName, KeywordsQueryParameterSet queryParameterSet)
根据关键字查询地图上的要素。
|
QueryResult |
queryBySQL(java.lang.String mapName, QueryParameterSet queryParameterSet)
在指定的地图上,执行 SQL 查询。
|
QueryResult |
queryChart(java.lang.String mapName, java.lang.String[] chartLayerNames, ChartQueryParameterSet chartQueryParams)
海图功能用,物标属性查询。
|
QueryResult |
queryChart(java.lang.String mapName, java.lang.String[] chartLayerNames, ChartQueryParameterSet chartQueryParams, Rectangle2D bounds)
海图功能用,物标boudns查询
|
void |
setComponentContext(ComponentContext context)
设置地图服务组件上下文。
|
protected void |
setComponentContext(ComponentContext context, ImageTileCache<TileSourceInfo> tileCache, UTFGridTileCache<TileSourceInfo> utfGridTileCache, VectorTileCache<TileSourceInfo> vectorTileCache) |
MapParameter |
setDefaultMapParameter(MapParameter mapParameter)
设置默认地图参数。
|
boolean |
support(java.lang.String mapName, MapCapability capability)
判断地图是否支持相应功能。
|
void |
updateVectorStyle(java.lang.String mapName, java.lang.String layerName, VectorStyleType type, java.lang.String style)
更新指定地图中,指定矢量图层的样式
|
void |
useCachedDefaultMapParams(boolean use) |
MapImage |
viewByBounds(Rectangle2D bounds, MapParameter mapParameter, ImageOutputOption outputOption)
根据地理坐标范围显示地图。
|
MapImage |
viewByScale(Point2D center, double scale, MapParameter mapParameter, ImageOutputOption outputOption)
根据指定的中心点和比例尺等参数显示地图。
|
MapImage |
viewEntire(MapParameter mapParameter, ImageOutputOption outputOption)
根据地图参数以及图片输出设置进行全幅显示。
|
MapImage |
viewEntire(java.lang.String layerName, MapParameter mapParameter, ImageOutputOption outputOption)
根据地图图层名、地图参数以及图片输出设置进行全幅显示。
|
MapImage |
zoom(Point2D center, double ratio, MapParameter mapParameter, ImageOutputOption outputOption)
根据指定的中心点、缩放比例、地图参数和图片输出设置进行地图缩放。
|
protected static final java.lang.String PROVIDER_FACTORY
提供者(Provider)工厂对象关键字。 默认为“MapProviderFactory”。
public MapImpl(MapContext mapContext)
构造一个带指定的地图服务组件上下文信息的 MapImpl 对象。
mapContext
- 地图服务组件的上下文信息。该参数不能为空。public MapImpl()
默认构造函数。
public void useCachedDefaultMapParams(boolean use)
public void clearCache(Rectangle2D bounds) throws MapException
清除指定地图范围内的缓存。
clearCache
在接口中 Map
bounds
- 指定的地图范围。MapException
- 地图服务组件异常信息。public void clearCache(Rectangle2D bounds, MapParameter mapParameter, ImageOutputOption outputOption) throws MapException
根据指定地图范围、地图参数和图片输出设置清除对应范围的缓存。
clearCache
在接口中 Map
bounds
- 指定的地图范围。mapParameter
- 地图参数。outputOption
- 图片输出设置。MapException
- 地图服务组件异常信息。public java.util.List<java.lang.String> getMapNames()
获取地图名称列表。
getMapNames
在接口中 Map
getMapNames
在接口中 Tileable
public MapParameter getMapParameter(java.lang.String mapName) throws MapException
获取指定地图的参数。
getMapParameter
在接口中 Map
mapName
- 地图名称。MapException
- 地图服务组件异常信息。当名称为 mapName 的地图不存在时,抛出该异常。public MapImage getMapImage(MapParameter mapParameter, ImageOutputOption outputOption) throws MapException
根据地图参数、图片输出设置获取地图图片。
getMapImage
在接口中 Map
mapParameter
- 地图参数。outputOption
- 图片输出设置。MapException
- 地图服务组件异常信息。当名称为 mapParameter.name
的地图不存在时,抛出该异常。public byte[] getResource(java.lang.String mapName, java.lang.String symbolId, OutputFormat format) throws MapException
Map
getResource
在接口中 Map
symbolId
- 符号idformat
- 符号的格式MapException
- 地图服务组件异常信息。public java.lang.String getResource(ResourceParameter resourceParameter) throws MapException
根据资源图片参数获取资源图片。
getResource
在接口中 Map
resourceParameter
- 资源图片参数。MapException
- 地图服务组件异常信息。当前地图名列表大小小于0时,抛出该异常。java.lang.IllegalArgumentException
- 当参数 resourceParameter 为空时,抛出该异常。public byte[] getResource(ResourceParameter resourceParameter, Point2D[] points) throws MapException
Map
getResource
在接口中 Map
resourceParameter
- 资源图片参数,如生成的图片的高度、宽度、类型,资源的类型、风格等。points
- 绘制资源图片时用的点MapException
- 地图服务组件异常信息。public MeasureResult measureDistance(java.lang.String mapName, Point2D[] points, MeasureParameter measureParameter) throws MapException
根据地图名称、二维地理坐标点、量算参数进行距离量算。
measureDistance
在接口中 Map
mapName
- 地图名称。points
- 二维地理坐标点数组。measureParameter
- 量算参数。MapException
- 地图服务组件异常信息。当名称为 mapName 的地图不存在时,抛出该异常。java.lang.IllegalArgumentException
- 当出现以下情况时会抛出 IllegalArgumentException 异常:public MeasureResult measureArea(java.lang.String mapName, Point2D[] points, MeasureParameter measureParameter) throws MapException
根据地图名称、二维地理坐标点、量算参数进行面积量算。
measureArea
在接口中 Map
mapName
- 地图名称。points
- 二维地理坐标点数组。measureParameter
- 量算参数。MapException
- 地图服务组件异常信息。当名称为 mapName 的地图不存在时,抛出该异常。java.lang.IllegalArgumentException
- 当出现以下情况时会抛出 IllegalArgumentException 异常:public QueryResult queryByDistance(java.lang.String mapName, Geometry geometry, double distance, QueryParameterSet queryParameterSet) throws MapException
在指定的地图上,查询距离指定几何对象一定范围内的所有几何对象。 当限制了返回几何对象个数(由QueryParameterSet.expectCount
指定)时,查询结果为查询总记录中随机抽取的 expectCount 个对象。
到指定几何对象的一定距离范围,实际是以指定几何对象为中心的一个圆,在这个圆内以及与圆相交的几何对象都能够被查询出来。
本查询的示例如下,其中地图服务组件初始化请参见地图组件初始化示例。
public QueryResult queryByDistanceSample() throws MapException { // 初始化地图服务组件,参见地图服务组件的初始化。 MapImpl mapc = getMapComponent(); // 属性查询参数集合。 QueryParameterSet queryParameters = new QueryParameterSet(); QueryParameter[] queryLayerParams = new QueryParameter[1]; queryLayerParams[0] = new QueryParameter(); queryLayerParams[0].name = "Countries@World"; // 属性过滤条件,这里设为空。 queryLayerParams[0].attributeFilter = ""; // 返回的属性字段名称(不区分大小写)。 queryLayerParams[0].fields = new String[] { "Country", "Capital" }; queryParameters.queryParams = queryLayerParams; // 设置查询结果只包含属性信息。 queryParameters.queryOption = QueryOption.ATTRIBUTE; // 创建缓冲区查询的参照几何对象,这里为一个三角形的面状对象。 Point2D p1 = new Point2D(101.0, 26.0); Point2D p2 = new Point2D(97.0, 21.0); Point2D p3 = new Point2D(103.0, 16.0); Point2D[] point2ds = { p1, p2, p3 }; Geometry geometry = Geometry.fromPoint2Ds(point2ds, GeometryType.REGION); // 查询在“世界地图”地图的“Countries@World”图层中,距离指定几何对象为0.5范围内所有的要素。 QueryResult queryResult = mapc.queryByDistance("世界地图", geometry, 0.5, queryParameters); mapc.dispose(); return queryResult; }
queryByDistance
在接口中 Map
mapName
- 地图名称。geometry
- 几何对象。distance
- 查询的距离范围,单位同当前地图对应的数据集坐标单位(coordUnit)。queryParameterSet
- 查询参数集。可对某个地图的多个图层进行查询,单个图层的查询参数在queryParameterSet.queryParams[i]
中进行设置。MapException
- 地图服务组件异常信息。当名称为 mapName 的地图不存在时,抛出该异常。java.lang.IllegalArgumentException
- 当出现以下情况时会抛出 IllegalArgumentException 异常:queryParameterSet.queryParams
为空,或该数组长度等于0。public QueryResult queryByGeometry(java.lang.String mapName, Geometry geometry, SpatialQueryMode spatialQueryMode, QueryParameterSet queryParameterSet) throws MapException
在指定的地图上,查询与指定的几何对象符合某种空间关系和查询条件的几何对象。
queryByGeometry
在接口中 Map
mapName
- 地图名称。geometry
- 几何对象。spatialQueryMode
- 空间几何对象间的查询模式。空间几何对象间的查询模式定义了一些几何对象之间的空间位置关系,根据这些空间关系来构建过滤条件执行查询。例如:查询可被包含在面对象中的空间对象,与面有相离或者相邻关系的空间对象等。queryParameterSet
- 查询参数集。可对某个地图的多个图层进行查询,单个图层的查询参数在 queryParameterSet.queryParams[i]
中进行设置。MapException
- 地图服务组件异常信息。queryParameters.queryParams
数组长度等于0。java.lang.IllegalArgumentException
- 当出现以下情况时会抛出 IllegalArgumentException 异常:queryParameterSet.queryParams
为空。public QueryResult queryBySQL(java.lang.String mapName, QueryParameterSet queryParameterSet) throws MapException
在指定的地图上,执行 SQL 查询。
queryBySQL
在接口中 Map
mapName
- 地图名称。queryParameterSet
- 查询参数集。可对某个地图的多个图层进行查询,单个图层的查询参数在 queryParameterSet.queryParams[i]
中进行设置。MapException
- 地图服务组件异常信息。名称为 mapName 的地图不存在时,抛出该异常。java.lang.IllegalArgumentException
- 当出现以下情况时会抛出 IllegalArgumentException 异常:queryParameterSet.queryParams
为空,或该数组长度等于0。public QueryResult queryByBounds(java.lang.String mapName, Rectangle2D bounds, QueryParameterSet queryParameterSet) throws MapException
在指定的地图上,查询指定范围内的几何对象。
queryByBounds
在接口中 Map
mapName
- 地图名称。bounds
- 指定的查询范围。queryParameterSet
- 查询参数集。可对某个地图的多个图层进行查询,单个图层的查询参数在queryParameters.queryParams[i]
中进行设置。MapException
- 地图服务组件异常信息。当名称为 mapName 的地图不存在时,抛出该异常。java.lang.IllegalArgumentException
- 当出现以下情况时会抛出 IllegalArgumentException 异常:queryParameterSet.queryParams
为空,或该数组长度等于0。public MapParameter setDefaultMapParameter(MapParameter mapParameter) throws MapException
设置默认地图参数。
setDefaultMapParameter
在接口中 Map
mapParameter
- 地图参数。MapException
- 地图服务组件异常信息。当名称为 mapParameter.mapName
的地图不存在时,抛出该异常。java.lang.IllegalArgumentException
- 当参数 mapParameter 为空时,会抛出该异常。public MapParameter getDefaultMapParameter(java.lang.String mapName) throws MapException
获取默认地图参数。
初始的默认地图参数是由所访问的服务类型决定的,比如,访问 SuperMap Objects Java 提供的 GIS 能力,那么初始默认地图参数从工作空间文件中获取到;访问 WMS 服务提供的 GIS 能力,默认地图参数由 WMS 服务决定。
getDefaultMapParameter
在接口中 Map
mapName
- 地图名称。MapException
- 地图服务组件异常信息。当名称为 mapName 的地图不存在时,抛出该异常。public MapImage pan(double offsetX, double offsetY, MapParameter mapParameter, ImageOutputOption outputOption) throws MapException
地图平移。
pan
在接口中 Map
offsetX
- 在横坐标方向的地理坐标偏移量。offsetY
- 在纵坐标方向的地理坐标偏移量。mapParameter
- 地图参数。outputOption
- 图片输出设置。MapException
- 地图服务组件异常信息。public MapImage viewByBounds(Rectangle2D bounds, MapParameter mapParameter, ImageOutputOption outputOption) throws MapException
根据地理坐标范围显示地图。
viewByBounds
在接口中 Map
bounds
- 地理坐标范围。mapParameter
- 地图参数。outputOption
- 图片输出设置。MapException
- 地图服务组件异常信息。java.lang.IllegalArgumentException
- 当出现以下情况时会抛出 IllegalArgumentException 异常:public MapImage viewByScale(Point2D center, double scale, MapParameter mapParameter, ImageOutputOption outputOption) throws MapException
根据指定的中心点和比例尺等参数显示地图。
示例如下,其中地图服务组件初始化请参见地图组件初始化示例。
public MapImage viewByScaleSample() throws MapException { // 初始化地图服务组件,参见地图服务组件的初始化。 MapImpl mapc = getMapComponent(); // 中心点坐标。 Point2D center = new Point2D(101.0, 26.0); // 出图的比例尺。 double scale = 0.00000003; // 地图参数,这里使用“世界地图”默认的地图参数。 MapParameter mapParameter = mapc.getDefaultMapParameter("世界地图"); // 图片输出设置,这里设置图片输出格式是PNG。 ImageOutputOption outputOption = new ImageOutputOption(); outputOption.format = OutputFormat.PNG; MapImage mapImage = mapc.viewByScale(center, scale, mapParameter, outputOption); // 释放地图组件占用的资源 mapc.dispose(); return mapImage; }
viewByScale
在接口中 Map
center
- 中心点。scale
- 比例尺。mapParameter
- 地图参数。outputOption
- 图片输出设置。MapException
- 地图服务组件异常信息。当名称为 mapParameter.name
的地图不存在时,抛出该异常。java.lang.IllegalArgumentException
- 当出现以下情况时会抛出 IllegalArgumentException 异常:public MapImage zoom(Point2D center, double ratio, MapParameter mapParameter, ImageOutputOption outputOption) throws MapException
根据指定的中心点、缩放比例、地图参数和图片输出设置进行地图缩放。
zoom
在接口中 Map
center
- 中心点。ratio
- 缩放比例。mapParameter
- 地图参数。outputOption
- 图片输出设置。MapException
- 地图服务组件异常信息。当名称为 mapParameter.name
的地图不存在时,抛出该异常。java.lang.IllegalArgumentException
- 当出现以下情况时会抛出 IllegalArgumentException 异常:public MapImage viewEntire(MapParameter mapParameter, ImageOutputOption outputOption) throws MapException
根据地图参数以及图片输出设置进行全幅显示。
viewEntire
在接口中 Map
mapParameter
- 地图参数。outputOption
- 图片输出设置。MapException
- 地图服务组件异常信息。当名称为 mapParameter.mapName
的地图不存在时,抛出该异常。java.lang.IllegalArgumentException
- 当出现以下情况时会抛出 IllegalArgumentException 异常:public MapImage getTrackingLayerImage(MapParameter mapParameter, ImageOutputOption outputOption) throws MapException
根据地图参数、图片输出设置获取 TrackingLayer 的图片。
getTrackingLayerImage
在接口中 Map
mapParameter
- 地图参数。outputOption
- 图片输出设置。MapException
- 地图服务组件异常信息。当名称为 mapParameter.name
的地图不存在时,抛出该异常。java.lang.IllegalArgumentException
- 当出现以下情况时会抛出 IllegalArgumentException 异常:public QueryResult findNearest(Geometry geometry, double maxDistance, QueryParameterSet queryParameterSet, java.lang.String mapName) throws MapException
在指定地图上,查找距离指定几何对象一定容限内的几何对象。 当限制了返回几何对象个数(由QueryParameterSet.expectCount
指定)时,查询结果为查询总记录中距离指定中心最近的expectCount个地物,这expectCount个地物按无序排列。
findNearest
在接口中 Map
geometry
- 几何对象。maxDistance
- 容限范围,单位同当前地图对应的数据集坐标单位(coordUnit)。queryParameterSet
- 查询参数集。可对某个地图的多个图层进行查询,单个图层的查询参数在 queryParameterSet.queryParams[i]
中进行设置。mapName
- 地图名称。MapException
- 地图服务组件异常信息。名称为 mapName 的地图不存在时,抛出该异常。java.lang.IllegalArgumentException
- 当出现以下情况时会抛出 IllegalArgumentException 异常:queryParameterSet.queryParams
为空,或数组长度为0。public MapImage viewEntire(java.lang.String layerName, MapParameter mapParameter, ImageOutputOption outputOption) throws MapException
根据地图图层名、地图参数以及图片输出设置进行全幅显示。
参数中指定的图层名称是指以该图层内容的最小外接矩形作为全幅显示的地理范围。
viewEntire
在接口中 Map
layerName
- 地图图层名,即以该图层的最小外接矩形作为全幅显示的地理范围。mapParameter
- 地图参数。outputOption
- 图片输出设置。MapException
- 地图服务组件异常信息。当名称为 mapParameter.name
的地图不存在时,抛出该异常。java.lang.IllegalArgumentException
- 当出现以下情况时会抛出 IllegalArgumentException 异常:public Overview getOverview(MapParameter mapParameter, ImageOutputOption outputOption) throws MapException
根据地图参数以及图片输出设置获取鹰眼。
getOverview
在接口中 Map
mapParameter
- 地图参数。outputOption
- 图片输出设置。MapException
- 地图服务组件异常信息。当名称为 mapParameter.name
的地图不存在时,抛出该异常。java.lang.IllegalArgumentException
- 当出现以下情况时会抛出 IllegalArgumentException 异常:public java.util.List<PrjCoordSys> getDynamicPrjCoordsyses(java.lang.String mapName) throws MapException
getDynamicPrjCoordsyses
在接口中 Map
MapException
public java.util.List<ChartFeatureInfoSpec> getChartFeatureInfoSpecs(java.lang.String mapName) throws MapException
getChartFeatureInfoSpecs
在接口中 Map
MapException
public QueryResult queryChart(java.lang.String mapName, java.lang.String[] chartLayerNames, ChartQueryParameterSet chartQueryParams) throws MapException
queryChart
在接口中 Map
MapException
public QueryResult queryChart(java.lang.String mapName, java.lang.String[] chartLayerNames, ChartQueryParameterSet chartQueryParams, Rectangle2D bounds) throws MapException
queryChart
在接口中 Map
MapException
public UTFGridResult getUTFGrid(UTFGridParameter gridParameter) throws MapException
getUTFGrid
在接口中 Map
gridParameter
- UTFGrid请求参数对象。MapException
- 异常信息。public MapParameter getDefaultMapParameterNoCache(MapProvider mapProvider, java.lang.String mapName) throws MapException
MapException
public void dispose()
释放该地图服务组件所占用的资源。
dispose
在接口中 Disposable
public void dispose(boolean disposeProvidersInContext)
public void setComponentContext(ComponentContext context)
设置地图服务组件上下文。
setComponentContext
在接口中 ComponentContextAware
context
- 地图服务组件上下文。protected void setComponentContext(ComponentContext context, ImageTileCache<TileSourceInfo> tileCache, UTFGridTileCache<TileSourceInfo> utfGridTileCache, VectorTileCache<TileSourceInfo> vectorTileCache)
public TilesetInfo[] getTilesetInfos(java.lang.String mapName)
返回指定地图对应的所有切片集
getTilesetInfos
在接口中 Tileable
mapName
-protected MapProvider getProvider(java.lang.String name)
获取指定地图对应的地图服务提供者(MapProvider)。
name
- 地图名称。该参数不能为空。protected MapProvider getQueryProvider(java.lang.String name)
获取查询功能需要的地图服务提供者。
name
- 地图名称public VectorTileData getVectorTile(VectorTileParameter vectorTileParameter) throws MapException
Map
获取矢量地图切片。
getVectorTile
在接口中 Map
vectorTileParameter
- 矢量地图切片参数。MapException
public boolean support(java.lang.String mapName, MapCapability capability)
Map
public QueryResult queryByKeywords(java.lang.String mapName, KeywordsQueryParameterSet queryParameterSet) throws MapException
Map
queryByKeywords
在接口中 Map
mapName
- 地图名。queryParameterSet
- 查询参数集合。MapException
public VectorStyle getVectorStyle(java.lang.String mapName, java.lang.String[] layerNames, VectorStyleType type) throws MapException
Map
getVectorStyle
在接口中 Map
mapName
- 地图名称layerNames
- 图层名称type
- 矢量样式类型MapException
public void updateVectorStyle(java.lang.String mapName, java.lang.String layerName, VectorStyleType type, java.lang.String style)
Map
updateVectorStyle
在接口中 Map
mapName
- 地图名称type
- 矢量样式类型