1. DriveDistance

驾车距离(路线)查询分析

1.1.1. new DriveDistance(options)

Param Type Default Description
options Object

驾车距离参数,包含以下属性

[options.mode] String 'driving'

查询模式,默认为驾车, 可选'walking'

[options.speed] Number 20

驾车速度,默认20

[options.startImg] String

起点图片,默认为一张base64图片

[options.EndMarkImg] String

终点图片,默认为一张base64图片

Example

let geomap = new BOSGeo.GeoMap('bosgeoContainer');
let dd = new BOSGeo.DriveDistance({speed: 10});
dd.addTo(geomap);

1.2. 方法

1.2.1. driveDistance.changeMode(value)

切换查询模式,'walking','driving'

Param Type Description
value String

查询模式

Example

let geomap = new BOSGeo.GeoMap('bosgeoContainer');
let dd = new BOSGeo.DriveDistance({speed: 10});
dd.changeMode('walking');

1.2.2. driveDistance.addTo(BOSMap)

添加驾车距离至GeoMap的实例对象

Param Type Description
BOSMap GeoMap

GeoMap的实例对象

Example

let geomap = new BOSGeo.GeoMap('bosgeoContainer');
let dd = new BOSGeo.DriveDistance({speed: 10});
dd.addTo(geomap)

1.2.3. driveDistance.clear()

清除驾车距离信息

Example

let dd = new BOSGeo.DriveDistance({speed: 10});
dd.clear();

1.2.4. driveDistance.show(value)

控制显隐

Param Type Description
value Boolean

ture为显示,false为隐藏

Example

let geomap = new BOSGeo.GeoMap('bosgeoContainer');
let dd = new BOSGeo.DriveDistance({speed: 10});
dd.addTo(geomap);
dd.show(false);

1.2.5. driveDistance.hide()

隐藏驾车距离

1.2.6. driveDistance.destroy()

销毁

版权所有@盈嘉互联(北京)科技有限公司 京ICP备15051988号-9 Copyright © 2022 all right reserved,powered by Gitbook该文件修订时间: 2022-02-22 17:53:54

results matching ""

    No results matching ""