Class: ThemeService

ThemeService

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

new ThemeService(url, options)

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

new ThemeService(url, options);
<script type="text/javascript" src="https://iclient.supermap.io/dist/leaflet/iclient-leaflet.js"></script>
<script>
  new L.supermap.ThemeService({paramsNames});
  // 弃用的写法

  L.supermap.themeService(url, options);
</script>
leaflet/services/ThemeService.js, line 8
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 -> L.Evented

Events

inherited destroy

leaflet/services/ServiceBase.js, line 58

资源释放成功后触发。

Properties:
Name Type Description
this ServiceBase

this 对象。

inherited initialized

leaflet/services/ServiceBase.js, line 45

构造函数构造成功后触发。

Properties:
Name Type Description
this ServiceBase

this 对象。

Methods

inherited destroy()

leaflet/services/ServiceBase.js, line 53

释放资源,将引用的资源属性置空。

getThemeInfo(params, callback){Promise}

leaflet/services/ThemeService.js, line 42

获取专题图信息。

Name Type Description
params ThemeParameters

专题图参数类。

callback RequestCallback 可选

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

Returns:
Type Description
Promise Promise 对象。