Class: ThemeService

ThemeService

专题图服务类。该类可用于获取专题图的信息。
地图学中将突出而深入地表示一种或几种要素或现象,即集中表示一个主题内容的地图称为专题地图。在 SuperMap 中,专题图是地图图层的符号化显示,即用各种图形渲染风格(大小,颜色,线型,填充等)来图形化地表现专题要素的某方面特征。

new ThemeService(url, options)

Usage
import { ThemeService } from '@supermapgis/iclient-ol';

new ThemeService(url, options);
<script type="text/javascript" src="https://iclient.supermap.io/dist/openlayers/iclient-ol.js"></script>
<script>
  new ol.supermap.ThemeService({paramsNames});
</script>
openlayers/services/ThemeService.js, line 7
Name Type Description
url string

地图服务地址。如 http://{ip}:{port}/iserver/services/map-world/rest/maps/World

options Object

参数。

Name Type Description
proxy string 可选

服务代理地址。

withCredentials boolean 可选

请求是否携带凭据。默认情况下,仅同源请求包含凭据。

crossOrigin boolean 可选

是否允许跨域请求。

headers Object 可选

请求头。

Example
new ThemeService(url,{
           projection:projection
     }).getThemeInfo(params,function(result){
          //doSomething
     });

Extends

ThemeService -> ServiceBase -> ol.Observable

Methods

getThemeInfo(params, callback){Promise}

openlayers/services/ThemeService.js, line 41

获取专题图信息。

Name Type Description
params ThemeParameters

专题图参数类。

callback RequestCallback 可选

回调函数,该参数未传时可通过返回的 promise 获取结果。

Returns:
Type Description
Promise Promise 对象。