Class: AddressMatchService

AddressMatchService

地址匹配服务。

new AddressMatchService(url, options)

Usage
// 浏览器
<script type="text/javascript" src="https://iclient.supermap.io/dist/openlayers/iclient-ol.js"></script>
<script>
  new ol.supermap.AddressMatchService(url, options);
  
</script>

// ES6 Import
import { AddressMatchService } from '@supermap/iclient-ol';

new AddressMatchService(url, options);

openlayers/services/AddressMatchService.js, line 7
Name Type Description
url string

服务地址。

options Object

参数。

Name Type Default Description
proxy string 可选

服务代理地址。

withCredentials boolean false 可选

请求是否携带 cookie。

crossOrigin boolean 可选

是否允许跨域请求。

headers Object 可选

请求头。

Example
new AddressMatchService(url,options)
     .code(function(result){
         //doSomething
     })

Extends

Methods

code(params, callback){Promise}

openlayers/services/AddressMatchService.js, line 38

获取正向地址匹配结果。

Name Type Description
params GeoCodingParameter

正向匹配参数。

callback RequestCallback 可选

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

Returns:
Type Description
Promise Promise 对象。

decode(params, callback){Promise}

openlayers/services/AddressMatchService.js, line 49

获取反向地址匹配结果。

Name Type Description
params GeoDecodingParameter

反向匹配参数。

callback RequestCallback 可选

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

Returns:
Type Description
Promise Promise 对象。