new AddressMatchService(url, options)
Usage
import { AddressMatchService } from '@supermapgis/iclient-mapboxgl';
new AddressMatchService(url, options);<script type="text/javascript" src="https://iclient.supermap.io/dist/mapboxgl/iclient-mapboxgl.js"></script>
<script>
new mapboxgl.supermap.AddressMatchService({paramsNames});
</script>
mapboxgl/services/AddressMatchService.js, line 9
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
string |
地址匹配服务地址,如 http://{ip}:{port}/iserver/services/addressmatch-Address/restjsr/v1/address 。 |
|||||||||||||||
options |
Object |
参数。
|
Example
new AddressMatchService(url,options)
.code(function(result){
//doSomething
})
Extends
AddressMatchService
-> ServiceBase
Events
-
inherited initialized
mapboxgl/services/ServiceBase.js, line 32 -
构造函数构造成功之后触发。
Properties:
Name Type Description thisObject this 对象。
Methods
-
code(params, callback){Promise}
mapboxgl/services/AddressMatchService.js, line 34 -
获取正向地址匹配结果。
Name Type Description paramsGeoCodingParameter 正向匹配参数。
callbackRequestCallback 可选 回调函数,该参数未传时可通过返回的 promise 获取结果。
Returns:
Type Description Promise Promise 对象。 -
decode(params, callback){Promise}
mapboxgl/services/AddressMatchService.js, line 45 -
获取反向地址匹配结果。
Name Type Description paramsGeoDecodingParameter 反向匹配参数。
callbackRequestCallback 可选 回调函数,该参数未传时可通过返回的 promise 获取结果。
Returns:
Type Description Promise Promise 对象。